Program: bbtk
Module: $RCSfile: bbtkBlackBoxDescriptor.cxx,v $
Language: C++
- Date: $Date: 2008/02/06 09:27:52 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.9 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "bbtkMessageManager.h"
#include "bbtkPackage.h"
#include "bbtkUtilities.h"
+#include "bbtkUserBlackBoxDescriptor.h"
+#include "bbtkWxBlackBox.h"
namespace bbtk
{
<< author << "</TD></TR>\n";
(s) << "<TR><TD style='vertical-align: top;'><b> Category(s) </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'> "
<< category << "</TD></TR>\n";
- (s) << "<TR><TD style='vertical-align: top;'><b> Include </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'> "
+ (s) << "<TR><TD style='vertical-align: top;'><b> To use it </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'> include "
<< GetPackage()->GetName() << "</TD></TR>\n";
(s) << "</TABLE>\n";
//-------------
// Inputs
- std::string col("#CCCCFF");
-
+ std::string titlecol("#BBBBFF");
+ std::string usercol("#FFFFFF");
+ std::string ubbcol("#DDFFFF");
+ std::string wxbbcol("#EEFFFF");
+
+
// (s) << "<h3 class=\"subsection\">Inputs</h3>\n";
(s) << "<p><TABLE border=1 cellspacing=0 cellpadding=3>\n";
- (s) << "<TR><TD colspan=3 align=center bgcolor=\""<<col
+ (s) << "<TR><TD colspan=3 align=center bgcolor=\""<<titlecol
<<"\">Inputs</TD></TR>\n";
+
+ std::vector<std::string> user_defined;
+ std::vector<std::string> ubb_defined;
+ std::vector<std::string> wxbb_defined;
+
const BlackBoxDescriptor::InputDescriptorMapType& imap =
GetInputDescriptorMap();
-
InputDescriptorMapType::const_iterator in;
-
for ( in = imap.begin(); in != imap.end(); ++in )
{
- std::string name(in->second->GetName());
- Utilities::html_format(name);
-
- std::string type("<");
- type += in->second->GetTypeName();
- type += ">";
- Utilities::html_format(type);
+ // Skips system-defined inputs
+ std::string col(usercol);
+ int iotype = 0;
+ if (in->second->GetCreatorTypeInfo() ==
+ typeid(UserBlackBoxDescriptor))
+ {
+ col = ubbcol;
+ iotype = 1;
+ }
+ else if (in->second->GetCreatorTypeInfo() ==
+ typeid(WxBlackBoxDescriptor))
+ {
+ col = wxbbcol;
+ iotype = 2;
+ }
- std::string descr(in->second->GetDescription());
- //Utilities::html_format(descr);
-
- (s) << "<TR><TD style='vertical-align: top;'><B><PRE> "<<name<<" </PRE></B></TD>"
- << "<TD style='vertical-align: top;'><I><PRE> "<<type<<" </PRE></I></TD>"
- << "<TD style='vertical-align: top;'>"<<descr<<"</TD></TR>\n";
-
+ std::string name(in->second->GetName());
+ Utilities::html_format(name);
+
+ std::string type("<");
+ type += in->second->GetTypeName();
+ type += ">";
+ Utilities::html_format(type);
+
+ std::string descr(in->second->GetDescription());
+ //Utilities::html_format(descr);
+
+ std::string out =
+ "<TR><TD style='vertical-align: top;' bgcolor=\"" + col
+ +"\"><B><PRE> "+name+" </PRE></B></TD>"
+ + "<TD style='vertical-align: top;' bgcolor=\""+col
+ +"\"><I><PRE> "+type+" </PRE></I></TD>"
+ + "<TD style='vertical-align: top;' bgcolor=\""+col
+ +"\">"+descr+"</TD></TR>\n";
+
+ if (iotype==0) user_defined.push_back(out);
+ else if (iotype==1) ubb_defined.push_back(out);
+ else if (iotype==2) wxbb_defined.push_back(out);
+
}
- // (s) << "</TABLE>\n";
-
-
+
+ std::vector<std::string>::iterator hi;
+ for (hi=user_defined.begin();hi!=user_defined.end();++hi) s << *hi;
+ for (hi=wxbb_defined.begin();hi!=wxbb_defined.end();++hi) s << *hi;
+ for (hi=ubb_defined.begin();hi!=ubb_defined.end();++hi) s << *hi;
+
+ user_defined.clear();
+ ubb_defined.clear();
+ wxbb_defined.clear();
+
//-------------
// Outputs
// (s) << "<h3 class=\"subsection\">Outputs</h3>\n";
// (s) << "<TABLE border=1 cellspacing=0>\n";
- (s) << "<TR><TD colspan=3 align=center bgcolor=\""<<col
+ (s) << "<TR><TD colspan=3 align=center bgcolor=\""<<titlecol
<<"\">Outputs</TD></TR>\n";
const BlackBoxDescriptor::OutputDescriptorMapType& omap =
BlackBoxDescriptor::OutputDescriptorMapType::const_iterator o;
for ( o = omap.begin(); o != omap.end(); ++o )
- {
- std::string name(o->second->GetName());
- Utilities::html_format(name);
-
- std::string type("<");
- type += o->second->GetTypeName();
- type += ">";
- Utilities::html_format(type);
+ {
+ std::string col(usercol);
+ int iotype = 0;
+ if (o->second->GetCreatorTypeInfo() ==
+ typeid(UserBlackBoxDescriptor))
+ {
+ col = ubbcol;
+ iotype = 1;
+ }
+ else if (o->second->GetCreatorTypeInfo() ==
+ typeid(WxBlackBoxDescriptor))
+ {
+ col = wxbbcol;
+ iotype = 2;
+ }
- std::string descr(o->second->GetDescription());
- //Utilities::html_format(descr);
+ std::string name(o->second->GetName());
+ Utilities::html_format(name);
+ std::string type("<");
+ type += o->second->GetTypeName();
+ type += ">";
+ Utilities::html_format(type);
- (s) << "<TR><TD style='vertical-align: top;'><B><PRE> "<<name<<" </PRE></B></TD>"
- << "<TD style='vertical-align: top;'><I><PRE> "<<type<<" </PRE></I></TD>"
- << "<TD style='vertical-align: top;'>"<<descr<<"</TD></TR>\n";
+ std::string descr(o->second->GetDescription());
+ //Utilities::html_format(descr);
- }
- (s) << "</TABLE>\n";
+ std::string out =
+ "<TR><TD style='vertical-align: top;' bgcolor=\"" + col
+ +"\"><B><PRE> "+name+" </PRE></B></TD>"
+ + "<TD style='vertical-align: top;' bgcolor=\""+col
+ +"\"><I><PRE> "+type+" </PRE></I></TD>"
+ + "<TD style='vertical-align: top;' bgcolor=\""+col
+ +"\">"+descr+"</TD></TR>\n";
+
+ if (iotype==0) user_defined.push_back(out);
+ else if (iotype==1) ubb_defined.push_back(out);
+ else if (iotype==2) wxbb_defined.push_back(out);
+
+ }
+
+ for (hi=user_defined.begin();hi!=user_defined.end();++hi) s << *hi;
+ for (hi=wxbb_defined.begin();hi!=wxbb_defined.end();++hi) s << *hi;
+ for (hi=ubb_defined.begin();hi!=ubb_defined.end();++hi) s << *hi;
+ (s) << "</TABLE>\n";
+
//------------
// End
Program: bbtk
Module: $RCSfile: bbtkBlackBoxDescriptor.h,v $
Language: C++
- Date: $Date: 2008/02/05 12:16:55 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.5 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::string mAuthor;
/// The category of the black box
std::string mCategory;
- /// The kind of box
+ /// The kind of box (standard / adaptor)
Kind mKind;
/// The Package to which the box belongs
Package *mPackage;
Program: bbtk
Module: $RCSfile: bbtkBlackBoxInputDescriptor.h,v $
Language: C++
- Date: $Date: 2008/01/22 15:02:00 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
namespace bbtk
{
-
-
class BBTK_EXPORT BlackBoxInputDescriptor
{
public:
/// Ctor with name and description
- BlackBoxInputDescriptor( const std::string& name,
- const std::string& description,
- OptionType option = MANDATORY,
- bool copy_construct = true)
- : mName(name), mDescription(description),
+ BlackBoxInputDescriptor(TypeInfo creator_type_info,
+ const std::string& name,
+ const std::string& description,
+ OptionType option = MANDATORY,
+ bool copy_construct = true)
+ : mCreatorTypeInfo(creator_type_info),
+ mName(name), mDescription(description),
mOption(option), mCopyConstruct(copy_construct)
{}
+ /// Returns the TypeInfo of the BlackBoxDescriptor which created this descriptor
+ TypeInfo GetCreatorTypeInfo() { return mCreatorTypeInfo; }
/// Returns the name of the input
const std::string& GetName() const { return mName; }
/// Returns the description of the input
private:
/// Default ctor is private
- BlackBoxInputDescriptor() : mName(""), mDescription(""),
+ BlackBoxInputDescriptor() : mCreatorTypeInfo(typeid(void)),
+ mName(""), mDescription(""),
mOption(OPTIONAL) {}
+
+ /// The TypeInfo of the BlackBoxDescriptor which created this descriptor
+ TypeInfo mCreatorTypeInfo;
/// The name of the input
std::string mName;
/// The description of the input
Program: bbtk
Module: $RCSfile: bbtkBlackBoxOutputDescriptor.h,v $
Language: C++
- Date: $Date: 2008/01/22 15:02:00 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
namespace bbtk
{
-
class BBTK_EXPORT BlackBoxOutputDescriptor
{
public:
/// Ctor with name and description
- BlackBoxOutputDescriptor( const std::string& name,
+ BlackBoxOutputDescriptor( TypeInfo creator_type_info,
+ const std::string& name,
const std::string& description,
bool copy_construct = true)
- : mName(name), mDescription(description),
+ : mCreatorTypeInfo(creator_type_info),
+ mName(name), mDescription(description),
mCopyConstruct(copy_construct)
{}
-
+
+ /// Returns the TypeInfo of the BlackBoxDescriptor which created this descriptor
+ TypeInfo GetCreatorTypeInfo() { return mCreatorTypeInfo; }
/// Returns the name of the output
const std::string& GetName() const { return mName; }
/// Returns the description of the output
private:
/// Default ctor is private
- BlackBoxOutputDescriptor() : mName(""), mDescription("") {}
+ BlackBoxOutputDescriptor() : mCreatorTypeInfo(typeid(void)),
+ mName(""), mDescription("") {}
+
+ /// The TypeInfo of the BlackBoxDescriptor which created this descriptor
+ TypeInfo mCreatorTypeInfo;
/// The name of the output
std::string mName;
/// The description of the output
Program: bbtk
Module: $RCSfile: bbtkComplexBlackBoxDescriptor.cxx,v $
Language: C++
- Date: $Date: 2008/02/05 13:23:46 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.5 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
bbtkDebugMessageInc("Kernel",9,"ComplexBlackBoxDescriptor::ComplexBlackBoxDescriptor(\""<<name<<"\")"<<std::endl);
SetTypeName(name);
+ AddToCategory("script");
mPrototype = new ComplexBlackBox(name+std::string("Prototype"),this);
bbtkDebugDecTab("Kernel",9);
}
<<input<<"\"");
}
- AddInputDescriptor ( new ComplexBlackBoxInputDescriptor ( name,
- help,
- box,
- input,
- bb->bbGetInputType(input)));
-
+ AddInputDescriptor ( new ComplexBlackBoxInputDescriptor
+ ( typeid(ComplexBlackBoxDescriptor),
+ name,
+ help,
+ box,
+ input,
+ bb->bbGetInputType(input)));
+
bbtkDebugDecTab("Kernel",5);
}
}
AddOutputDescriptor ( new ComplexBlackBoxOutputDescriptor
- ( name,
+ ( typeid(ComplexBlackBoxDescriptor),
+ name,
help,
box,
output,
std::string inc = GetScriptFileName();
if (inc.size()>0)
{
- (s) << "<TR><TD style='vertical-align: top;'><b> Include </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'> "
+ (s) << "<TR><TD style='vertical-align: top;'><b> Use command </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'> include "
<< inc << "</TD></TR>\n";
}
Program: bbtk
Module: $RCSfile: bbtkComplexBlackBoxInputDescriptor.cxx,v $
Language: C++
- Date: $Date: 2008/02/05 13:23:46 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
- ComplexBlackBoxInputDescriptor::ComplexBlackBoxInputDescriptor( const std::string& name,
- const std::string& description,
- const std::string& target,
- const std::string& input,
-TypeInfo type)
+ ComplexBlackBoxInputDescriptor::
+ ComplexBlackBoxInputDescriptor( TypeInfo creator_type_info,
+ const std::string& name,
+ const std::string& description,
+ const std::string& target,
+ const std::string& input,
+ TypeInfo type)
:
- BlackBoxInputDescriptor(name,description),
+ BlackBoxInputDescriptor(creator_type_info,name,description),
mTarget(target),
mInput(input),
mType(type)
Program: bbtk
Module: $RCSfile: bbtkComplexBlackBoxInputDescriptor.h,v $
Language: C++
- Date: $Date: 2008/01/22 15:02:00 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
- class BBTK_EXPORT ComplexBlackBoxInputDescriptor : public bbtk::BlackBoxInputDescriptor
+ class BBTK_EXPORT ComplexBlackBoxInputDescriptor :
+ public bbtk::BlackBoxInputDescriptor
{
public:
- ComplexBlackBoxInputDescriptor( const std::string& name,
+ ComplexBlackBoxInputDescriptor( TypeInfo creator_type_info,
+ const std::string& name,
const std::string& description,
const std::string& target,
const std::string& input,
private:
/// Default ctor is private
- ComplexBlackBoxInputDescriptor() : BlackBoxInputDescriptor("",""),
- mType(typeid(void)) {}
+ ComplexBlackBoxInputDescriptor() :
+ BlackBoxInputDescriptor(typeid(void),"",""),
+ mType(typeid(void)) {}
std::string mTarget;
std::string mInput;
TypeInfo mType;
Program: bbtk
Module: $RCSfile: bbtkComplexBlackBoxOutputDescriptor.cxx,v $
Language: C++
- Date: $Date: 2008/02/05 13:23:46 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
- ComplexBlackBoxOutputDescriptor::ComplexBlackBoxOutputDescriptor( const std::string& name,
- const std::string& description,
- const std::string& target,
- const std::string& output,
- TypeInfo type)
+ ComplexBlackBoxOutputDescriptor::
+ ComplexBlackBoxOutputDescriptor( TypeInfo creator_type_info,
+ const std::string& name,
+ const std::string& description,
+ const std::string& target,
+ const std::string& output,
+ TypeInfo type)
:
- BlackBoxOutputDescriptor(name,description),
+ BlackBoxOutputDescriptor(creator_type_info,name,description),
mTarget(target),
mOutput(output),
mType(type)
Program: bbtk
Module: $RCSfile: bbtkComplexBlackBoxOutputDescriptor.h,v $
Language: C++
- Date: $Date: 2008/01/22 15:02:00 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
- class BBTK_EXPORT ComplexBlackBoxOutputDescriptor : public bbtk::BlackBoxOutputDescriptor
+ class BBTK_EXPORT ComplexBlackBoxOutputDescriptor :
+ public bbtk::BlackBoxOutputDescriptor
{
public:
- ComplexBlackBoxOutputDescriptor( const std::string& name,
+ ComplexBlackBoxOutputDescriptor( TypeInfo creator_type_info,
+ const std::string& name,
const std::string& description,
const std::string& target,
const std::string& output,
private:
/// Default ctor is private
ComplexBlackBoxOutputDescriptor() :
- BlackBoxOutputDescriptor("",""), mType(typeid(void)) {}
+ BlackBoxOutputDescriptor(typeid(void),"",""),
+ mType(typeid(void)) {}
std::string mTarget;
std::string mOutput;
TypeInfo mType;
Program: bbtk
Module: $RCSfile: bbtkUserBlackBoxDescriptor.h,v $
Language: C++
- Date: $Date: 2008/01/22 15:02:00 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
public:
UserBlackBoxDescriptor()
{
- AddInputDescriptor(new bbtk::UserBlackBoxInputDescriptor("BoxProcessMode",
- "Set the process mode of the box (Pipeline | Always | Reactive)",
- new bbtk::UserBlackBoxTGetFunctor<BlackBox,std::string,std::string>(&BlackBox::bbGetInputBoxProcessMode),
- new bbtk::UserBlackBoxTSetFunctor<BlackBox,std::string,std::string>(&BlackBox::bbSetInputBoxProcessMode) ) );
- AddInputDescriptor(new bbtk::UserBlackBoxInputDescriptor("BoxExecute",
- "Any change signal received by this input executes the box",
- new bbtk::UserBlackBoxTGetFunctor<BlackBox,Void,Void>(&BlackBox::bbGetInputBoxExecute),
- new bbtk::UserBlackBoxTSetFunctor<BlackBox,Void,Void>(&BlackBox::bbSetInputBoxExecute) ) );
-
- AddOutputDescriptor(new bbtk::UserBlackBoxOutputDescriptor("BoxChange",
- "Propagates modification of the box",
- new bbtk::UserBlackBoxTGetFunctor<BlackBox,Void,Void>(&BlackBox::bbGetOutputBoxChange),
- new bbtk::UserBlackBoxTSetFunctor<BlackBox,Void,Void>(&BlackBox::bbSetOutputBoxChange) ) );
+ // Creates the input 'BoxProcessMode'
+ AddInputDescriptor
+ (new
+ bbtk::UserBlackBoxInputDescriptor
+ (typeid(UserBlackBoxDescriptor),
+ "BoxProcessMode",
+ "Sets the processing mode of the box (Pipeline | Always | Reactive)",
+ new bbtk::UserBlackBoxTGetFunctor<BlackBox,std::string,std::string>(&BlackBox::bbGetInputBoxProcessMode),
+ new bbtk::UserBlackBoxTSetFunctor<BlackBox,std::string,std::string>(&BlackBox::bbSetInputBoxProcessMode) ) );
+ // Creates the input 'BoxExecute'
+ AddInputDescriptor
+ (new
+ bbtk::UserBlackBoxInputDescriptor
+ (typeid(UserBlackBoxDescriptor),
+ "BoxExecute",
+ "Any signal received by this input executes the box",
+ new bbtk::UserBlackBoxTGetFunctor<BlackBox,Void,Void>(&BlackBox::bbGetInputBoxExecute),
+ new bbtk::UserBlackBoxTSetFunctor<BlackBox,Void,Void>(&BlackBox::bbSetInputBoxExecute) ) );
+ // Creates the output 'BoxChange'
+ AddOutputDescriptor
+ (new
+ bbtk::UserBlackBoxOutputDescriptor
+ (typeid(UserBlackBoxDescriptor),
+ "BoxChange",
+ "Signal modifications of the box",
+ new bbtk::UserBlackBoxTGetFunctor<BlackBox,Void,Void>(&BlackBox::bbGetOutputBoxChange),
+ new bbtk::UserBlackBoxTSetFunctor<BlackBox,Void,Void>(&BlackBox::bbSetOutputBoxChange) ) );
}
};
Program: bbtk
Module: $RCSfile: bbtkUserBlackBoxInputDescriptor.cxx,v $
Language: C++
- Date: $Date: 2008/02/05 13:23:46 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
namespace bbtk
{
- UserBlackBoxInputDescriptor::UserBlackBoxInputDescriptor( const std::string& name,
- const std::string& description,
- UserBlackBoxGetFunctor* getfunctor,
- UserBlackBoxSetFunctor* setfunctor,
- bool copy_construct)
+ UserBlackBoxInputDescriptor::
+ UserBlackBoxInputDescriptor( TypeInfo creator_type_info,
+ const std::string& name,
+ const std::string& description,
+ UserBlackBoxGetFunctor* getfunctor,
+ UserBlackBoxSetFunctor* setfunctor,
+ bool copy_construct)
:
- BlackBoxInputDescriptor(name,description,MANDATORY,copy_construct),
+ BlackBoxInputDescriptor(creator_type_info,
+ name,description,MANDATORY,copy_construct),
mGetFunctor(getfunctor),
mSetFunctor(setfunctor)
{
Program: bbtk
Module: $RCSfile: bbtkUserBlackBoxInputDescriptor.h,v $
Language: C++
- Date: $Date: 2008/01/22 15:02:00 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
- class BBTK_EXPORT UserBlackBoxInputDescriptor : public bbtk::BlackBoxInputDescriptor
+ class BBTK_EXPORT UserBlackBoxInputDescriptor :
+ public bbtk::BlackBoxInputDescriptor
{
public:
//typedef enum {
//} InputType;
- UserBlackBoxInputDescriptor( const std::string& name,
+ UserBlackBoxInputDescriptor( TypeInfo creator_type_info,
+ const std::string& name,
const std::string& description,
UserBlackBoxGetFunctor* getfunctor,
UserBlackBoxSetFunctor* setfunctor,
private:
/// Default ctor is private
- UserBlackBoxInputDescriptor() : BlackBoxInputDescriptor("","") {}
+ UserBlackBoxInputDescriptor() :
+ BlackBoxInputDescriptor(typeid(void),"","") {}
/// The functor on the Get method
UserBlackBoxGetFunctor* mGetFunctor;
/// The functor on the Set method
Program: bbtk
Module: $RCSfile: bbtkUserBlackBoxMacros.h,v $
Language: C++
- Date: $Date: 2008/02/05 13:23:46 $
- Version: $Revision: 1.6 $
+ 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
/// 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 > \
/// 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 > \
/// 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 > \
Program: bbtk
Module: $RCSfile: bbtkUserBlackBoxOutputDescriptor.cxx,v $
Language: C++
- Date: $Date: 2008/02/05 13:23:46 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
- UserBlackBoxOutputDescriptor::UserBlackBoxOutputDescriptor( const std::string& name,
- const std::string& description,
- UserBlackBoxGetFunctor* getfunctor,
- UserBlackBoxSetFunctor* setfunctor,
- bool copy_construct )
+ UserBlackBoxOutputDescriptor::
+ UserBlackBoxOutputDescriptor( TypeInfo creator_type_info,
+ const std::string& name,
+ const std::string& description,
+ UserBlackBoxGetFunctor* getfunctor,
+ UserBlackBoxSetFunctor* setfunctor,
+ bool copy_construct )
:
- BlackBoxOutputDescriptor(name,description,copy_construct),
+ BlackBoxOutputDescriptor(creator_type_info,
+ name,description,copy_construct),
mGetFunctor(getfunctor),
mSetFunctor(setfunctor)
{
Program: bbtk
Module: $RCSfile: bbtkUserBlackBoxOutputDescriptor.h,v $
Language: C++
- Date: $Date: 2008/01/22 15:02:00 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
- class BBTK_EXPORT UserBlackBoxOutputDescriptor : public bbtk::BlackBoxOutputDescriptor
+ class BBTK_EXPORT UserBlackBoxOutputDescriptor :
+ public bbtk::BlackBoxOutputDescriptor
{
public:
- UserBlackBoxOutputDescriptor( const std::string& name,
+ UserBlackBoxOutputDescriptor( TypeInfo creator_type_info,
+ const std::string& name,
const std::string& description,
UserBlackBoxGetFunctor* getfunctor,
UserBlackBoxSetFunctor* setfunctor,
private:
/// Default ctor is private
- UserBlackBoxOutputDescriptor() : BlackBoxOutputDescriptor("","") {}
+ UserBlackBoxOutputDescriptor() :
+ BlackBoxOutputDescriptor(typeid(void),"","") {}
/// The functor on the Get method
UserBlackBoxGetFunctor* mGetFunctor;
/// The functor on the Set method
Program: bbtk
Module: $RCSfile: bbtkWxBlackBox.h,v $
Language: C++
- Date: $Date: 2008/01/28 14:32:54 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2008/02/06 14:14:22 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// UserBlackBox description
BBTK_BEGIN_DESCRIBE_BLACK_BOX(WxBlackBox,bbtk::UserBlackBox);
BBTK_NAME("WxBlackBox");
- // BBTK_INPUT_NOCOPY(WxBlackBox,WinParent,"Parent widget box",
- // WxParentToChildData*);
+ BBTK_DESCRIPTION("Widget box. The inputs marked with (*) are only used if the widget is not inserted in another widget.\n");
+ BBTK_CATEGORY("widget");
BBTK_INPUT(WxBlackBox,WinTitle,
- "Title of the window (only used if the box is the top window of a Parent-Child hierarchy)",
+ "Title of the window (*)",
std::string);
BBTK_INPUT(WxBlackBox,WinWidth,
- "Width of the window (only used if the box is the top window of a Parent-Child hierarchy)",int);
+ "Width of the window (*)",int);
BBTK_INPUT(WxBlackBox,WinHeight,
- "Height of the window (only used if the box is the top window of a Parent-Child hierarchy)",int);
+ "Height of the window (*)",int);
BBTK_INPUT(WxBlackBox,WinDialog,
- "Set to 'true' to have a dialog window, i.e. which is modal (steals the focus until closed) (only used if the box is the top window of a Parent-Child hierarchy)",bool);
+ "Set to 'true' to create a dialog window, i.e. which blocks the pipeline until it is closed (modal) (*)",bool);
BBTK_INPUT(WxBlackBox,WinHide,
- "Any signal received hides the window (only active if the box is the top window of a Parent-Child hierarchy)",Void);
+ "Any signal received hides the window (*)",Void);
BBTK_OUTPUT(WxBlackBox,Widget,"Output widget",wxWindow*);
BBTK_END_DESCRIBE_BLACK_BOX(WxBlackBox);
//=================================================================
bwd_id,
fwd_id,
home_id,
+ reload_id,
index_id,
url_id,
html_id
EVT_BUTTON(bwd_id, WxBrowser::OnBackButton )
EVT_BUTTON(fwd_id, WxBrowser::OnForwardButton )
EVT_BUTTON(home_id, WxBrowser::OnHomeButton )
+ EVT_BUTTON(reload_id, WxBrowser::OnReloadButton )
EVT_BUTTON(index_id, WxBrowser::OnMakeIndexButton )
EVT_TEXT_ENTER(url_id, WxBrowser::OnURLEnter )
EVT_HTML_LINK_CLICKED(html_id, WxBrowser::OnLinkClicked)
bsizer->Add ( mwxHomeButton, 0, wxALIGN_CENTRE |
wxLEFT | wxTOP | wxBOTTOM , 10 );
+ mwxReloadButton = new wxButton( panel, reload_id,_T("."),wxDefaultPosition,
+ wxDefaultSize,wxBU_EXACTFIT);
+ bsizer->Add ( mwxReloadButton, 0, wxALIGN_CENTRE |
+ wxTOP | wxBOTTOM , 10 );
+
mwxMakeIndexButton = new wxButton( panel, index_id,
_T("*"),wxDefaultPosition,
wxDefaultSize,wxBU_EXACTFIT);
panel -> SetAutoLayout(true);
panel -> Layout();
+ GoHome();
+
/*
Connect( mwxBackButton->GetId(),
wxEVT_COMMAND_BUTTON_CLICKED ,
//========================================================================
//========================================================================
- void WxBrowser::OnHomeButton(wxCommandEvent& )
+ void WxBrowser::GoHome()
{
std::string url = ConfigurationFile::GetInstance().Get_url();
url += "/bbtkWebSite/menu.html";
}
//========================================================================
+ //========================================================================
+ void WxBrowser::OnHomeButton(wxCommandEvent& )
+ {
+ GoHome();
+ }
+ //========================================================================
+
+ //========================================================================
+ void WxBrowser::OnReloadButton(wxCommandEvent& )
+ {
+ std::string s = wx2std(mwxHtmlWindow->GetOpenedPage());
+ GoTo(s);
+ }
+ //========================================================================
+
//========================================================================
void WxBrowser::OnMakeIndexButton(wxCommandEvent& )
{
WxBrowser ( wxWindow *parent, wxSize size );
bool GoTo(std::string&);
+ void GoHome();
void OnBackButton(wxCommandEvent& );
void OnForwardButton(wxCommandEvent& );
void OnHomeButton(wxCommandEvent& );
+ void OnReloadButton(wxCommandEvent& );
void OnMakeIndexButton(wxCommandEvent& );
void OnLinkClicked(wxHtmlLinkEvent& );
void OnURLEnter( wxCommandEvent&);
wxButton* mwxBackButton;
wxButton* mwxForwardButton;
wxButton* mwxHomeButton;
+ wxButton* mwxReloadButton;
wxButton* mwxMakeIndexButton;
// any class wishing to process wxWidgets events must use this macro
<p>
Version <b>@BBTK_PACKAGE_MAJOR_VERSION@.@BBTK_PACKAGE_MINOR_VERSION@.@BBTK_PACKAGE_BUILD_VERSION@</b> -
by <b>@BBTK_PACKAGE_AUTHOR@</b>
+
<p>
@BBTK_PACKAGE_DESCRIPTION@
+
+<p>
+ <a href="../../doxygen/@BBTK_PACKAGE_NAME@/index.html">Doxygen documentation</a> of the source code
<p>
Version <b>@BBTK_PACKAGE_MAJOR_VERSION@.@BBTK_PACKAGE_MINOR_VERSION@.@BBTK_PACKAGE_BUILD_VERSION@</b> -
by <b>@BBTK_PACKAGE_AUTHOR@</b>
+
<p>
@BBTK_PACKAGE_DESCRIPTION@
+
+<p>
+ <a href="../../doxygen/@BBTK_PACKAGE_NAME@/index.html">Doxygen documentation</a> of the source code
BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
BBTK_CATEGORY("adaptor");
BBTK_DESCRIPTION("MagicBox");
- AddInputDescriptor(new bbtk::UserBlackBoxInputDescriptor
- ("In","Input data",
- new bbtk::UserBlackBoxTGetFunctor<MagicBox,bbtk::Data,bbtk::Data>
- (&MagicBox::bbGetInputIn),
- new MagicBoxSetFunctor (&MagicBox::bbSetInputIn) ) );
- AddOutputDescriptor(new bbtk::UserBlackBoxOutputDescriptor
- ("Out","Output data",
- new bbtk::UserBlackBoxTGetFunctor<MagicBox,bbtk::Data,bbtk::Data>
- (&MagicBox::bbGetOutputOut),
- new MagicBoxSetFunctor (&MagicBox::bbSetOutputOut) ) );
+ AddInputDescriptor
+ (new bbtk::UserBlackBoxInputDescriptor
+ (typeid(MagicBoxDescriptor),
+ "In","Input data",
+ new bbtk::UserBlackBoxTGetFunctor<MagicBox,bbtk::Data,bbtk::Data>
+ (&MagicBox::bbGetInputIn),
+ new MagicBoxSetFunctor (&MagicBox::bbSetInputIn) ) );
+ AddOutputDescriptor
+ (new bbtk::UserBlackBoxOutputDescriptor
+ (typeid(MagicBoxDescriptor),
+ "Out","Output data",
+ new bbtk::UserBlackBoxTGetFunctor<MagicBox,bbtk::Data,bbtk::Data>
+ (&MagicBox::bbGetOutputOut),
+ new MagicBoxSetFunctor (&MagicBox::bbSetOutputOut) ) );
BBTK_END_DESCRIBE_BLACK_BOX(MagicBox);
}
// namespace bbstd
<p>
Version <b>@BBTK_PACKAGE_MAJOR_VERSION@.@BBTK_PACKAGE_MINOR_VERSION@.@BBTK_PACKAGE_BUILD_VERSION@</b> -
by <b>@BBTK_PACKAGE_AUTHOR@</b>
+
<p>
@BBTK_PACKAGE_DESCRIPTION@
+
+<p>
+ <a href="../../doxygen/@BBTK_PACKAGE_NAME@/index.html">Doxygen documentation</a> of the source code
Program: bbtk
Module: $RCSfile: bbwxNotebook.h,v $
Language: C++
- Date: $Date: 2008/02/06 07:30:09 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2008/02/06 14:14:24 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
BBTK_NAME("Notebook");
BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
BBTK_DESCRIPTION("Notebook widget (wxNotebook)");
- BBTK_CATEGORY("widget");
+ // Already inserted for any WxBlackBox BBTK_CATEGORY("widget");
BBTK_INPUT(Notebook,Widget1,"widget 1",wxWindow*);
BBTK_INPUT(Notebook,Widget2,"widget 2",wxWindow*);
BBTK_INPUT(Notebook,Widget3,"widget 3",wxWindow*);
Program: bbtk
Module: $RCSfile: bbwxSizer.h,v $
Language: C++
- Date: $Date: 2008/02/06 07:30:09 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2008/02/06 14:14:24 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
BBTK_NAME("Sizer");
BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
BBTK_DESCRIPTION("Sizer widget (wxSizer)");
- BBTK_CATEGORY("widget");
+ // Already inserted for any WxBlackBox BBTK_CATEGORY("widget");
BBTK_INPUT(Sizer,Widget1,"widget 1",wxWindow*);
BBTK_INPUT(Sizer,Widget2,"widget 2",wxWindow*);
Program: bbtk
Module: $RCSfile: bbwxSlider.h,v $
Language: C++
- Date: $Date: 2008/02/05 12:16:56 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2008/02/06 14:14:24 $
+ Version: $Revision: 1.6 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
BBTK_BEGIN_DESCRIBE_BLACK_BOX(Slider,bbtk::WxBlackBox);
BBTK_NAME("Slider");
BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
- BBTK_CATEGORY("widget");
+ // Already inserted for any WxBlackBox BBTK_CATEGORY("widget");
BBTK_DESCRIPTION("Slider widget (wxSlider)");
BBTK_INPUT(Slider,In,"Initial position of the slider (default 0)",int);
BBTK_INPUT(Slider,Min,"Minimum value of the slider (default 0)",int);
Program: bbtk
Module: $RCSfile: bbwxSplit.h,v $
Language: C++
- Date: $Date: 2008/02/05 12:16:56 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2008/02/06 14:14:24 $
+ Version: $Revision: 1.6 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
BBTK_NAME("Split");
BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
BBTK_DESCRIPTION("Widget which splits a window in two fixed size parts (wxSplitterWindow)");
- BBTK_CATEGORY("widget");
+ // Already inserted for any WxBlackBox BBTK_CATEGORY("widget");
BBTK_INPUT(Split,Widget1,"Upper or left widget",wxWindow*);
BBTK_INPUT(Split,Widget2,"Lower or right widget",wxWindow*);
BBTK_INPUT(Split,Orientation,"Orientation (default 0), 0=Horizontal , 1=Vertical",int);