Otherwise guard. More...
Public Types | |
using | Specif = int32_t |
Specificity of Properties. | |
using | GType = GPropType |
Returns prop's meta-class. More... | |
Public Member Functions | |
GOtherwise & | operator[] (GExprBool const &expr) |
Adds an Otherwise Guard to a to a trigger. More... | |
GString | stringValue () const override |
Returns the value of the prop as a string. More... | |
bool | isEquivalent (const GProp &) const override |
Returns true if these props are equivalent. More... | |
GCond * | clone (bool copy_value) const override |
can't be cloned. | |
bool | onAdd (Gadget *) override |
Called when the property is added to an object. More... | |
void | onRemove (Gadget *) override |
Called when the property is removed from an object. More... | |
virtual bool | isMutable () const |
Returns true if the prop is mutable. More... | |
virtual void | setImmutable () |
Makes the prop immutable. More... | |
virtual float | floatValue () const |
Returns the value of the prop as a float. More... | |
virtual bool | boolValue () const |
Returns the value as a bool. More... | |
virtual void | error (GString const &funname, GString const &message) const |
Prints an error message. More... | |
void | operator delete (void *) |
delete does nothing, see GObject class. | |
void | forgetSmartPointers () |
Forgets all smart pointers pointing this object. More... | |
unsigned int | useCount () const |
Returns the numbers of smart pointers referencing the object. | |
virtual void | removeNotifiers (void *obj) |
[Implementation] Notifies this object that it must no longer refer obj. | |
GString | typeName () const override |
Returns the name and role of the prop's type. | |
GProp * | toProp () override |
Class conversions. | |
bool | write (GString const &filename) const |
Writes the value of the prop on a file or a stream. | |
virtual class GVarProp * | toVarProp () |
Type conversions. | |
template<class Subclass > | |
Subclass * | to () |
Class conversions. | |
void | ignoreSmartPointers () |
Checks/sets whether this object can be auto-deleted by smart pointers. More... | |
Otherwise guard.
|
inherited |
Returns prop's meta-class.
Both functions return the prop's type, but Type() is a static method and type() a virtual method.
GOtherwise& guit::GOtherwise::operator[] | ( | GExprBool const & | expr) |
Adds an Otherwise Guard to a to a trigger.
The Guard is a boolean active expression, see Expr.
|
inlineoverridevirtual |
Returns the value of the prop as a string.
Returns "" if the prop has no value of its value cannot be converted to a string.
Reimplemented from guit::GGuard.
|
inlineoverridevirtualinherited |
Returns true if these props are equivalent.
Adding a prop to a gadget replaces the equivalent prop it contains (if it contains any). In all other cases, the prop is added to the gadget proplist. NOTE: props with a negative role are never equivalent!
Reimplemented from guit::GProp.
|
overridevirtualinherited |
Called when the property is added to an object.
note: must call addModes().
Reimplemented from guit::GProp.
|
overridevirtualinherited |
Called when the property is removed from an object.
note: must call removeModes().
Reimplemented from guit::GProp.
|
inlinevirtualinherited |
Returns true if the prop is mutable.
Returns true only if the prop derives from GVarProp and setImmutable() was not called. Props with another type than GVarProp are always immutable.
Reimplemented in guit::GVarProp.
|
inlinevirtualinherited |
Makes the prop immutable.
Affects only GVarProp props (other props are always immutable). A prop cannot be made mutable again after this method has been called.
Reimplemented in guit::GVarProp.
|
inlinevirtualinherited |
Returns the value of the prop as a float.
Returns 0.f if the prop has no value of its value cannot be converted to a float.
Reimplemented in guit::GNumExpr, guit::GTextExpr, guit::GBoolExpr, guit::GExpr, guit::GState, guit::GText, and guit::GBool.
|
inlinevirtualinherited |
Returns the value as a bool.
Returns false if the prop has no value of its value cannot be converted to a bool.
Reimplemented in guit::GNumExpr, guit::GTextExpr, guit::GBoolExpr, guit::GExpr, and guit::GBool.
|
virtualinherited |
Prints an error message.
|
inlineinherited |
Checks/sets whether this object can be auto-deleted by smart pointers.
ignoreSmartPointers() has a permanent effect, contrary to forgetSmartPointers(). Objects not created by calling new are never auto-deleted by smart pointers.
|
inlineinherited |
Forgets all smart pointers pointing this object.
The smart pointers that are currently pointing to the object won't auto-delete it. forgetSmartPointers() has a temporary effect, contrary to ignoreSmartPointers().