This class defines an generic implementation for a generic interface (with or without schema).
More...
|
class | ComponentFactoryHandler |
|
This class defines an generic implementation for a generic interface (with or without schema).
- Note
- The implementation destruction is handled by the ComponentFactory and ComponentInterface. Do not use the same implementation pointer for multiple interfaces or schemas.
unsigned int ComponentImplementation::find_property |
( |
const CoreString & |
name, |
|
|
const unsigned int & |
idx = 0 |
|
) |
| const |
|
inline |
Return the index of the property.
- Parameters
-
[in] | name | name of the property |
[in] | idx | starting index (useful if you need to iterate over properties sharing the same name). |
- Returns
- The index of the property if found, otherwise return -1 (0xFFFFFFFF).
virtual unsigned int ComponentImplementation::get_component_count |
( |
const CoreBaseObject & |
instance | ) |
const |
|
inlinevirtual |
Method used to retrieve internal data of the callee organized in a ComponentCollection.
- Parameters
-
[in] | instance | instance to the object so it can access to its internal data |
[in] | indices | indices of requested components. Indices are assumed valid. |
[out] | components | components that will be properly filled. Components are assumed to match the requested size. |
- Returns
- false is not implemented
Implemented in ComponentStaticImplementation, and ComponentDebugImplementation.
Return the interface this class implements.
- Note
- Make sure to never share the pointer to another interface/schema.
- Returns
- the interface it implements. Return null if the implementation is not bound to any schema or interface
virtual bool ComponentImplementation::get_modified_components |
( |
const CoreBaseObject & |
instance, |
|
|
CoreVector< unsigned int > & |
modified_component_indices |
|
) |
| const |
|
inlinevirtual |
Return an array of the components that have been modified.
- Parameters
-
[in] | instance | instance to the object so it can access to its internal data |
[out] | modified_component_indices | indices of components that have been modified |
- Note
- This optionnal method is useful in order to automatically serialize modified components (to be reset after deserialization)
- Returns
- false if not implemented.
Return the schema this class implements.
- Note
- Make sure to never share the pointer to another interface/schema.
- Returns
- the schema it implements. Return null if the implementation is not bound to any schema or interface
virtual bool ComponentImplementation::get_static_components |
( |
ComponentCollection & |
components | ) |
const |
|
inlinevirtual |
Method used to retrieve static internal data of the callee organized in a ComponentCollection.
- Parameters
-
[out] | components | components that will be properly filled. Components are assumed to match the requested size. |
- Returns
- false is not implemented
Method used to set internal data of the callee.
- Parameters
-
[in] | instance | instance to the object so it can access to its internal data |
[in] | indices | component indices that are modified. Indices are assumed valid. |
[in] | components | components that have been modified. Components are assumed to match input indices size. |
- Returns
- false is not implemented