X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkComplexBlackBoxDescriptor.h;h=27dcd4dd89ebb8c399fbfef8f4ef7de10a89b149;hb=56e4ad989e702cfecc9166812f8a365aca6a2b31;hp=cfa7945e1302592d93ae912f23ecd53f0b3ba118;hpb=a26195c366a89795288009cf7e20f11afa494970;p=bbtk.git diff --git a/kernel/src/bbtkComplexBlackBoxDescriptor.h b/kernel/src/bbtkComplexBlackBoxDescriptor.h index cfa7945..27dcd4d 100644 --- a/kernel/src/bbtkComplexBlackBoxDescriptor.h +++ b/kernel/src/bbtkComplexBlackBoxDescriptor.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkComplexBlackBoxDescriptor.h,v $ Language: C++ - Date: $Date: 2008/01/22 15:02:00 $ - Version: $Revision: 1.1 $ + Date: $Date: 2008/03/07 10:21:30 $ + 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 @@ -45,18 +45,28 @@ namespace bbtk public: /// Default ctor with name - ComplexBlackBoxDescriptor(const std::string& name); //, Factory* f); + ComplexBlackBoxDescriptor(const std::string& name); /// Default dtor ~ComplexBlackBoxDescriptor(); + + /// Sets the factory used + void SetFactory(Factory* f) { mFactory = f; } + /// Gets the factory used + Factory* GetFactory() { return mFactory; } + /// Gets the factory used (const) + const Factory* GetFactory() const { return mFactory; } + /// Creates an instance of name of the ComplexBlackBox of which this is the descriptor virtual BlackBox* CreateInstance(const std::string& name); /// Adds a black box to the complex box + /// Needs a factory set ! void Add ( const std::string& type, const std::string& name ); /// Connects two black boxes of the complex box - void Connect ( const std::string& from, + /// Needs a factory set ! + void Connect ( const std::string& from, const std::string& output, const std::string& to, const std::string& input @@ -114,6 +124,8 @@ namespace bbtk private: /// Default ctor is private (must have name and factory) ComplexBlackBoxDescriptor() {} + /// The factory used + Factory* mFactory; /// The complex box in which boxes and connections are stored ComplexBlackBox* mPrototype; /// The name of the script file from which it was created