API Guides > ConceptRT 3.x
ConceptElement Class Referenceabstract

Concept element. Very base class of the ConceptRTModel classes. More...

Detailed Description

Concept element. Very base class of the ConceptRTModel classes.

+ Inheritance diagram for ConceptElement:

Public Member Methods

const bool & GetIsInvocable () const
 Controls if the objet should be shown in the invocation. More...
 
const bool & GetIsInvocable ()
 Controls if the objet should be shown in the invocation. More...
 
void SetIsInvocable (const bool &value)
 Controls if the objet should be shown in the invocation. More...
 
const bool & GetIsSerialized () const
 Controls if the objet should be serialized. More...
 
const bool & GetIsSerialized ()
 Controls if the objet should be serialized. More...
 
void SetIsSerialized (const bool &value)
 Controls if the objet should be serialized. More...
 
 ConceptElement ()
 Default constructor. More...
 
 ConceptElement (const ConceptElement &right)
 Default constructor. More...
 
ConceptElementoperator= (const ConceptElement &right)
 Assignment operator. More...
 
const StaticString< ConceptElementNameMaxLength > & GetName () const
 Gets the name. More...
 
void SetName (const PCChar8 name)
 Sets a name. More...
 
String GetPath () const
 Gets the path of the ConceptElement. More...
 
ConceptContainerGetContainer () const
 Gets the container of the ConceptElement. More...
 
template<class ContainerType >
ContainerType * GetContainerOfType () const
 Gets the container of a certain type the ConceptElement. More...
 
ConceptContainerGetRootContainer () const
 Gets the root container of the ConceptElement. More...
 
virtual const String GetDisplayName () const
 Gets the display name. More...
 
virtual void CopyDataFrom (const ConceptElement &source)
 Copies the data from another ConceptElement. More...
 
virtual void CopyFrom (const ConceptElement &source)
 Copies itself from a given source. More...
 
virtual void ReadFrom (IDataStore &dataStore, IMessageCollector *messages=NULL)=0
 Reads from. More...
 
virtual void WriteTo (IDataStore &dataStore) const =0
 Writes to. More...
 
virtual void Invoke (const DynamicInvocationRequest &request, DynamicInvocationResult &result)=0
 Invokes the object fields and methods. More...
 
virtual BaseConceptFactoryGetFactory () const =0
 Gets the ConceptElement factory. More...
 
ConceptElementGetProvider () const
 Gets the provider of the ConceptElement if defined, throws a ConceptException otherwise. More...
 
template<class T >
T & GetProvider () const
 Gets the provider of the ConceptElement if defined and of type T, throws a ConceptException otherwise. More...
 
bool GetHasProvider () const
 Tests the existence of a provider. More...
 
template<class T >
bool GetHasProvider () const
 Tests the existence of a provider of type T. More...
 
virtual ConceptElementClone () const
 Makes a deep copy of this object. More...
 
virtual void ResolveLinks ()
 Resolve links. More...
 
virtual void RetrieveProvidedFactories (BaseConceptFactories &factories, const Predicate< BaseConceptFactory & > &filter)
 Retrieve provided factories. More...
 
void RetrieveProvidedFactories (BaseConceptFactories &factories)
 Retrieve provided factories. More...
 
virtual void RetrieveFactories (BaseConceptFactories &factories) const
 Retrieve factories. More...
 
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...
 

Protected Member Functions

void Initialize ()
 Initializes this object. More...
 
virtual BaseConceptFactoryInternalGetFactory () const
 Gets the object factory. More...
 
virtual void RetrieveElementProvidedFactories (BaseConceptFactories &factories, const Predicate< BaseConceptFactory & > &filter)
 RetrieveElementProvidedFactories. Used by the macro CONCEPT_PROVIDED_COMPONENT_BEGIN More...
 

Private fields

bool IsInvocable
 Controls if the objet should be shown in the invocation. More...
 
bool IsSerialized
 Controls if the objet should be serialized. More...
 

Constructor & Destructor Documentation

Default constructor.

ConceptElement ( const ConceptElement right)

Default constructor.

Parameters
rightThe right.

Methods Documentation

virtual ConceptElement* Clone ( ) const
virtual

Makes a deep copy of this object.

Returns
null if it fails, else a copy of this object.
Warning
Non-Deterministic: The new element is created on the heap. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.
virtual void CopyDataFrom ( const ConceptElement source)
virtual

Copies the data from another ConceptElement.

Parameters
sourceSource of the data.
RT Exceptions:

RT_ERROR_STACK_LIMITATION

