]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkFactory.h
Global factory in course of removal... does not compile but have to commit to continu...
[bbtk.git] / kernel / src / bbtkFactory.h
index 35c04e6e3e42e21f812502ccba739f8d27e325a2..75acb76c5908c1f144237f86431375c9e81429f6 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkFactory.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/03 14:55:55 $
-  Version:   $Revision: 1.9 $
+  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,7 +45,7 @@ namespace bbtk
 
     Factory();
     ~Factory();
-
+    
     void LoadPackage( const std::string& name );
     void UnLoadPackage( const std::string& name );
     void PrintPackages(bool details = true, bool adaptors = false) const;
@@ -82,6 +85,14 @@ namespace bbtk
       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,
@@ -106,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);
 
@@ -113,6 +127,8 @@ namespace bbtk
   // class Factory
 
 
+
+  /*
   /// SYSTEM METHOD : Global method returning the global factory object pointer
   inline Factory*& GlobalFactoryPointer() 
   {
@@ -218,7 +234,7 @@ namespace bbtk
   {
     GetGlobalFactory()->WriteDotFilePackagesList(ff);
   }
-
+  */
 }// namespace bbtk