API Guides > ConceptRT 3.x
DataStructure Class Reference

Creates invocable and serializable structure. More...

Detailed Description

Creates invocable and serializable structure.

Example :

class MyDataStructure: public DataStructure
{
CONCEPT_DEFINE_CLASS(MyDataStructure, DataStructure)
RT_DYNAMIC_CAST_1(MyDataStructure, DataStructure) // when CONCEPTRT_WITHOUT_RTTI used
public:
Int32 i;
Float64 x;
FIELDS_BASECLASS // optional
FIELDS_END
};
+ Inheritance diagram for DataStructure:

Public Member Methods

void Invoke (const DynamicInvocationRequest &request, DynamicInvocationResult &result)
 Invokes the object fields and methods. More...
 
void Accept (IContainerVisitor &visitor)
 Accepts IContainerVisitor to access the object published fields. More...
 
void ReadFrom (IDataStore &dataStore, IMessageCollector *messages=NULL)
 Reads from. More...
 
void WriteTo (IDataStore &dataStore) const
 Writes to. More...
 
virtual Variant GetPropertyMetaData (PCChar8 propertyName, PCChar8 metaDataName, const Variant &defaultValue=Variant::GetVariantNull()) const
 Returns a metadata string corresponding to a property and a metadata name. More...
 

Methods Documentation

void Accept ( IContainerVisitor visitor)
virtual

Accepts IContainerVisitor to access the object published fields.

Parameters
visitor[in,out] The visitor.

Implements IVisitableContainer.

virtual Variant GetPropertyMetaData ( PCChar8  propertyName,
PCChar8  metaDataName,
const Variant defaultValue = Variant::GetVariantNull() 
) const
virtual

Returns a metadata string corresponding to a property and a metadata name.

Parameters
propertyName[in] The name of the property to which the metadata is looked for.
metaDataName[in] The name of the metadata entry to which the metadata is looked for.
defaultValue[in] The value returned if no metadata is found.
Returns
the value under a Variant type.

Implements IPropertyMetaDataProvider.

void Invoke ( const DynamicInvocationRequest request,
DynamicInvocationResult result 
)
virtual

Invokes the object fields and methods.

Parameters
requestThe request.
result[in,out] The result.

Dynamic Invocation on IInvocable objects enables us to have remote access on published fields and methods.

Implements IInvocable.

void ReadFrom ( IDataStore dataStore,
IMessageCollector messages = NULL 
)
virtual

Reads from.

Parameters
dataStore[in,out] The dataStore.
messages[in,out] (optional) The messageCollector to collect warning or error messages. Default = NULL.

Implements ISerializable.

void WriteTo ( IDataStore dataStore) const
virtual

Writes to.

Parameters
dataStore[in,out] The dataStore.

Implements ISerializable.