Public Member Functions | List of all members
ObjectWithDefaultProperties Class Reference

A base class for objects that can be stored and restored using DynamicObject. More...

Inheritance diagram for ObjectWithDefaultProperties:
FloatingTileContent AboutPagePanel ActivityLedPanel CustomSettingsWindowPanel FloatingTileContainer MidiChannelPanel MidiKeyboardPanel MidiSourcePanel Note PerformanceLabelPanel PresetBrowserPanel TooltipPanel

Public Member Functions

virtual void fromDynamicObject (const var &objectData)
 Restores the state of this object from a dynamic object. More...
 
virtual Identifier getDefaultablePropertyId (int i) const
 Overwrite this and return the Identifier for the given property index. More...
 
virtual var getDefaultProperty (int id) const
 Overwrite this and get the default property. More...
 
virtual int getNumDefaultableProperties () const
 Overwrite this and return the number of properties that are defaultable. More...
 
void resetObject (DynamicObject *objectToClear)
 Clears the given object and sets all defaultable properties to their initial values. More...
 
virtual var toDynamicObject () const
 Writes the state of this object into a dynamic object. More...
 

Detailed Description

A base class for objects that can be stored and restored using DynamicObject.

Member Function Documentation

virtual void fromDynamicObject ( const var &  objectData)
inlinevirtual

Restores the state of this object from a dynamic object.

virtual Identifier getDefaultablePropertyId ( int  i) const
inlinevirtual

Overwrite this and return the Identifier for the given property index.

You might want to use the macro RETURN_DEFAULT_PROPERTY_ID(idToCheck, name) with a named enum for this.

virtual var getDefaultProperty ( int  id) const
inlinevirtual

Overwrite this and get the default property.

virtual int getNumDefaultableProperties ( ) const
inlinevirtual

Overwrite this and return the number of properties that are defaultable.

void resetObject ( DynamicObject *  objectToClear)
inline

Clears the given object and sets all defaultable properties to their initial values.

virtual var toDynamicObject ( ) const
inlinevirtual

Writes the state of this object into a dynamic object.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.