// src/xml_serializer_factory.hh - Copyright 2005, 2006, University // of Padova, dept. of Pure and Applied // Mathematics // // This file is part of SGPEMv2. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // SGPEMv2 is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with SGPEMv2; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #ifndef XML_SERIALIZER_FACTORY_HH #define XML_SERIALIZER_FACTORY_HH 1 #include "config.h" #include "history.hh" #include "environment.hh" #include #include namespace sgpem { class History; class Resource; class Process; class Thread; class Request; class SubRequest; } namespace sgpem { class XMLSerializerFactory; class XMLSerializerFactory { public: XMLSerializerFactory(History& hist); ~XMLSerializerFactory(); History* get_history(); typedef Environment::resource_key_t resource_key_t; // typedef const std::pair ResourcePair; //NOUSE typedef const std::map Parameters; // associate old keys with new ones typedef std::map Parameters; // associate old keys with new ones //typedef pair TempPair; typedef std::map TempMap; void factory_method(const Glib::ustring& class_name, Parameters& parameters); protected: private: History::ResourcePair create_resource(Parameters& parameters); Process& create_process(Parameters& parameters); Thread& create_thread(Parameters& parameters); Request& create_request(Parameters& parameters); SubRequest& create_subrequest(Parameters& parameters); // history object to add to resources processes etc... History* _hist; // memory of last objects to link to Process* _last_process; Thread* _last_thread; Request* _last_request; // take association with old keys an new keys // to reslove sub requests TempMap _temp_map; }; } #endif