RT_ERROR_COPY_ELEMENT

virtual void CopyFrom ( const ConceptElement source)
virtual

Copies itself from a given source.

Parameters
sourceSource of the data.
RT Exceptions:

RT_ERROR_STACK_LIMITATION

RT_ERROR_COPY_ELEMENT

ConceptContainer* GetContainer ( ) const

Gets the container of the ConceptElement.

Returns
null if it fails, else the container.
ContainerType * GetContainerOfType ( ) const

Gets the container of a certain type the ConceptElement.

Template Parameters
ContainerTypeThe type of the container.
Returns
null if it fails, else the container.
virtual const String GetDisplayName ( ) const
virtual

Gets the display name.

Returns
The display name.
virtual BaseConceptFactory& GetFactory ( ) const
pure virtual

Gets the ConceptElement factory.

Returns
The factory.

Implemented in AcquisitionSystemRT< AcquitisionBufferSize, LoggerBufferSize, MemoryRootBufferSize >, IoMappingChannelItemAcyclicOutputFloat64, IoMappingChannelItemAcyclicOutputFloat32, IoMappingChannelItemAcyclicOutputInt64, IoMappingChannelItemAcyclicOutputInt32, IoMappingChannelItemAcyclicOutputInt16, IoMappingChannelItemAcyclicOutputInt8, IoMappingChannelItemAcyclicOutputDigital, IoSimulation, IoMappingChannelItemAcyclicInputFloat64, IoMappingChannelItemAcyclicInputFloat32, IoMappingChannelItemAcyclicInputInt64, IoMappingChannelItemAcyclicInputInt32, IoMappingChannelItemAcyclicInputInt16, IoMappingChannelItemAcyclicInputInt8, IoMappingChannelItemAcyclicInputDigital, IoMappingChannelItemAcyclic, IoTechnologyChannel, IoMappingChannelItemCyclicOutputFloat64, IoMappingChannelItemCyclicOutputFloat32, IoMappingChannelItemCyclicOutputInt64, IoMappingChannelItemCyclicOutputInt32, IoMappingChannelItemCyclicOutputInt16, IoMappingChannelItemCyclicOutputInt8, IoMappingSimulationItemSync, IoMappingNullItemSync, IoMappingChannelItemCyclicOutputDigital, IoNull, IoMappingChannelItemCyclicInputFloat64, AcquisitionChannel, IoMappingChannelItemCyclicInputFloat32, IoMappingChannelItemCyclicInputInt64, IoMappingChannelItemCyclicInputInt32, IoMappingChannelItemCyclicInputInt16, IoMappingChannelItemCyclicInputInt8, ConceptSingleLink< ElementType >, ConceptMultipleLink< ElementType >, IoMappingChannelItemCyclicInputDigital, IoMappingChannelItemCyclic, ConceptStaticList< ElementType >, ConceptDynamicList< ElementType >, ConceptDynamicList< IoMappingItem >, ConceptDynamicList< IoTechnology >, ConceptDynamicComponent< ElementType >, and IoMappingChannelItemSync.

bool GetHasProvider ( ) const

Tests the existence of a provider.

Returns
Returns true if the ConceptElement has a provider, or false otherwise.
bool GetHasProvider ( ) const

Tests the existence of a provider of type T.

Returns
Returns true if the ConceptElement has a provider of type T, or false otherwise.
const bool & GetIsInvocable ( ) const
inline

Controls if the objet should be shown in the invocation.

It enables us to hide a branch of the objet model to the invocation mechanisms.

Returns
the property value
See also
Field: IsInvocable
Setter: SetIsInvocable()
const bool & GetIsInvocable ( )
inline

Controls if the objet should be shown in the invocation.

It enables us to hide a branch of the objet model to the invocation mechanisms.

Returns
the property value
See also
Field: IsInvocable
Setter: SetIsInvocable()
const bool & GetIsSerialized ( ) const
inline

Controls if the objet should be serialized.

It enables us to hide a branch of the objet model to the serialization mechanisms.

Returns
the property value
See also
Field: IsSerialized
Setter: SetIsSerialized()
const bool & GetIsSerialized ( )
inline

Controls if the objet should be serialized.

It enables us to hide a branch of the objet model to the serialization mechanisms.

Returns
the property value
See also
Field: IsSerialized
Setter: SetIsSerialized()
const StaticString<ConceptElementNameMaxLength>& GetName ( ) const

Gets the name.

Returns
The name.
String GetPath ( ) const

Gets the path of the ConceptElement.

Returns
The path.
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.

