API Guides > ConceptRT 3.x
ConceptList Class Referenceabstract

ConceptList. Base class of ConceptStaticList and ConceptDynamicList More...

Detailed Description

+ Inheritance diagram for ConceptList:

Public Member Methods

 ConceptList ()
 Default constructor. More...
 
 ConceptList (const ConceptList &right)
 Default constructor. More...
 
ConceptListoperator= (const ConceptList &right)
 Assignment operator. More...
 
Int32 GetCount () const
 Gets the number of element contained. More...
 
Int32 Add (ConceptElement &element)
 Adds element. More...
 
Int32 Add (ConceptElement &element, const PCChar8 name)
 Adds element. More...
 
void AddRange (const IReferenceList< ConceptElement > &list)
 Adds a range of element. More...
 
void Clear ()
 Clears the content of this container. More...
 
void RemoveAt (Int32 index)
 Removes a reference at index. More...
 
void Insert (Int32 index, ConceptElement &element)
 Inserts a reference. More...
 
void Exchange (Int32 index1, Int32 index2)
 Exchanges two references. More...
 
void Move (Int32 index1, Int32 index2)
 Moves a reference. More...
 
bool IndexValid (Int32 index) const
 Query if index is valid. More...
 
Int32 IndexOf (const ConceptElement &element) const
 Index of the given reference. More...
 
Int32 Remove (const ConceptElement &element)
 Removes an reference at index. More...
 
ConceptElementSwap (ConceptElement &element, Int32 index)
 Swaps. More...
 
bool GetFull () const
 Query if the reference list is full. More...
 
bool GetEmpty () const
 Query if the reference list is empty. More...
 
ConceptElementoperator[] (Int32 index) const
 Array indexer operator. More...
 
void Accept (IContainerVisitor &visitor)
 Accepts IContainerVisitor to access the object published fields. More...
 
bool IsNameUnique (PCChar8 name, ConceptElement *element=NULL)
 Query if 'name' is an unique name . More...
 
String GenerateUniqueName (PCChar8 baseName="Item", ConceptElement *element=NULL)
 Generates a unique name. More...
 
- Public Member Methods inherited from ConceptContainer
const bool & GetIsXmlPropertyVisible () const
 Show the xml field in the invocation. More...
 
const bool & GetIsXmlPropertyVisible ()
 Show the xml field in the invocation. More...
 
void SetIsXmlPropertyVisible (const bool &value)
 Show the xml field in the invocation. More...
 
const bool & GetIsXmlPropertyReadOnly () const
 Control access on the xml file shown in the invocation. More...
 
const bool & GetIsXmlPropertyReadOnly ()
 Control access on the xml file shown in the invocation. More...
 
void SetIsXmlPropertyReadOnly (const bool &value)
 Control access on the xml file shown in the invocation. More...
 
 ConceptContainer ()
 Default constructor. More...
 
 ~ConceptContainer ()
 Destructor. More...
 
bool Contains (ConceptElement &element) const
 Query if this object contains the given element. More...
 
void ResolveLinks ()
 Resolve links. More...
 
void Invoke (const DynamicInvocationRequest &request, DynamicInvocationResult &result)
 Invokes the object fields and methods. More...
 
ConceptElementFind (const PCChar8 path) const
 Searches into the container and sub-containers an element. More...
 
virtual ConceptElementFindByName (const PCChar8 name) const
 Searches into the container an element. More...
 
template<class ElementSubType >
ElementSubType * FindByName (const PCChar8 name) const
 Searches into the container an element of a certain type. More...
 
void RetrieveProvidedFactories (BaseConceptFactories &factories, const Predicate< BaseConceptFactory & > &filter)
 Retrieve provided factories. More...
 
void RetrieveProvidedFactories (BaseConceptFactories &factories)
 RetrieveProvidedFactories. More...
 
void RetrieveFactories (BaseConceptFactories &factories) const
 Retrieve factories. More...
 
- Public Member Methods inherited from ConceptElement
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 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...
 
void RetrieveProvidedFactories (BaseConceptFactories &factories)
 Retrieve provided 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...
 

Additional Inherited Members

- Protected Member Functions inherited from ConceptElement
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...
 

Constructor & Destructor Documentation

Default constructor.

ConceptList ( const ConceptList right)

Default constructor.

Parameters
rightThe right.

Methods Documentation

void Accept ( IContainerVisitor visitor)
virtual

Accepts IContainerVisitor to access the object published fields.

Parameters
visitor[in,out] The visitor.

Reimplemented from ConceptContainer.

Int32 Add ( ConceptElement element)
virtual

Adds element.

Parameters
element[in,out] The ConceptElement& to add.
Returns
Position index of the added element.
Warning
Non-Deterministic: The inner list of elements may be extended that may lead to memory allocation. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.
Ownership: The element will be owned by the list. The element must be previously created on the heap. If element is created on the stack this will leads to ACCESS_VIOLATION exception because the element will be deleted twice. This kind of situation is hard to debug.

Reimplemented from ConceptContainer.

Int32 Add ( ConceptElement element,
const PCChar8  name 
)
virtual

Adds element.

Parameters
element[in,out] The ConceptElement& to add.
nameThe element's name.
Returns
Position index of the added element.
Warning
Non-Deterministic: The inner list of elements may be extended that may lead to memory allocation. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.
Ownership: The element will be owned by the list. The element must be previously created on the heap. If element is created on the stack this will leads to ACCESS_VIOLATION exception because the element will be deleted twice. This kind of situation is hard to debug.

