Honeycomb  0.1
Component-Model Framework
Classes | Namespaces | Macros | Functions
Component.h File Reference
#include "Honey/Object/Object.h"
#include "Honey/Object/ListenerList.h"
#include "Honey/Graph/Tree.h"
#include "Honey/Graph/Dep.h"
Include dependency graph for Component.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  honey::ComRegistry
 Holds global list of all component types. More...
 
class  honey::ComRegistry::Type
 Component type. More...
 
class  honey::Component
 Base class for components. Components can only be attached to one ComObject at a time. More...
 

Namespaces

 honey
 Global Honeycomb namespace.
 
 honey::component
 Component methods.
 

Macros

#define COMPONENT(...)    EVAL(TOKCAT(COMPONENT_, NUMARGS(__VA_ARGS__))(__VA_ARGS__))
 Forwards to COMPONENT_#args. More...
 
#define COMPONENT_1(Class)    COMPONENT_2(Class, #Class)
 Declare a component. Call inside class definition. More...
 
#define COMPONENT_2(Class, typeId)    COMPONENT_SUB(, Class, typeId)
 Declare a component with a custom type id. More...
 
#define COMPONENT_SUB(...)    EVAL(TOKCAT(COMPONENT_SUB_, NUMARGS(__VA_ARGS__))(__VA_ARGS__))
 Forwards to COMPONENT_SUB_#args. More...
 
#define COMPONENT_SUB_2(SuperCom, Class)    COMPONENT_SUB_3(SuperCom, Class, #Class)
 Declare a derived component that inherits from component class SuperCom. A derived component can be typecasted to its super component. More...
 
#define COMPONENT_SUB_3(SuperCom, Class, typeId)
 Declare a derived component with a custom type id. More...
 
#define COMPONENT_REG(Class)    static mt::Void TOKCAT(__comReg_,__COUNTER__)(UNBRACKET(Class)::__comReg());
 Register a component class. Call outside class definition. More...
 
#define COMPONENT_REG_T(Template, Class)    UNBRACKET(Template) mt::Void UNBRACKET(Class)::__comReg_t(__comReg());
 Register a templated component class. Call outside class definition. More...
 

Functions

template<class Com >
std::enable_if< std::is_default_constructible< Com >::value &&!std::is_abstract< Com >::value, Component & >::type honey::component::create ()
 Called by registry to create a component. May be specialized for a component type. More...
 
template<class Com >
mt::disable_if< std::is_default_constructible< Com >::value &&!std::is_abstract< Com >::value, Component & >::type honey::component::create ()