- /// SYSTEM METHOD : Global method returning the global factory object pointer
- inline Factory*& GlobalFactoryPointer()
- {
- static Factory* f = 0;
- return f;
- }
-
- /// SYSTEM METHOD : Global method returning the global factory object
- inline Factory* GetGlobalFactory()
- {
- if (!GlobalFactoryPointer())
- {
- GlobalFactoryPointer() = new Factory;
- }
- return GlobalFactoryPointer();
- }
-
- /// SYSTEM METHOD : Deletes the global factory pointer
- inline void DeleteGlobalFactory()
- {
- if (GlobalFactoryPointer())
- {
- delete GlobalFactoryPointer();
- }
- }
-
- inline void LoadPackage( const std::string& name,
- bool use_configuration_file = true)
- {
- GetGlobalFactory()->LoadPackage(name,use_configuration_file);
- }
-
- inline void UnLoadPackage( const std::string& name )
- {
- GetGlobalFactory()->UnLoadPackage(name);
- }
-
- inline void PrintPackages(bool details = true, bool adaptors = false)
- {
- GetGlobalFactory()->PrintPackages(details,adaptors);
- }
-
- inline void HelpPackage(const std::string& name, bool adaptors = false)
- {
- GetGlobalFactory()->HelpPackage(name,adaptors);
- }
-
- inline void HelpBlackBox(const std::string& name, bool full=true)
- {
- std::string package;
- GetGlobalFactory()->HelpBlackBox(name, package, full);
- }
-
- inline void HelpBlackBox(const std::string& name, std::string& package,
- bool full=true
- )
- {
- GetGlobalFactory()->HelpBlackBox(name, package, full);
- }
-
-
- inline void ShowGraphTypes(const std::string& name)
- {
- GetGlobalFactory()->ShowGraphTypes(name);
- }
-
- inline void InsertPackage( Package* p)
- {
- GetGlobalFactory()->InsertPackage(p);
- }
-
- inline void RemovePackage( Package* p)
- {
- GetGlobalFactory()->RemovePackage(p);
- }
-
- inline const Package* GetPackage(const std::string& name)
- {
- return GetGlobalFactory()->GetPackage(name);
- }
-
- inline BlackBox* NewBlackBox(const std::string& type,
- const std::string& name)
- {
- return GetGlobalFactory()->NewBlackBox(type,name);
- }
-
- inline BlackBox* NewAdaptor(TypeInfo typein,
- TypeInfo typeout,
- const std::string& name)
- {
- return GetGlobalFactory()->NewAdaptor(typein,typeout,name);
- }
-
- inline Connection* NewConnection(BlackBox* from,
- const std::string& output,
- BlackBox* to,
- const std::string& input)
- {
- return GetGlobalFactory()->NewConnection(from,output,to,input);
- }
-
- inline void WriteDotFilePackagesList(FILE *ff)
- {
- GetGlobalFactory()->WriteDotFilePackagesList(ff);
- }