Clarisse 5.0 SP8 SDK
5.0.5.8.0
|
This class defines a component interface. More...
Public Member Functions | |
bool | is_kindof (const CoreString &name) const |
Return true if the interface are related. | |
bool | is_kindof (const ComponentInterface &iface) const |
const CoreBasicArray< const ComponentInterface * > & | get_interfaces () const |
Return parent interfaces. | |
const unsigned int & | get_id () const |
Return the id of the schema. | |
const CoreString & | get_name () const |
Return the name of the interface. | |
const CoreString & | get_doc () const |
Return the documentation of the interface. | |
bool | add_property (const CoreString &name, const ComponentProperty::Type &type, const CoreString &doc="") |
Add a new property with the specified name and type. | |
bool | set_implementation (const CoreClassInfo &class_info, ComponentImplementation *impl) |
Set the implementation for a specific class to this interface. Unlike implementation set in ComponentSchema these implementation are called outside the context of schemas. | |
CoreArray < ComponentImplementation * > | get_implementations () const |
Get all implementations of this interface. | |
ComponentProxy | get_proxy (CoreBaseObject &instance) const |
Get the implementation for a specific class to this interface. | |
ComponentProxy | get_proxy (CoreBaseObject &instance, const CoreClassInfo &class_info) const |
unsigned int | find_property (const CoreString &name, const unsigned int &idx=0) const |
Return the index of the property. | |
const ComponentProperty & | get_property (const unsigned int &idx) const |
Return the property at the specified index. | |
const ComponentProperty & | get_property (const CoreString &name) const |
Return the first property named with the specified name. | |
const CoreVector < ComponentProperty > & | get_properties () const |
Return the properties defined in the interface. | |
const ComponentFactory & | get_factory () const |
Return the component factory. | |
![]() | |
bool | is_kindof (const CoreBaseObject &object) const |
virtual size_t | get_memory_size () const |
CoreString | get_class_info_name () const |
const unsigned long & | get_class_info_id () const |
virtual bool | is_kindof (const CoreClassInfo &cinfo) const |
virtual const CoreClassInfo & | get_class_info () const |
template<class T > | |
T * | cast () |
template<class T > | |
const T * | cast () const |
![]() | |
bool | is_kindof (const CoreClassInfo &cinfo) const |
Friends | |
class | ComponentFactory |
Additional Inherited Members | |
![]() | |
static const CoreClassInfo & | class_info () |
template<class T > | |
static T * | cast (CoreBaseObject *object) |
template<class T > | |
static const T * | cast (const CoreBaseObject *object) |
This class defines a component interface.
bool ComponentInterface::add_property | ( | const CoreString & | name, |
const ComponentProperty::Type & | type, | ||
const CoreString & | doc = "" |
||
) |
Add a new property with the specified name and type.
[in] | name | name of the property |
[in] | type | type of the property |
[in] | doc | brief documentation of the property |
unsigned int ComponentInterface::find_property | ( | const CoreString & | name, |
const unsigned int & | idx = 0 |
||
) | const |
Return the index of the property.
[in] | name | name of the property |
[in] | idx | starting index (useful if you need to iterate over properties sharing the same name). |
|
inline |
Return the property at the specified index.
[in] | idx | index of the property |
|
inline |
Return the first property named with the specified name.
[in] | name | name of the property |
ComponentProxy ComponentInterface::get_proxy | ( | CoreBaseObject & | instance | ) | const |
Get the implementation for a specific class to this interface.
[in] | instance | instance of a class for which an implementation of the interface is defined. |
bool ComponentInterface::set_implementation | ( | const CoreClassInfo & | class_info, |
ComponentImplementation * | impl | ||
) |
Set the implementation for a specific class to this interface. Unlike implementation set in ComponentSchema these implementation are called outside the context of schemas.
[in] | class_info | CoreClassInfo for which the implementation of the interface will be defined. |
[in] | impl | Pointer to a new instance providing an implementation to the interface for the specific class to get data in and out. |