OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
editormanager.h
1 /*
2  Copyright (C) 2014 - 2016 Mutzii
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
18 //#ifndef EDITORMANAGER_H
19 //#define EDITORMANAGER_H
20 
21 //#include "index.h"
22 //#include "entity.h"
23 
24 //namespace Engine
25 //{
26 
27 // enum EditorAddonFlags
28 // {
29 // ADDON_READ_FILE ,
30 // ADDON_WRITE_FILE ,
31 // ADDON_UPDATE
32 // };
33 
34 // class IEditorAddon
35 // {
36 // public:
37 // virtual ~IEditorAddon(){}
38 
39 // virtual void initialize( void * pointer )=0;
40 
41 // virtual void onEnable( std::string & line )=0;
42 
43 // virtual void onAttach( Entity * entity )=0;
44 
45 // IComponent<Entity> * component;
46 
47 // uint flag;
48 // };
49 
50 
51 // class Editor
52 // {
53 
54 // friend class EditorManager;
55 
56 // public:
57 // explicit Editor(const std::string & extension )
58 // : mExtension( extension ){}
59 // ~Editor(){}
60 
61 // virtual void initialize(void)=0;
62 
63 // virtual void finish(void)=0;
64 
65 // virtual void ReadFile( const std::string & path )=0;
66 
67 // virtual void UpdateContext( const std::string & path )=0;
68 
69 // virtual void WriteFile( const std::string & path )=0;
70 
71 // virtual void addAddon( IEditorAddon * addon , uint editor_addon_flag )=0;
72 
73 // protected:
74 
75 // string mExtension;
76 
77 // };
78 
79 // using Editors = std::list< Editor * >;
80 
81 // class EditorManager
82 // {
83 // public:
84 
85 // using EntityMap = std::map < uint , Entity * >;
86 
87 // using EditorAddonMap = std::map < uint , IEditorAddon * >;
88 
89 
90 // private:
91 
92 // static EditorManager * ptrInstance;
93 // static uint mEntityId;
94 
95 // EditorManager();
96 // EditorManager(const EditorManager &){}
97 // void operator =( const EditorManager &){}
98 
99 // public:
100 
101 // static EditorManager * getSingletonPtr(void);
102 
103 // /* NEW */
104 
105 // Entity * createEditorEntity(void);
106 // IEditorAddon * addEditorAddon( Entity * editor_entity , IEditorAddon * addon );
107 // IEditorAddon * getEditorAddon( uint component_id );
108 
109 // void remove( Entity * entity );
110 // void remove( IEditorAddon * addon );
111 
112 // /*!
113 // * Add Addon to Entity Editor
114 // * \brief AttachAddon
115 // * \param editor_entity
116 // * \param addon
117 // */
118 // void AttachAddon( Entity * editor_entity , IEditorAddon * addon );
119 // void BindIEditor( uint component_id , IEditorAddon * editor_addon );
120 
121 // /*!
122 // * Initialize the Editor
123 // * \brief addEditor
124 // * \param editor
125 // */
126 // void addEditor( Editor * editor );
127 
128 // /*!
129 // * Remove a Editor (finish editor )
130 // * \brief remove
131 // * \param editor
132 // */
133 // void remove( Editor * editor );
134 
135 // /* Events */
136 // void createReadFileEvent ( const std::string & file );
137 // void createWriteFileEvent ( const std::string & file );
138 // void createUpdateFileEvent( const std::string & file );
139 
140 
141 // private:
142 
143 // EntityMap mEntityMap;
144 
145 // EditorAddonMap mAddonMap;
146 
147 // Editors mEditors;
148 // };
149 
150 //}
151 
152 //#endif // EDITORMANAGER_H