exporter.hh
Go to the documentation of this file.
00001 #ifndef TYPELIB_EXPORTER_HH
00002 #define TYPELIB_EXPORTER_HH
00003 
00004 #include <iosfwd>
00005 #include "pluginmanager.hh"
00006 #include "registryiterator.hh"
00007 
00008 namespace utilmm
00009 {
00010     class config_set;
00011 }
00012 
00013 namespace Typelib
00014 {
00015     class Type;
00016     class Registry;
00017 
00018     class ExportPlugin
00019     {
00020         std::string m_name;
00021 
00022     public:
00023         ExportPlugin(std::string const& name)
00024             : m_name(name) {}
00025         virtual ~ExportPlugin() {}
00026 
00027         std::string getName() const { return m_name; }
00028         virtual Exporter* create() = 0;
00029     };
00030 
00032     class Exporter
00033     {
00034     protected:
00038         virtual void begin(std::ostream& stream, Registry const& registry);
00042         virtual void end  (std::ostream& stream, Registry const& registry);
00043 
00044     public:
00045         virtual ~Exporter() {}
00046 
00048         virtual void save
00049             ( std::string const& file_name
00050             , utilmm::config_set const& config
00051             , Registry const& registry );
00052 
00068         virtual void save
00069             ( std::ostream& stream
00070             , utilmm::config_set const& config
00071             , Registry const& registry );
00072 
00078         virtual bool save
00079             ( std::ostream& stream
00080             , Registry const& registry );
00081 
00087         virtual bool save
00088             ( std::ostream& stream
00089             , RegistryIterator const& type ) = 0;
00090     };
00091 }
00092 
00093 #endif
00094 


typelib
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Mon Oct 6 2014 03:17:12