From a7b5e75baf0af42a27092233d3b3350d8ec2d5da Mon Sep 17 00:00:00 2001 From: jean-pierre roux Date: Tue, 5 Feb 2008 11:07:42 +0000 Subject: [PATCH] No longer 'Categories', only 'Kinds'! --- kernel/src/bbtkBlackBoxDescriptor.cxx | 6 +- kernel/src/bbtkBlackBoxDescriptor.h | 20 ++--- kernel/src/bbtkExecuter.cxx | 109 +++++++++++------------ kernel/src/bbtkExecuter.h | 16 ++-- kernel/src/bbtkInterpreter.cxx | 9 +- kernel/src/bbtkMessageManager.cxx | 6 +- kernel/src/bbtkPackage.cxx | 34 +++---- kernel/src/bbtkTranscriptor.h | 53 +++++++---- kernel/src/bbtkUserBlackBoxMacros.h | 12 +-- kernel/src/bbtkVirtualExec.h | 36 ++++---- packages/wx/bbs/boxes/bbDoubleSlider.bbs | 1 + 11 files changed, 155 insertions(+), 147 deletions(-) diff --git a/kernel/src/bbtkBlackBoxDescriptor.cxx b/kernel/src/bbtkBlackBoxDescriptor.cxx index 004deb4..cde4b51 100644 --- a/kernel/src/bbtkBlackBoxDescriptor.cxx +++ b/kernel/src/bbtkBlackBoxDescriptor.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkBlackBoxDescriptor.cxx,v $ Language: C++ - Date: $Date: 2008/02/04 13:02:57 $ - Version: $Revision: 1.4 $ + Date: $Date: 2008/02/05 11:07:42 $ + 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 @@ -35,7 +35,7 @@ namespace bbtk mDescription(""), mAuthor(""), mKeyword(""), - mCategory(STANDARD), + mKind(STANDARD), mPackage(NULL) { bbtkDebugMessage("Core",9, diff --git a/kernel/src/bbtkBlackBoxDescriptor.h b/kernel/src/bbtkBlackBoxDescriptor.h index 259aa2f..0604f9c 100644 --- a/kernel/src/bbtkBlackBoxDescriptor.h +++ b/kernel/src/bbtkBlackBoxDescriptor.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkBlackBoxDescriptor.h,v $ Language: C++ - Date: $Date: 2008/01/30 09:28:15 $ - Version: $Revision: 1.2 $ + Date: $Date: 2008/02/05 11:07:42 $ + 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 @@ -51,14 +51,14 @@ namespace bbtk typedef std::map InputDescriptorMapType; /// The type of dictionnary of outputs= map of output descriptors pointers typedef std::map OutputDescriptorMapType; - /// The categories of black box + /// The kinds of black box typedef enum { STANDARD, ADAPTOR, DEFAULT_ADAPTOR } - Category; + Kind; /// Default ctor BlackBoxDescriptor(); @@ -86,8 +86,8 @@ namespace bbtk /// Returns the Package to which the box belongs const Package* GetPackage() const { return mPackage; } - /// Returns the category of box - Category GetCategory() const { return mCategory; } + /// Returns the kind of box + Kind GetKind() const { return mKind; } /// Prints help on the black box virtual void GetHelp(bool full=true) const; @@ -121,8 +121,8 @@ namespace bbtk /// Sets the Package to which the box belongs void SetPackage(Package *package) { mPackage = package; } - /// Sets the category of box - void SetCategory(Category category) { mCategory = category; } + /// Sets the kind of box + void SetKind(Kind kind) { mKind = kind; } /* virtual void InsertHTMLGraph( std::ofstream& s, int detail, int level, @@ -155,8 +155,8 @@ namespace bbtk std::string mAuthor; /// The keyword of the black box std::string mKeyword; - /// The category of box - Category mCategory; + /// The kind of box + Kind mKind; /// The Package to which the box belongs Package *mPackage; /// The inputs diff --git a/kernel/src/bbtkExecuter.cxx b/kernel/src/bbtkExecuter.cxx index bd71511..e925a1f 100644 --- a/kernel/src/bbtkExecuter.cxx +++ b/kernel/src/bbtkExecuter.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkExecuter.cxx,v $ $ Language: C++ - Date: $Date: 2008/01/30 09:28:15 $ - Version: $Revision: 1.4 $ + Date: $Date: 2008/02/05 11:07:42 $ + 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 @@ -20,11 +20,10 @@ * \brief class Executer: level 0 of script execution (code) */ -#include "bbtkExecuter.h" +#include "bbtkExecuter.h" #include "bbtkMessageManager.h" #include "bbtkFactory.h" #include "bbtkUtilities.h" - #include #ifdef _USE_WXWIDGETS_ @@ -40,7 +39,7 @@ namespace bbtk /** * */ - Executer::Executer() + Executer::Executer() : mPackage(0), mRoot(0), mNoExecMode(false), @@ -52,7 +51,7 @@ namespace bbtk Reset(); bbtkDebugDecTab("Core",9); } - + /** * */ @@ -121,8 +120,8 @@ namespace bbtk void Executer::BeginPackage (const std::string &name) { - bbtkDebugMessageInc("Core",9,"Executer::BeginPackage(\""<0) + { + try { - try - { - p = GetGlobalFactory()->GetPackage(pname); + p = GetGlobalFactory()->GetPackage(pname); } - catch (Exception e) + catch (Exception e) { - p = new Package(pname, + p = new Package(pname, "", "", "", BBTK_STRINGIFY_SYMBOL(BBTK_VERSION)); - InsertPackage(p); - } - } - else - { - p = mOpenPackage.back(); + InsertPackage(p); } + } + else + { + p = mOpenPackage.back(); + } p->RegisterBlackBox(Current()); - + mOpenDefinition.pop_back(); } @@ -204,7 +202,7 @@ namespace bbtk /* void Executer::Remove (const std::string &nodeName) - { + { // Current()->RemoveBlackBox(nodeName); } */ @@ -217,9 +215,9 @@ namespace bbtk const std::string &nodeTo, const std::string &inputLabel) { - Current()->Connect(nodeFrom, outputLabel, nodeTo, inputLabel); + Current()->Connect(nodeFrom, outputLabel, nodeTo, inputLabel); } - + /** * */ @@ -290,9 +288,9 @@ namespace bbtk } #endif } - + Current()->DefineInput(name,box,input,help); - + } /** @@ -305,7 +303,7 @@ namespace bbtk { Current()->DefineOutput(name,box,output,help); } - + /** * */ @@ -412,7 +410,6 @@ namespace bbtk bbtkDecTab("Help",1); } - std::string Executer::ShowGraph(const std::string &nameblackbox, const std::string &detailStr, const std::string &levelStr, @@ -421,7 +418,6 @@ namespace bbtk const std::string &custom_title, bool system_display ) { - int detail = atoi(detailStr.c_str()); int level = atoi(levelStr.c_str()); @@ -447,38 +443,38 @@ namespace bbtk // Creating directory std::string command0("mkdir \"" +directory + "\""); - system( command0.c_str() ); + system( command0.c_str() ); relative_link = false; } - + Package* p; - try - { - p = GetGlobalFactory()->GetPackage(nameblackbox); - } + try + { + p = GetGlobalFactory()->GetPackage(nameblackbox); + } catch (Exception e) - { - p = mPackage; - } + { + p = mPackage; + } // Generating documentation-help of workspace p->SetDocURL(filename_rootHtml); p->SetDocRelativeURL(simplefilename_rootHtml); p->CreateHtmlPage(filename_rootHtml,"bbi","user package",custom_header,custom_title,detail,level,relative_link); - + std::string page = filename_rootHtml; /* try - { - ShowGraphTypes(nameblackbox); - } - catch (bbtk::Exception a) - { - std::cout <<"EXC"<GetPrototype(); - } + { + blackbox=Current()->GetPrototype(); + } else - { - blackbox = Current()->GetPrototype()->bbFindBlackBox(nameblackbox); - } + { + blackbox = Current()->GetPrototype()->bbFindBlackBox(nameblackbox); + } std::string page; @@ -554,7 +550,6 @@ namespace bbtk } return page; } - void Executer::ShowRelations(const std::string &nameblackbox, const std::string &detailStr, const std::string &levelStr) { @@ -584,12 +579,12 @@ void Executer::ShowRelations(const std::string &nameblackbox, const std::string /* /// sets the level of message - void Executer::Message(const std::string &category, + void Executer::Message(const std::string &kind, const std::string& level) { int l; sscanf(level.c_str(),"%d",&l); - bbtk::MessageManager::SetMessageLevel(category,l); + bbtk::MessageManager::SetMessageLevel(kind,l); } */ diff --git a/kernel/src/bbtkExecuter.h b/kernel/src/bbtkExecuter.h index 47935ae..a7455d9 100644 --- a/kernel/src/bbtkExecuter.h +++ b/kernel/src/bbtkExecuter.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkExecuter.h,v $ $ Language: C++ - Date: $Date: 2008/01/30 09:28:15 $ - Version: $Revision: 1.4 $ + Date: $Date: 2008/02/05 11:07:42 $ + 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 @@ -23,7 +23,7 @@ * \class bbtk::Executer * \brief class Executer: level 0 of script execution */ - + #ifndef __bbtkExecuter_h__ #define __bbtkExecuter_h__ @@ -46,7 +46,7 @@ namespace bbtk /// Constructor Executer(); - /// + /// // void SetFactory(Factory* f); /// Destructor @@ -122,9 +122,9 @@ namespace bbtk ///Adds the authorName to the Box author list void Author(const std::string &authorName); - ///Adds the categories to the Box keyword list + ///Adds the Keywords to the Box keyword list void Keyword(const std::string &keyword); - + /// The description string which explains what does the ComplexBox void Description(const std::string & d); @@ -148,7 +148,7 @@ namespace bbtk void Reset(); - // static const std::string& GetObjectDescription() + // static const std::string& GetObjectDescription(); // { static std::string s("Executer"); return s; } protected: @@ -189,7 +189,7 @@ namespace bbtk /// only contains the root when outside a define/endefine block std::deque mOpenDefinition; - /// The stack of current working package + /// The stack of current working package /// (is a stack for nested definitions) std::deque mOpenPackage; diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index 6d7b994..d5f08d2 100644 --- a/kernel/src/bbtkInterpreter.cxx +++ b/kernel/src/bbtkInterpreter.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkInterpreter.cxx,v $ $ Language: C++ - Date: $Date: 2008/02/05 09:38:31 $ - Version: $Revision: 1.21 $ + Date: $Date: 2008/02/05 11:07:42 $ + Version: $Revision: 1.22 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -216,9 +216,8 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL; info.argmin = 0; info.argmax = 2; info.code = cMessage; - info.syntax = "message "; - info.help = "Sets the level of the category of messages to .\n If category='All' then sets the level for all categories. If no category nor level is passed then prints info on available categories of messages and their current level."; - mCommandDict[info.keyword] = info; + info.syntax = "message "; + info.help = "Sets the level of the kind of messages to .\n If kind='All' then sets the level for all kinds. If no kind nor level is passed then prints info on available kinds of messages and their current level."; mCommandDict[info.keyword] = info; info.keyword = "include"; info.argmin = 1; diff --git a/kernel/src/bbtkMessageManager.cxx b/kernel/src/bbtkMessageManager.cxx index ff2c393..eede31b 100644 --- a/kernel/src/bbtkMessageManager.cxx +++ b/kernel/src/bbtkMessageManager.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkMessageManager.cxx,v $ Language: C++ - Date: $Date: 2008/01/22 15:02:00 $ - Version: $Revision: 1.1 $ + Date: $Date: 2008/02/05 11:07:42 $ + 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 @@ -144,7 +144,7 @@ namespace bbtk { bbtkMessage("Help",1,"================ Messages =================" << bbtkendl); - bbtkMessage("Help",1, "Category"); + bbtkMessage("Help",1, "Kind"); for (int k=0; k<(int)(GetInstance()->mMaxMessageLength-8); k++) { diff --git a/kernel/src/bbtkPackage.cxx b/kernel/src/bbtkPackage.cxx index 7b50aef..c37a2a1 100644 --- a/kernel/src/bbtkPackage.cxx +++ b/kernel/src/bbtkPackage.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkPackage.cxx,v $ Language: C++ - Date: $Date: 2008/01/30 12:14:43 $ - Version: $Revision: 1.2 $ + Date: $Date: 2008/02/05 11:07:42 $ + 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 @@ -157,7 +157,7 @@ namespace bbtk d->SetPackage(this); // If it is a default adaptor, also register it in the adaptors map - if ( d->GetCategory() == BlackBoxDescriptor::DEFAULT_ADAPTOR) + if ( d->GetKind() == BlackBoxDescriptor::DEFAULT_ADAPTOR) { TypeInfo typein = d->GetInputDescriptor("In")->GetTypeInfo(); TypeInfo typeout = d->GetOutputDescriptor("Out")->GetTypeInfo(); @@ -257,7 +257,7 @@ namespace bbtk { unsigned int lmax = 0; std::vector names; - std::vector categs; + std::vector kinds; std::vector descrs; BlackBoxMapType::const_iterator i; @@ -266,25 +266,25 @@ namespace bbtk ++i) { if ( adaptors || - ( i->second->GetCategory() == BlackBoxDescriptor::STANDARD) ) + ( i->second->GetKind() == BlackBoxDescriptor::STANDARD) ) { std::string name(" "); name += i->second->GetTypeName(); names.push_back(name); - std::string categ; - if ( i->second->GetCategory() == BlackBoxDescriptor::ADAPTOR ) + std::string kind; + if ( i->second->GetKind() == BlackBoxDescriptor::ADAPTOR ) { - categ = std::string("[A]"); + kind = std::string("[A]"); } - else if ( i->second->GetCategory() == + else if ( i->second->GetKind() == BlackBoxDescriptor::DEFAULT_ADAPTOR ) { - categ = std::string("[DA]"); + kind = std::string("[DA]"); } - categs.push_back(categ); + kinds.push_back(kind); - unsigned int l = name.size()+categ.size(); + unsigned int l = name.size()+kind.size(); if (l>lmax) lmax = l; std::string descr; @@ -301,7 +301,7 @@ namespace bbtk std::string offs; offs.append(lmax+3,' '); std::vector::iterator ni,ci,di; - for (ni = names.begin(), ci = categs.begin(), di = descrs.begin(); + for (ni = names.begin(), ci = kinds.begin(), di = descrs.begin(); ni != names.end(); ++ni, ++ci, ++di) { std::string space; @@ -331,11 +331,11 @@ namespace bbtk i!=mBlackBoxMap.end(); ++i) { - if ( i->second->GetCategory() != BlackBoxDescriptor::STANDARD ) + if ( i->second->GetKind() != BlackBoxDescriptor::STANDARD ) { bbtkMessage("Help",1, " "<second->GetTypeName()); - if ( i->second->GetCategory() == + if ( i->second->GetKind() == BlackBoxDescriptor::DEFAULT_ADAPTOR ) { bbtkMessage("Help",1, @@ -527,7 +527,7 @@ namespace bbtk BlackBoxMapType::const_iterator i; for (i=mBlackBoxMap.begin(); i!=mBlackBoxMap.end(); ++i) { - if ( i->second->GetCategory() != BlackBoxDescriptor::STANDARD) + if ( i->second->GetKind() != BlackBoxDescriptor::STANDARD) continue; std::string name = i->second->GetTypeName(); @@ -561,7 +561,7 @@ namespace bbtk s << "

\n"; for (i=mBlackBoxMap.begin(); i!=mBlackBoxMap.end();++i) { - if ( i->second->GetCategory() == BlackBoxDescriptor::STANDARD) + if ( i->second->GetKind() == BlackBoxDescriptor::STANDARD) continue; std::string name = i->second->GetTypeName(); diff --git a/kernel/src/bbtkTranscriptor.h b/kernel/src/bbtkTranscriptor.h index 5ab590a..82c95da 100644 --- a/kernel/src/bbtkTranscriptor.h +++ b/kernel/src/bbtkTranscriptor.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkTranscriptor.h,v $ $ Language: C++ - Date: $Date: 2008/01/22 17:00:17 $ - Version: $Revision: 1.1 $ + Date: $Date: 2008/02/05 11:07:42 $ + 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 @@ -25,10 +25,15 @@ */ #ifndef __bbtkTranscriptor_h__ -#define __bbtkTranscriptor_h__ +#define __bbtkTranscriptor_h__ #include "bbtkVirtualExec.h" +#include "bbtkSystem.h" +#include "bbtkComplexBlackBox.h" +#include "bbtkFactory.h" +#include +#include #include namespace bbtk @@ -37,11 +42,11 @@ namespace bbtk class /*BBTK_EXPORT*/ Transcriptor : public VirtualExec { - public: + public: /// Constructor Transcriptor(std::string filename); - + /// Destructor ~Transcriptor( ); @@ -54,20 +59,26 @@ namespace bbtk //void SetNoExecMode(bool b) { mNoExecMode = b; } void SetNoExecMode(bool b) { - m_Fp << "e->SetNoExecMode(true);" << std::endl; - } + m_Fp << "e->SetNoExecMode(true);" << std::endl; + } bool GetNoExecMode() const { return mNoExecMode; } /* - bool GetNoExecMode() const + bool GetNoExecMode() const { // cannot compile, since ethos is 'const' ! - //m_Fp << "e->GetNoExecMode(true);" << std::endl; + //m_Fp << "e->GetNoExecMode(true);" << std::endl; } */ /// Sets the mode of dialog of the executer for Root inputs void SetDialogMode(DialogModeType t) { mDialogMode = t; } + /// Starts a package block + void BeginPackage (const std::string &name ); + + /// Ends a package block + void EndPackage (); + /// Starts the definition of a new ComplexBlackBox in package pack /// scriptfilename is the file from which the def is read void Define (const std::string &name, @@ -117,9 +128,12 @@ namespace bbtk /// changes the workspace name void SetWorkspaceName( const std::string& n ); - ///Adds the authorName to the Box's author list + ///Adds the authorName to the Box author list void Author(const std::string &authorName); + ///Adds the Keywords to the Box keyword list + void Keyword(const std::string &keyword); + /// The description string which explains what does the ComplexBox void Description(const std::string & d); @@ -143,7 +157,7 @@ namespace bbtk void Reset(); - // static const std::string& GetObjectDescription() + // static const std::string& GetObjectDescription() // { static std::string s("Executer"); return s; } protected: @@ -151,10 +165,11 @@ namespace bbtk private: /// Gets the current working black box - ComplexBlackBoxDescriptor* Current() { return mCurrent.back().box; } + ComplexBlackBoxDescriptor* Current() + { return mOpenDefinition.back().box; } /// Returns true when we are inside a define/endefine block - // bool InDefinitionBlock() { return (mCurrent.size()>1); } + // bool InDefinitionBlock() { return (mOpenDefinition.size()>1); } //================================================================== // ATTRIBUTES @@ -168,7 +183,7 @@ namespace bbtk /// The root ComplexBlackBox, in which operations are done when outside a define/endefine block /// Its name in bbi is 'workspace' ComplexBlackBoxDescriptor* mRoot; - + /// Struct that stores info on user defined complex black boxes struct CBBDefinition { @@ -181,7 +196,11 @@ namespace bbtk /// The stack of current working ComplexBlackBox /// (is a stack for nested definitions) /// only contains the root when outside a define/endefine block - std::deque mCurrent; + std::deque mOpenDefinition; + + /// The stack of current working package + /// (is a stack for nested definitions) + std::deque mOpenPackage; /// flag which is true when we are inside a Define/EndDefine block // bool mDefineFlag; @@ -196,8 +215,8 @@ namespace bbtk DialogModeType mDialogMode; /// File Pointer, to hold generated C++ code. - // std::ofstream *m_Fp; - std::ofstream m_Fp; + // std::ofstream *m_Fp; + std::ofstream m_Fp; }; } #endif diff --git a/kernel/src/bbtkUserBlackBoxMacros.h b/kernel/src/bbtkUserBlackBoxMacros.h index 2ff7aed..a69372a 100644 --- a/kernel/src/bbtkUserBlackBoxMacros.h +++ b/kernel/src/bbtkUserBlackBoxMacros.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkUserBlackBoxMacros.h,v $ Language: C++ - Date: $Date: 2008/01/30 09:28:16 $ - Version: $Revision: 1.3 $ + Date: $Date: 2008/02/05 11:07:43 $ + 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 @@ -253,18 +253,18 @@ //============================================================================ //============================================================================ -/// Declares the category of a UserBlackBox (to be put inside the UBB description block) -//#define BBTK_CATEGORY(CATEGORY) SetCategory(CATEGORY) +/// Declares the kind of a UserBlackBox (to be put inside the UBB description block) +//#define BBTK_KIND(KIND) SetKind(KIND) //============================================================================ //============================================================================ /// Declares that the UserBlackBox is an adaptor (to be put inside the UBB description block) -#define BBTK_ADAPTOR() SetCategory(bbtk::BlackBoxDescriptor::ADAPTOR) +#define BBTK_ADAPTOR() SetKInd(bbtk::BlackBoxDescriptor::ADAPTOR) //============================================================================ //============================================================================ /// Declares that the UserBlackBox is the default adaptor of the package (to be put inside the UBB description block) -#define BBTK_DEFAULT_ADAPTOR() SetCategory(bbtk::BlackBoxDescriptor::DEFAULT_ADAPTOR) +#define BBTK_DEFAULT_ADAPTOR() SetKind(bbtk::BlackBoxDescriptor::DEFAULT_ADAPTOR) //============================================================================ //============================================================================ diff --git a/kernel/src/bbtkVirtualExec.h b/kernel/src/bbtkVirtualExec.h index 42217a7..6a74401 100644 --- a/kernel/src/bbtkVirtualExec.h +++ b/kernel/src/bbtkVirtualExec.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkVirtualExec.h,v $ $ Language: C++ - Date: $Date: 2008/01/30 09:28:16 $ - Version: $Revision: 1.4 $ + Date: $Date: 2008/02/05 11:07:43 $ + 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 @@ -40,24 +40,14 @@ namespace bbtk { public: - typedef enum + typedef enum { NoDialog, TextDialog, GraphicalDialog } DialogModeType; - -/* - /// Constructor - VirtualExec(); - - /// - // void SetFactory(Factory* f); - - /// Destructor - virtual ~VirtualExec() = 0; -*/ + /// Sets the inputs of the workspace : virtual void SetInputs(const std::map& m) = 0; @@ -119,7 +109,7 @@ namespace bbtk const std::string &input, const std::string &value) = 0; - /// gets the output of the box + /// gets the output of the box virtual std::string Get (const std::string &box, const std::string &output) = 0; @@ -147,17 +137,17 @@ namespace bbtk const std::string &custom_title, bool system_display = true) = 0; - /// Generate a HTML with a gif file with the actual pipeline (Graphviz-dot needed). Returns the file path + /// Generate a HTML with a gif file with the actual pipeline (Graphviz-dot needed). Returns the file path virtual std::string ShowGraphInstances(const std::string &nameblackbox, int detail, int level, bool system_display=true) = 0; -/// Description of the actual pipeline + /// Description of the actual pipeline virtual void ShowRelations(const std::string &nameblackbox, const std::string &detailStr, const std::string &levelStr) = 0; virtual void Reset() = 0; -/* + + // static const std::string& GetObjectDescription() = 0; // { static std::string s("VirtualExec"); return s; } -*/ protected: private: @@ -180,7 +170,7 @@ namespace bbtk /// The root ComplexBlackBox, in which operations are done when outside a define/endefine block /// Its name in bbi is 'workspace' ComplexBlackBoxDescriptor* mRoot; - + /// Struct that stores info on user defined complex black boxes struct CBBDefinition { @@ -193,7 +183,11 @@ namespace bbtk /// The stack of current working ComplexBlackBox /// (is a stack for nested definitions) /// only contains the root when outside a define/endefine block - std::deque mCurrent; + std::deque mOpenDefinition; + + /// The stack of current working package + /// (is a stack for nested definitions) + std::deque mOpenPackage; /// flag which is true when we are inside a Define/EndDefine block // bool mDefineFlag; diff --git a/packages/wx/bbs/boxes/bbDoubleSlider.bbs b/packages/wx/bbs/boxes/bbDoubleSlider.bbs index 7fe08c6..65ad3c9 100644 --- a/packages/wx/bbs/boxes/bbDoubleSlider.bbs +++ b/packages/wx/bbs/boxes/bbDoubleSlider.bbs @@ -1,5 +1,6 @@ define DoubleSlider description "test object" + keyword "box;wx;slider" author "laurent.guigues at creatis.insa-lyon.fr" new Slider slider1 new Slider slider2 -- 2.45.1