IComponentType Class Referenceabstract

#include <Pt/Cosmo/IComponentType.h>

Component interface query. More...

Inherited by IComponentPlugin.

Public Member Functions

virtual ~IComponentType ()
 Destructor.
 
bool hasFeatureId (const char *featureId) const
 Returns true if the given feature ID is implemented. More...
 
const IEnumerable< const char * > & featureIds () const
 Returns the implemented feature IDs.
 
const char * classId () const
 Returns the class ID of the component.
 
template<typename I >
bool hasInterface () const
 Returns true if the interface is implemented.
 
template<typename I >
I * queryInterface (Component &c) const
 Returns the interface or null if not implemented. More...
 

Protected Member Functions

virtual bool onHasFeatureId (const char *featureId) const =0
 Returns true if the given feature ID is implemented.
 
virtual const IEnumerable< const char * > & onGetFeatureIds () const =0
 Returns the implemented feature IDs.
 
virtual const char * onGetClassId () const =0
 Returns the class ID of the component.
 
virtual bool onHasInterface (const std::type_info &ti) const =0
 Returns true if the interface is implemented.
 
virtual IUnknownonQueryInterface (Component &c, const std::type_info &ti) const =0
 Returns the interface or null if the interface is not implemented.
 

Detailed Description

Provides runtime type information for a component, including feature ID lookup, interface presence checks, and interface retrieval via queryInterface().

Member Function Documentation

◆ hasFeatureId()

bool hasFeatureId ( const char *  featureId) const
Parameters
featureIdThe feature ID to check.

◆ queryInterface()

I * queryInterface ( Component c) const
Parameters
cThe component instance to query.