ConceptElement& GetProvider ( ) const

Gets the provider of the ConceptElement if defined, throws a ConceptException otherwise.

Returns
The provider.
RT Exceptions:
RT_ERROR_NOT_PROVIDED_OBJECT
T & GetProvider ( ) const

Gets the provider of the ConceptElement if defined and of type T, throws a ConceptException otherwise.

Template Parameters
TThe provider expected type.
Returns
The provider.
RT Exceptions:

RT_ERROR_NOT_PROVIDED_OBJECT

RT_ERROR_PROVIDER_NOT_EXPECTED_TYPE

ConceptContainer* GetRootContainer ( ) const

Gets the root container of the ConceptElement.

Returns
null if it fails, else the root container.
void Initialize ( )
protected

Initializes this object.

virtual BaseConceptFactory& InternalGetFactory ( ) const
protectedvirtual

Gets the object factory.

Returns
The factoriy.
RT Exceptions:
RT_ERROR_INTERNAL_FACTORY_NOT_DEFINED
virtual void Invoke ( const DynamicInvocationRequest request,
DynamicInvocationResult result 
)
pure 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.

Implemented in AcquisitionSystemRT< AcquitisionBufferSize, LoggerBufferSize, MemoryRootBufferSize >, AcquisitionSystem, AcquisitionChannel, ConceptMultipleLink< ElementType >, ConceptContainer, ConceptLink, BaseConceptMultipleLink, and IoTechnology.

ConceptElement& operator= ( const ConceptElement right)

Assignment operator.

Parameters
rightThe right.
Returns
A shallow copy of this object.
virtual void ReadFrom ( IDataStore dataStore,
IMessageCollector messages = NULL 
)
pure 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.

Implemented in ConceptDynamicComponent< ElementType >, ConceptLink, BaseConceptMultipleLink, ConceptComponent, BaseConceptDynamicList, and BaseConceptStaticList.

virtual void RetrieveElementProvidedFactories ( BaseConceptFactories factories,
const Predicate< BaseConceptFactory & > &  filter 
)
protectedvirtual

RetrieveElementProvidedFactories. Used by the macro CONCEPT_PROVIDED_COMPONENT_BEGIN

Parameters
factoriesThe factory list to populate.
filterfilter that makes the selection of the corresponding factories through Predicate pattern possible.
virtual void RetrieveFactories ( BaseConceptFactories factories) const
virtual

Retrieve factories.

Parameters
factories[in, out] factories list to populate.

Reimplemented in ConceptContainer.

virtual void RetrieveProvidedFactories ( BaseConceptFactories factories,
const Predicate< BaseConceptFactory & > &  filter 
)
virtual

Retrieve provided factories.

Parameters
factories[in, out] factories list
filterfilter that makes the selection of the corresponding factories through Predicate pattern possible.

Reimplemented in ConceptContainer.

void RetrieveProvidedFactories ( BaseConceptFactories factories)

Retrieve provided factories.

Parameters
factories[in, out] factories list
void SetIsInvocable ( const bool &  value)
inline

Controls if the objet should be shown in the invocation.

It enables us to hide a branch of the objet model to the invocation mechanisms.

Parameters
[in]valueThe new parameter value.
Returns
the property value
See also
Field: IsInvocable
Getter: GetIsInvocable()
void SetIsSerialized ( const bool &  value)
inline

Controls if the objet should be serialized.

It enables us to hide a branch of the objet model to the serialization mechanisms.

Parameters
[in]valueThe new parameter value.
Returns
the property value
See also
Field: IsSerialized
Getter: GetIsSerialized()
void SetName ( const PCChar8  name)

Sets a name.

Parameters
nameThe name.
RT Exceptions:
RT_ERROR_INVALID_NAME
virtual void WriteTo ( IDataStore dataStore) const
pure virtual

Writes to.

Parameters
dataStore[in,out] The dataStore.

Implements ISerializable.

Implemented in ConceptDynamicComponent< ElementType >, ConceptLink, BaseConceptMultipleLink, ConceptComponent, BaseConceptDynamicList, and BaseConceptStaticList.

Fields Documentation

bool IsInvocable
private

Controls if the objet should be shown in the invocation.

It enables us to hide a branch of the objet model to the invocation mechanisms.

See also
Getter: GetIsInvocable()
Setter: SetIsInvocable()
bool IsSerialized
private

Controls if the objet should be serialized.

It enables us to hide a branch of the objet model to the serialization mechanisms.

See also
Getter: GetIsSerialized()
Setter: SetIsSerialized()