GL Studio C++ Runtime API
|
#include <disti_metadata.h>
Public Member Functions | |
DistiAttribute (CallbackMethodCallerBase *callback, const AttributeName &name, T *attribPtr) | |
DistiAttribute (CallbackMethodCallerBase *callback, const AttributeName &name, const T &initialValue) | |
bool | Copyable () const override |
long | ValueInt () override |
void | ValueInt (long val) override |
double | ValueFloat () override |
void | ValueFloat (double val) override |
DistiAttributeBase & | operator= (const DistiAttributeBase &oldClass) override |
std::ostream & | WriteValue (std::ostream &outstr) override |
std::istream & | ReadValue (std::istream &instr) override |
virtual T | Value () |
virtual void | Value (const T &val) |
bool | operator== (const DistiAttributeBase &rArg) override |
~DistiAttribute () override | |
Public Member Functions inherited from DistiAttributeBase | |
DistiAttributeBase (CallbackMethodCallerBase *callback, const AttributeName &name, bool localStorage) | |
virtual DistiAttributeBase & | operator= (const DistiAttributeBase &oldClass) |
const AttributeName & | Name () const |
AttributeName & | Name () |
bool | LocalStorage () const |
virtual bool | Copyable () const |
virtual bool | OkToWrite () const |
virtual bool | ValueChanged () |
virtual void | ResetValueChanged () |
virtual std::string | ValueString () |
virtual void | ValueString (const std::string &s) |
virtual long | ValueInt () |
virtual void | ValueInt (long val) |
virtual double | ValueFloat () |
virtual void | ValueFloat (double val) |
virtual void | CallCallback () |
Calls callback CallType3 if it has been set. | |
virtual std::ostream & | WriteValue (std::ostream &outstr)=0 |
virtual std::istream & | ReadValue (std::istream &instr)=0 |
virtual bool | operator== (const DistiAttributeBase &r) |
template<class valType > | |
DistiAttributeBase & | operator<< (const valType &val) |
template<class valType > | |
DistiAttributeBase & | operator>> (valType &val) |
virtual CallbackID | RegisterObserver (AttributeObserver *observer) |
virtual void | UnregisterObserver (CallbackID id) |
virtual void | NotifyObservers () |
Public Member Functions inherited from WeakReferenceableMixin | |
void | AddWeakReference (WeakReference *weakRef) override |
void | NotifyWeakReferenceDestroyed (WeakReference *ref) override |
virtual void | AddWeakReference (WeakReference *weakRef)=0 |
virtual void | NotifyWeakReferenceDestroyed (WeakReference *weakReference)=0 |
Protected Attributes | |
T * | _attribPtr |
int | _precision |
Protected Attributes inherited from DistiAttributeBase | |
AttributeName | _name |
CallbackMethodCallerBase * | _callback |
ScopedPtr< DistiAttributeObserverList > | _observerList |
bool | _localStorage |
Protected Attributes inherited from WeakReferenceableMixin | |
DynamicArray< WeakReference * > * | _weakRefs |
Additional Inherited Members | |
Public Types inherited from DistiAttributeBase | |
typedef unsigned int | CallbackID |
Type for unique identifiers. | |
Protected Member Functions inherited from WeakReferenceableMixin | |
WeakReferenceableMixin () | |
virtual | ~WeakReferenceableMixin () |
A templated class for creating attributes.
|
inline |
Constructor Keeps a pointer to the specified type
callback | The method to call when the value changes. A duplicate of the CallbackMethodCallerBase is created and stored internally. |
name | The name of the attribute |
attribPtr | The address of the storage. |
|
inline |
Constructor Actually creates storage of the specified type
callback | The method to call when the value changes. A duplicate of the CallbackMethodCallerBase is created and stored internally. |
name | The name of the attribute |
initialValue | The initial value of the internally stored variable. |
|
inlineoverride |
Destructor deletes local storage if we created it
|
inlineoverridevirtual |
Reimplemented from DistiAttributeBase.
|
inlineoverridevirtual |
Assignment operator
oldClass | The attribute to assign. |
Reimplemented from DistiAttributeBase.
|
inlineoverridevirtual |
Performs type specific comparison. This results in faster comparisons than the base class
rArg | The attribute to compare. |
Reimplemented from DistiAttributeBase.
|
inlineoverridevirtual |
Read from the stream, and store it in this attribute.
instr | The stream to read from. |
Implements DistiAttributeBase.
Reimplemented in DistiAttributeProperty< containerT, T, SetArgT, GetReturnT >.
|
inlinevirtual |
Allows for type specific access to the data.
Reimplemented in DistiAttributeProperty< containerT, T, SetArgT, GetReturnT >.
|
inlinevirtual |
Allows for type specific access to the data.
val | The value to set in the attribute's type. |
Reimplemented in DistiAttributeProperty< containerT, T, SetArgT, GetReturnT >.
|
inlineoverridevirtual |
Reimplemented from DistiAttributeBase.
Reimplemented in DistiAttributeProperty< containerT, T, SetArgT, GetReturnT >.
|
inlineoverridevirtual |
Set the double value for this attribute.
val | The double value to set for this attribute. |
Reimplemented from DistiAttributeBase.
Reimplemented in DistiAttributeProperty< containerT, T, SetArgT, GetReturnT >.
|
inlineoverridevirtual |
Reimplemented from DistiAttributeBase.
Reimplemented in DistiAttributeProperty< containerT, T, SetArgT, GetReturnT >.
|
inlineoverridevirtual |
Set the integer value of this attribute.
val | The integer value to set for this attribute. |
Reimplemented from DistiAttributeBase.
Reimplemented in DistiAttributeProperty< containerT, T, SetArgT, GetReturnT >.
|
inlineoverridevirtual |
Write this attribute's string value to the stream.
outstr | The stream to write to. |
Implements DistiAttributeBase.
Reimplemented in DistiAttributeProperty< containerT, T, SetArgT, GetReturnT >.
|
protected |
Points to the actual storage
|
protected |
Allows for setting of precision for floating point numbers