Flip Reference

 

Bool Class Reference

Namespace

ohm::flip

Inherits from

ohm::flip::Object

Declared in

ohm/flip/Bool.h

Companion Guide

Flip Programming Guide: Writing a Flip Class Part 1

Overview

The Bool class implements a Flip value type holding a boolean value. The following sections will only document the public API.

Partial Class Diagram

Methods Overview

Assigning

Casting

Comparing

Differencing

Methods

ctor

Sets the value at post construction stage.

virtual void   ctor (ohm::flip::Args & args);
void           ctor (bool val);

The first version sets the value from a cascaded arguments object ohm::flip::Args

operator =

Sets the value.

Bool &         operator = (bool val);

Returns a reference to this .

operator bool

Returns the value of this .

               operator bool () const;

WARNING:it is invalid to call this function when the object is being restored

get_old_value

Returns the old value of this .

bool           get_old_value () const;

WARNING:it is invalid to call this function when the object is being inited

operator ==

Returns true if the right handed value is equal to this , false otherwise.

               operator == (bool val) const;
               operator == (const Bool &other) const;

operator !=

Returns true if the right handed value is not equal to this , false otherwise.

               operator != (bool val) const;
               operator != (const Bool &other) const;

did_value_change

Returns true if the old value is different from the current value.

bool           did_value_change () const;

Note:Outside of an observer document_changed call, this will always return false