Reimplemented from ConceptContainer.

void AddRange ( const IReferenceList< ConceptElement > &  list)
virtual

Adds a range of element.

Parameters
listA const IReferenceList<ConceptElement> & of items to append to this.
Warning
Non-Deterministic: The inner list of elements may be extended that may lead to memory allocation. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.
Ownership: The elements will be owned by the list. The elements must be previously created on the heap. If elements are created on the stack this will leads to ACCESS_VIOLATION exception because the elements will be deleted twice. This kind of situation is hard to debug.

Implements IReferenceList< ConceptElement >.

void Clear ( )
virtual

Clears the content of this container.

Warning
Non-Deterministic: Deletion of content will remove items from the heap. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.

Implements ConceptContainer.

Reimplemented in BaseConceptStaticList.

void Exchange ( Int32  index1,
Int32  index2 
)
virtual

Exchanges two references.

Parameters
index1The first reference index.
index2The second reference index.
RT Exceptions:
RT_ERROR_OUT_OF_BOUND_INDEX

Implements IReferenceList< ConceptElement >.

Reimplemented in BaseConceptStaticList.

String GenerateUniqueName ( PCChar8  baseName = "Item",
ConceptElement element = NULL 
)

Generates a unique name.

Parameters
baseName(optional) name of the base.
element[in,out] (Optional) The ConceptElement& for which the name is generated. Default is NULL.
Returns
The generated unique name.
Int32 GetCount ( ) const
virtual

Gets the number of element contained.

Returns
The number of element.

Implements IReferenceList< ConceptElement >.

Reimplemented in BaseConceptStaticList.

bool GetEmpty ( ) const
virtual

Query if the reference list is empty.

Returns
true if it empty.

Implements IReferenceList< ConceptElement >.

Reimplemented in BaseConceptStaticList.

bool GetFull ( ) const
virtual

Query if the reference list is full.

Returns
true if it full.

Implements IReferenceList< ConceptElement >.

Reimplemented in BaseConceptStaticList.

Int32 IndexOf ( const ConceptElement value) const
virtual

Index of the given reference.

Parameters
valueThe reference.
Returns
this index of the given reference or InvalidIndex if not found.

Implements IReferenceList< ConceptElement >.

bool IndexValid ( Int32  index) const
virtual

Query if index is valid.

Parameters
indexZero-based index of the.
Returns
true if it valid.

Implements IReferenceList< ConceptElement >.

Reimplemented in BaseConceptStaticList.

void Insert ( Int32  index,
ConceptElement element 
)
virtual

Inserts a reference.

Parameters
indexIndex where to insert the reference.
elementThe element to insert.
Warning
Non-Deterministic: The inner list of elements may be extended that may lead to memory allocation. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.
RT Exceptions:
RT_ERROR_OUT_OF_BOUND_INDEX
Warning
Ownership: The element will be owned by the list. The element must be previously created on the heap. If element is created on the stack this will leads to ACCESS_VIOLATION exception because the element will be deleted twice. This kind of situation is hard to debug.

Implements IReferenceList< ConceptElement >.

bool IsNameUnique ( PCChar8  name,
ConceptElement element = NULL 
)

Query if 'name' is an unique name .

Parameters
nameThe element's name.
element[in,out] (optional) The ConceptElement& of the given name. Default is NULL.
Returns
true if name unique, false if not.

Warning : The uniqueness of the name is not checked by default in ConceptComponent

void Move ( Int32  index1,
Int32  index2 
)
virtual

Moves a reference.

Parameters
index1The reference index to move.
index2The destination index.
RT Exceptions:
RT_ERROR_OUT_OF_BOUND_INDEX

Implements IReferenceList< ConceptElement >.

Reimplemented in BaseConceptStaticList.

ConceptList& operator= ( const ConceptList right)

Assignment operator.

Parameters
rightThe right.
Returns
A shallow copy of this object.
ConceptElement& operator[] ( Int32  index) const
virtual

Array indexer operator.

Parameters
indexZero-based index of the reference.
Returns
The indexed reference.

Implements IReferenceList< ConceptElement >.

Int32 Remove ( const ConceptElement element)
virtual

Removes an reference at index.

Parameters
elementThe element to remove.
Returns
the index of the removed element or InvalidIndex if not found.
Warning
Non-Deterministic: Remove the element from the heap. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.
RT Exceptions:
RT_ERROR_OUT_OF_BOUND_INDEX

Implements IReferenceList< ConceptElement >.

void RemoveAt ( Int32  index)
virtual

Removes a reference at index.

Parameters
indexZero-based index of the reference.
RT Exceptions:
RT_ERROR_OUT_OF_BOUND_INDEX
Warning
Non-Deterministic: Remove the element from the heap. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.

Implements IReferenceList< ConceptElement >.

Reimplemented in BaseConceptStaticList.

ConceptElement& Swap ( ConceptElement element,
Int32  index 
)
virtual

Swaps.

Parameters
element[in,out] The element to swap.
indexZero-based index defining where to swap.
Returns
The removed element by the swap.
Warning
Don't forget to delete the returned element. Moreover check the name of the new element. It shouldn't be the same than other concept element in the list.

Implements IReferenceList< ConceptElement >.