#ifndef __XIOS_CGroupFactory__ #define __XIOS_CGroupFactory__ /// XIOS headers /// #include "xios_spl.hpp" #include "exception.hpp" #include "object_factory.hpp" #include "group_template.hpp" #include "xml_parser.hpp" namespace xios { /// ////////////////////// Déclarations ////////////////////// /// class CGroupFactory { public : /// Mutateurs /// static void SetCurrentContextId(const StdString & context); template static void AddGroup(std::shared_ptr pgroup, std::shared_ptr cgroup); template static void AddChild(std::shared_ptr group, std::shared_ptr child); /// Accesseurs /// static StdString & GetCurrentContextId(void); template static std::shared_ptr GetGroup(std::shared_ptr group, const StdString & id); template static std::shared_ptr GetChild(std::shared_ptr group, const StdString & id); template static int GetGroupNum(std::shared_ptr group); template static int GetGroupIdNum(std::shared_ptr group); template static int GetChildNum(std::shared_ptr group); template static int GetChildIdNum(std::shared_ptr group); /// Tests /// template static bool HasGroup(std::shared_ptr group, const StdString & id); template static bool HasChild(std::shared_ptr group, const StdString & id); /// Instanciateur /// template static std::shared_ptr CreateGroup(std::shared_ptr group, const StdString & id = StdString("")); template static std::shared_ptr CreateChild(std::shared_ptr group, const StdString & id = StdString("")); private : /// Propriétés statiques /// static StdString CurrContext; }; // class CGroupFactory } // namespace xios //#include "group_factory_impl.hpp" //#include "group_parser.hpp" #endif // __XIOS_CGroupFactory__