1 #ifndef _DDD_AttributeBase_h_
2 #define _DDD_AttributeBase_h_
51 class DDD_AttributeBase;
60 virtual const char *GetName() = 0;
97 CONNECTED_INPUT = 1<<1,
98 CONNECTED_OUTPUT = 1<<2,
99 CONNECTED_IN_OUT = (CONNECTED_INPUT | CONNECTED_OUTPUT)
136 ConnectionState GetConnectionState();
141 void SetConnectionState(ConnectionState state);
146 void AddConnectionState(ConnectionState state);
151 bool ConnectionStateSupports(ConnectionState state);
154 const char* Name()
const;
163 void IncreaseRefCount();
168 void DecreaseRefCount();
177 virtual std::string GetValueString()
const = 0;
184 virtual void SetValueString(
const std::string &value,
bool notify,
DDD_AttributeObserver *originator) = 0;
189 virtual int GetValueInt(
void)
const = 0;
199 virtual unsigned int GetValueUInt(
void)
const = 0;
206 virtual void SetValueUInt(
const unsigned int value,
bool notify,
DDD_AttributeObserver *originator) = 0;
211 virtual double GetValueDouble(
void)
const = 0;
223 virtual bool GetValueBool(
void)
const = 0;
238 virtual void GetValueByteBuffer(
char **value,
unsigned int &length) = 0;
246 virtual void SetValueByteBuffer(
const char *value,
unsigned int length,
bool notify,
DDD_AttributeObserver *originator) = 0;
251 virtual DataType GetPreferredDataType()
const = 0;
257 static const char* DataTypeToString(DataType type);
262 static DataType StringToDataType(
const char*
string);
280 std::string EditorSemantic();
286 void EditorSemantic(
const std::string &semantic);
291 std::string EditorFormatString();
296 void EditorFormatString(
const std::string &formatStr);
300 std::string Connectability();
DDD_AttributeContainer. A virtual interface class for containers of attributes.
Definition: DDD_AttributeBase.h:57
ObserverList _observerList
Definition: DDD_AttributeBase.h:337
DDD_AttributeBase * _revertable
Definition: DDD_AttributeBase.h:350
A virtual interface class for all DataDirector attribute types.
Definition: DDD_AttributeBase.h:87
int _validConnectionStates
Definition: DDD_AttributeBase.h:345
bool _visiting
Definition: DDD_AttributeBase.h:341
std::string _editorSemantic
Definition: DDD_AttributeBase.h:347
DataType
Definition: DDD_AttributeBase.h:104
DDD_AttributeBase * GetRevertable(void) const
Definition: DDD_AttributeBase.h:311
std::string _editorFormatString
Definition: DDD_AttributeBase.h:348
A virtual interface class for observers of attributes. AttributeObserver-derived objects are able to ...
Definition: DDD_AttributeBase.h:66
bool IsPersistent(void) const
Definition: DDD_AttributeBase.h:322
void SetPersistent(bool flag)
Definition: DDD_AttributeBase.h:317
int _refCount
Definition: DDD_AttributeBase.h:340
Definition: DDD_AttributeBase.h:109
int GetValidConnectionStates()
Definition: DDD_AttributeBase.h:133
std::string _name
Definition: DDD_AttributeBase.h:342
void SetRevertable(DDD_AttributeBase *attr)
Definition: DDD_AttributeBase.h:306
Definition: DDD_AttributeBase.h:108
bool CanConnectAsOutput()
Definition: DDD_AttributeBase.h:130
Definition: DDD_AttributeBase.h:107
bool _persistent
Definition: DDD_AttributeBase.h:351
The disti::DynamicPtrArray class. A templated array of objects pointers capable of dynamically growin...
DDD_AttributeContainer * _container
Definition: DDD_AttributeBase.h:338
Definition: DDD_AttributeBase.h:110
ConnectionState
Definition: DDD_AttributeBase.h:94
Exception thrown whenever attempt to convert an attribute failed.
Definition: DDD_AttributeBase.h:77
Definition: AttributeChangedEmitter.h:46
bool CanConnectAsInput()
Definition: DDD_AttributeBase.h:127
ConnectionState _connectionState
Definition: DDD_AttributeBase.h:344