Program: bbtk
Module: $RCSfile: bbtkUserBlackBoxMacros.h,v $
Language: C++
- Date: $Date: 2008/02/05 11:07:43 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.7 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
public: \
inline static CLASS* bbNew(const std::string& name) \
{ \
- bbtkDebugMessageInc("Core",9,#CLASS<<"::bbNew(\""<<name<<"\")"<<std::endl); \
+ bbtkDebugMessageInc("Kernel",9,#CLASS<<"::bbNew(\""<<name<<"\")"<<std::endl); \
bbCreateDescriptorIfNeeded(); \
CLASS* c = new CLASS(name); \
- bbtkDebugDecTab("Core",9); \
+ bbtkDebugDecTab("Kernel",9); \
return c; \
} \
inline bbtk::BlackBox* bbClone(const std::string& name) \
{ \
- bbtkDebugMessageInc("Core",9,#CLASS<<"::bbClone(\""<<name<<"\")"<<std::endl); \
+ bbtkDebugMessageInc("Kernel",9,#CLASS<<"::bbClone(\""<<name<<"\")"<<std::endl); \
bbCreateDescriptorIfNeeded(); \
CLASS* c = new CLASS(*this,name); \
- bbtkDebugDecTab("Core",9); \
+ bbtkDebugDecTab("Kernel",9); \
return c; \
} \
bbtk::BlackBoxDescriptor* bbGetDescriptor() const \
//============================================================================
#define BBTK_BEGIN_BLACK_BOX_CONSTRUCTOR(CLASS,ALLOC) \
- bbtkDebugMessageInc("Core",7,#CLASS<<"::"<<#CLASS \
+ bbtkDebugMessageInc("Kernel",7,#CLASS<<"::"<<#CLASS \
<<"(\""<<bbGetName()<<"\")"<<std::endl); \
if (ALLOC) bbAllocateConnectors();
//============================================================================
//============================================================================
#define BBTK_BEGIN_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,FROM,ALLOC) \
- bbtkDebugMessageInc("Core",7,#CLASS<<"::"<<#CLASS \
+ bbtkDebugMessageInc("Kernel",7,#CLASS<<"::"<<#CLASS \
<<"("<<FROM.bbGetFullName()<<",\"" \
<<bbGetName()<<"\")"<<std::endl); \
if (ALLOC) \
//============================================================================
#define BBTK_END_BLACK_BOX_CONSTRUCTOR \
- bbtkDebugDecTab("Core",7)
+ bbtkDebugDecTab("Kernel",7)
//============================================================================
//============================================================================
#define BBTK_BEGIN_BLACK_BOX_DESTRUCTOR(CLASS) \
- bbtkDebugMessageInc("Core",7,#CLASS <<"::~"<< #CLASS \
+ bbtkDebugMessageInc("Kernel",7,#CLASS <<"::~"<< #CLASS \
<<"() ["<<this->bbGetFullName()<<"]"<<std::endl);
//============================================================================
//============================================================================
#define BBTK_END_BLACK_BOX_DESTRUCTOR \
- bbtkDebugDecTab("Core",7)
+ bbtkDebugDecTab("Kernel",7)
//============================================================================
} \
CLASS ## Descriptor() \
{ \
- bbtkDebugMessageInc("Core",9,#CLASS<<"Descriptor::"<<#CLASS \
+ bbtkDebugMessageInc("Kernel",9,#CLASS<<"Descriptor::"<<#CLASS \
<<"Descriptor()"<<std::endl)
//============================================================================
//============================================================================
/// Ends the UserBlackBox description block
#define BBTK_END_DESCRIBE_BLACK_BOX(CLASS) \
- bbtkDecTab("Core",9); \
+ bbtkDecTab("Kernel",9); \
} \
}; \
void CLASS::bbCreateDescriptorIfNeeded() \
//============================================================================
//============================================================================
-/// Declares the keywords of a UserBlackBox (to be put inside the UBB description block)
-#define BBTK_KEYWORD(KEYWORD) AddToKeyword(KEYWORD)
+/// Declares the categories of a UserBlackBox (to be put inside the UBB description block)
+#define BBTK_CATEGORY(CATEGORY) AddToCategory(CATEGORY)
//============================================================================
//============================================================================
/// Describes a UserBlackBox input (to be put inside the UBB description block)
#define BBTK_INPUT(CLASS,NAME,DESCR,TYPE) \
AddInputDescriptor(new bbtk::UserBlackBoxInputDescriptor \
- (#NAME,DESCR, \
+ (typeid(CLASS ## Descriptor), \
+ #NAME,DESCR, \
new bbtk::UserBlackBoxTGetFunctor<CLASS,TYPE,TYPE > \
(&CLASS::bbGetInput##NAME), \
new bbtk::UserBlackBoxTSetFunctor<CLASS,TYPE,TYPE > \
/// Describes a UserBlackBox output (to be put inside the UBB description block)
#define BBTK_OUTPUT(CLASS,NAME,DESCR,TYPE) \
AddOutputDescriptor(new bbtk::UserBlackBoxOutputDescriptor \
- (#NAME,DESCR, \
+ (typeid(CLASS ## Descriptor),#NAME,DESCR, \
new bbtk::UserBlackBoxTGetFunctor<CLASS,TYPE,TYPE > \
(&CLASS::bbGetOutput##NAME), \
new bbtk::UserBlackBoxTSetFunctor<CLASS,TYPE,TYPE > \
/// Describes a UserBlackBox input (to be put inside the UBB description block)
#define BBTK_INPUT_NOCOPY(CLASS,NAME,DESCR,TYPE) \
AddInputDescriptor(new bbtk::UserBlackBoxInputDescriptor \
- (#NAME,DESCR, \
+ (typeid(CLASS ## Descriptor),#NAME,DESCR, \
new bbtk::UserBlackBoxTGetFunctor<CLASS,TYPE,TYPE > \
(&CLASS::bbGetInput##NAME), \
new bbtk::UserBlackBoxTSetFunctor<CLASS,TYPE,TYPE > \
/// Describes a UserBlackBox output (to be put inside the UBB description block)
#define BBTK_OUTPUT_NOCOPY(CLASS,NAME,DESCR,TYPE) \
AddOutputDescriptor(new bbtk::UserBlackBoxOutputDescriptor \
- (#NAME,DESCR, \
+ (typeid(CLASS ## Descriptor),#NAME,DESCR, \
new bbtk::UserBlackBoxTGetFunctor<CLASS,TYPE,TYPE > \
(&CLASS::bbGetOutput##NAME), \
new bbtk::UserBlackBoxTSetFunctor<CLASS,TYPE,TYPE > \
} \
CLASS ## Descriptor() \
{ \
- bbtkDebugMessageInc("Core",9,#CLASS<<"Descriptor::"<<#CLASS \
+ bbtkDebugMessageInc("Kernel",9,#CLASS<<"Descriptor::"<<#CLASS \
<<"Descriptor()"<<std::endl)
//============================================================================
//============================================================================
/// Ends a template UserBlackBox of template param T description block
#define BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(CLASS) \
- bbtkDecTab("Core",9); \
+ bbtkDecTab("Kernel",9); \
} \
}; \
template <class T> \
/// Describes a template UserBlackBox input (to be put inside the template UBB description block)
#define BBTK_TEMPLATE_INPUT(CLASS,NAME,DESCR,TYPE) \
AddInputDescriptor(new bbtk::UserBlackBoxInputDescriptor \
- (#NAME,DESCR, \
+ (typeid(CLASS ## Descriptor),#NAME,DESCR, \
new bbtk::UserBlackBoxTGetFunctor<CLASS<T>,TYPE,TYPE > \
(&CLASS<T>::bbGetInput##NAME), \
new bbtk::UserBlackBoxTSetFunctor<CLASS<T>,TYPE,TYPE > \
/// Describes a template UserBlackBox output (to be put inside the template UBB description block)
#define BBTK_TEMPLATE_OUTPUT(CLASS,NAME,DESCR,TYPE) \
AddOutputDescriptor(new bbtk::UserBlackBoxOutputDescriptor \
- (#NAME,DESCR, \
+ (typeid(CLASS ## Descriptor),#NAME,DESCR, \
new bbtk::UserBlackBoxTGetFunctor<CLASS<T>,TYPE,TYPE > \
(&CLASS<T>::bbGetOutput##NAME), \
new bbtk::UserBlackBoxTSetFunctor<CLASS<T>,TYPE,TYPE > \
} \
CLASS ## Descriptor() \
{ \
- bbtkDebugMessageInc("Core",9,#CLASS<<"Descriptor::"<<#CLASS \
+ bbtkDebugMessageInc("Kernel",9,#CLASS<<"Descriptor::"<<#CLASS \
<<"Descriptor()"<<std::endl)
//============================================================================
//============================================================================
/// Ends a template UserBlackBox description block of template param T1 and T2
#define BBTK_END_DESCRIBE_TEMPLATE2_BLACK_BOX(CLASS) \
- bbtkDecTab("Core",9); \
+ bbtkDecTab("Kernel",9); \
} \
}; \
template <class T1, class T2> \
} \
CLASS ## Descriptor() \
{ \
- bbtkDebugMessageInc("Core",9,#CLASS<<"Descriptor::"<<#CLASS \
+ bbtkDebugMessageInc("Kernel",9,#CLASS<<"Descriptor::"<<#CLASS \
<<"Descriptor()"<<std::endl)
//============================================================================
//============================================================================
/// Ends a template UserBlackBox description block of template param T1 and T2
#define BBTK_END_DESCRIBE_TEMPLATE2_WITH_TYPES_BLACK_BOX(CLASS,TYPE1,TYPE2) \
- bbtkDecTab("Core",9); \
+ bbtkDecTab("Kernel",9); \
} \
}; \
template <TYPE1 T1, TYPE2 T2> \
/// Describes a 2 template params UserBlackBox input (to be put inside the UBB description block)
#define BBTK_TEMPLATE2_INPUT(CLASS,NAME,DESCR,TYPE) \
AddInputDescriptor(new bbtk::UserBlackBoxInputDescriptor \
- (#NAME,DESCR, \
+ (typeid(CLASS ## Descriptor),#NAME,DESCR, \
new bbtk::UserBlackBoxTGetFunctor<CLASS<T1,T2>,TYPE,TYPE > \
(&CLASS<T1,T2>::bbGetInput##NAME), \
new bbtk::UserBlackBoxTSetFunctor<CLASS<T1,T2>,TYPE,TYPE > \
/// Describes a 2 template params UserBlackBox output (to be put inside the UBB description block)
#define BBTK_TEMPLATE2_OUTPUT(CLASS,NAME,DESCR,TYPE) \
AddOutputDescriptor(new bbtk::UserBlackBoxOutputDescriptor \
- (#NAME,DESCR, \
+ (typeid(CLASS ## Descriptor),#NAME,DESCR, \
new bbtk::UserBlackBoxTGetFunctor<CLASS<T1,T2>,TYPE,TYPE > \
(&CLASS<T1,T2>::bbGetOutput##NAME), \
new bbtk::UserBlackBoxTSetFunctor<CLASS<T1,T2>,TYPE,TYPE > \