#ifndef DATA_SOURCE_FACTORY_H_ #define DATA_SOURCE_FACTORY_H_ #include "infrastructure/data_source/Data_Source.hpp" #include namespace infrastructure { template class Data_Source_Factory { public: static Data_Source_Factory* get_Factory (); Data_Source_Type* get_String_Source (); Data_Source_Type* get_Memory_Source (); Data_Source_Type* get_Graph_Source (); private: Data_Source_Factory (){} static Data_Source_Factory* m_instance; }; class Data_Source_Factory_Creator { public: /* The Data_Source produce by the factory will be of the same type (memory passing, file passing or database passing). */ void init (const uint32_t type); /* * If type is FILE, return a Data_Source_Factory * Else if type is MEMORY, return a Data_Source_Factory * Else if type is DATABASE, return a Data_Source_Factory */ static Data_Source_Factory* get_Factory (); private: Data_Source_Factory_Creator(); static uint32_t m_type; }; } /* namespace infrastructure */ #endif /* DATA_SOURCE_FACTORY_H_ */