X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkFactory.h;h=75acb76c5908c1f144237f86431375c9e81429f6;hb=5e6e754f059d5fb6b25b883f89f76333228ba5c4;hp=0a7f39e6f2f0a1adca70e8a842cc671b20862bfd;hpb=01f46ce7ba8fe9067dff0688706986475aaec73e;p=bbtk.git diff --git a/kernel/src/bbtkFactory.h b/kernel/src/bbtkFactory.h index 0a7f39e..75acb76 100644 --- a/kernel/src/bbtkFactory.h +++ b/kernel/src/bbtkFactory.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkFactory.h,v $ Language: C++ - Date: $Date: 2008/02/12 12:55:16 $ - Version: $Revision: 1.5 $ + Date: $Date: 2008/03/07 08:40:14 $ + Version: $Revision: 1.10 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See doc/license.txt or @@ -35,6 +35,9 @@ namespace bbtk { + + class Executer; + class BBTK_EXPORT Factory { @@ -42,10 +45,8 @@ namespace bbtk Factory(); ~Factory(); - - void LoadPackage( const std::string& name, - bool use_configuration_file = true, - bool verbose = false ); + + void LoadPackage( const std::string& name ); void UnLoadPackage( const std::string& name ); void PrintPackages(bool details = true, bool adaptors = false) const; void HelpPackage(const std::string& name, bool adaptors = false) const; @@ -78,17 +79,25 @@ namespace bbtk { Packages, Categories, - Initials + Initials, + Adaptors } IndexEntryType; void CreateHtmlIndex(IndexEntryType type, const std::string& filename); + /// Sets the executer who created the factory (if any) + void SetExecuter(Executer *e) { mExecuter = e; } + /// Gets the executer who created the factory (if any) + Executer* GetExecuter() { return mExecuter; } + /// Gets the executer who created the factory (if any) - const + const Executer* GetExecuter() const { return mExecuter; } + + private: bool DoLoadPackage(std::string libname, std::string pkgname, - std::string path, - bool v); + std::string path); /// The structure storing info on a package class PackageInfoType @@ -108,6 +117,9 @@ namespace bbtk /// The map of packages PackageMapType mPackageMap; + /// The executer which created the factory (if any) + Executer* mExecuter; + void CloseAllPackages(); void ClosePackage(PackageMapType::iterator& i); @@ -115,6 +127,8 @@ namespace bbtk // class Factory + + /* /// SYSTEM METHOD : Global method returning the global factory object pointer inline Factory*& GlobalFactoryPointer() { @@ -141,10 +155,9 @@ namespace bbtk } } - inline void LoadPackage( const std::string& name, - bool use_configuration_file = true, bool verbose = false ) + inline void LoadPackage( const std::string& name ) { - GetGlobalFactory()->LoadPackage(name,use_configuration_file, verbose); + GetGlobalFactory()->LoadPackage(name); } inline void UnLoadPackage( const std::string& name ) @@ -170,7 +183,7 @@ namespace bbtk inline void HelpBlackBox(const std::string& name, std::string& package, bool full=true - ) + ) { GetGlobalFactory()->HelpBlackBox(name, package, full); } @@ -221,7 +234,7 @@ namespace bbtk { GetGlobalFactory()->WriteDotFilePackagesList(ff); } - + */ }// namespace bbtk