Honeycomb  0.1
Component-Model Framework
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
honey::Component Class Referenceabstract

Base class for components. Components can only be attached to one ComObject at a time. More...

#include <Component.h>

Inheritance diagram for honey::Component:
Inheritance graph
[legend]
Collaboration diagram for honey::Component:
Collaboration graph
[legend]

Public Types

typedef SharedPtr< ComponentPtr
 
typedef SharedPtr< const ComponentConstPtr
 

Public Member Functions

 Component ()
 
virtual ~Component ()
 
virtual const ComRegistry::TypecomType () const =0
 Get type of component. More...
 
virtual void setInstId (const Id &id)
 Override from object, updates ComObject map. More...
 
ComObjectobj () const
 Get ComObject that this component belongs to. More...
 
bool hasObj () const
 Check if component is attached to a ComObject. More...
 
ListenerListlisteners ()
 Get listener list. More...
 
- Public Member Functions inherited from honey::Object
 Object (const Id &id=idnull)
 
virtual ~Object ()
 
const IdgetInstId () const
 
- Public Member Functions inherited from honey::SharedObj< Object >
 SharedObj (Alloc &&a=Alloc()) debug_if(
 Construct with allocator that is called to deallocate this shared object when all references have been released. More...
 

Protected Member Functions

virtual void onComInsert ()
 Called after component is inserted into ComObj. More...
 
virtual void onComRemove ()
 Called before component is removed from ComObj. More...
 
- Protected Member Functions inherited from honey::SharedObj< Object >
void finalize ()
 Destroys object. Called when strong reference count reaches 0. May be overridden to prevent destruction. More...
 

Static Protected Member Functions

static ComRegistry::DepNode createTypeDep ()
 Called when dep graph is built to determine component type dependencies. May be overridden by subclass. More...
 

Friends

class ComRegistry
 
class ComObject
 

Additional Inherited Members

- Protected Attributes inherited from honey::Object
Id _instId
 

Detailed Description

Base class for components. Components can only be attached to one ComObject at a time.

Member Typedef Documentation

Constructor & Destructor Documentation

honey::Component::Component ( )
inline
virtual honey::Component::~Component ( )
inlinevirtual

Member Function Documentation

virtual const ComRegistry::Type& honey::Component::comType ( ) const
pure virtual

Get type of component.

static ComRegistry::DepNode honey::Component::createTypeDep ( )
inlinestaticprotected

Called when dep graph is built to determine component type dependencies. May be overridden by subclass.

bool honey::Component::hasObj ( ) const
inline

Check if component is attached to a ComObject.

ListenerList& honey::Component::listeners ( )
inline

Get listener list.

ComObject& honey::Component::obj ( ) const
inline

Get ComObject that this component belongs to.

virtual void honey::Component::onComInsert ( )
inlineprotectedvirtual

Called after component is inserted into ComObj.

virtual void honey::Component::onComRemove ( )
inlineprotectedvirtual

Called before component is removed from ComObj.

void honey::Component::setInstId ( const Id id)
virtual

Override from object, updates ComObject map.

Reimplemented from honey::Object.

Friends And Related Function Documentation

friend class ComObject
friend
friend class ComRegistry
friend

The documentation for this class was generated from the following files: