sgpemv2/plugins/xmlsave/src/xml_serializer_factory.hh

72 lines
2.0 KiB
C++
Raw Normal View History

// 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 <glibmm/ustring.h>
#include <map>
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<resource_key_t, Resource*> ResourcePair;
//typedef const std::map<const Glib::ustring&, const Glib::ustring&> Parameters;
typedef std::map<Glib::ustring, Glib::ustring> Parameters;
void factory_method(const Glib::ustring& class_name, Parameters& parameters);
protected:
private:
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* _hist;
};
}
#endif