Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/core/src/orxonox/core/Loader.h @ 796

Last change on this file since 796 was 792, checked in by landauf, 16 years ago

upload of the work i did before the exams (not yet finished nor working)

File size: 6.9 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *
4 *
5 *   License notice:
6 *
7 *   This program is free software; you can redistribute it and/or
8 *   modify it under the terms of the GNU General Public License
9 *   as published by the Free Software Foundation; either version 2
10 *   of the License, or (at your option) any later version.
11 *
12 *   This program is distributed in the hope that it will be useful,
13 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 *   GNU General Public License for more details.
16 *
17 *   You should have received a copy of the GNU General Public License
18 *   along with this program; if not, write to the Free Software
19 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20 *
21 *   Author:
22 *      Fabian 'x3n' Landau
23 *   Co-authors:
24 *      ...
25 *
26 */
27
28#ifndef _Loader_H__
29#define _Loader_H__
30
31#include <string>
32#include <vector>
33
34#include "CorePrereqs.h"
35
36namespace orxonox
37{
38    class Loader
39    {
40        public:
41            static bool open(const std::string& file);
42            static bool open(const std::string& file, const Identifier* subclassInclude);
43            static bool open(const std::string& file, const Identifier* subclassInclude, const Identifier* subclassExclude);
44            static bool open(const std::string& file, const Identifier* subclassInclude, std::vector<const Identifier*> subclassesExclude);
45            static bool open(const std::string& file, const std::vector<const Identifier*>& subclassesInclude);
46            static bool open(const std::string& file, const std::vector<const Identifier*>& subclassesInclude, const Identifier* subclassExclude);
47            static bool open(const std::string& file, const std::vector<const Identifier*>& subclassesInclude, std::vector<const Identifier*> subclassesExclude);
48
49            static bool open(const std::vector<std::string>& files);
50            static bool open(const std::vector<std::string>& files, const Identifier* subclassInclude);
51            static bool open(const std::vector<std::string>& files, const Identifier* subclassInclude, const Identifier* subclassExclude);
52            static bool open(const std::vector<std::string>& files, const Identifier* subclassInclude, std::vector<const Identifier*> subclassesExclude);
53            static bool open(const std::vector<std::string>& files, const std::vector<const Identifier*>& subclassesInclude);
54            static bool open(const std::vector<std::string>& files, const std::vector<const Identifier*>& subclassesInclude, const Identifier* subclassExclude);
55            static bool open(const std::vector<std::string>& files, const std::vector<const Identifier*>& subclassesInclude, std::vector<const Identifier*> subclassesExclude);
56
57            static bool open(const std::vector<std::pair<std::string, const Identifier*> >& files);
58            static bool open(const std::vector<std::pair<std::string, std::pair<const Identifier*, const Identifier*> > >& files);
59            static bool open(const std::vector<std::pair<std::string, std::pair<const Identifier*, std::vector<const Identifier*> > > >& files);
60            static bool open(const std::vector<std::pair<std::string, std::vector<const Identifier*> > >& files);
61            static bool open(const std::vector<std::pair<std::string, std::pair<std::vector<const Identifier*>, const Identifier*> > >& files);
62            static bool open(const std::vector<std::pair<std::string, std::pair<std::vector<const Identifier*>, std::vector<const Identifier*> > > >& files);
63
64
65            static bool add(const std::string& file);
66            static bool add(const std::string& file, const Identifier* subclassInclude);
67            static bool add(const std::string& file, const Identifier* subclassInclude, const Identifier* subclassExclude);
68            static bool add(const std::string& file, const Identifier* subclassInclude, std::vector<const Identifier*> subclassesExclude);
69            static bool add(const std::string& file, const std::vector<const Identifier*>& subclassesInclude);
70            static bool add(const std::string& file, const std::vector<const Identifier*>& subclassesInclude, const Identifier* subclassExclude);
71            static bool add(const std::string& file, const std::vector<const Identifier*>& subclassesInclude, std::vector<const Identifier*> subclassesExclude);
72
73
74            static void remove();
75            static void remove(const std::vector<std::string>& files);
76            static void remove(const std::string& file);
77
78
79            static bool reload();
80            static bool reload(const Identifier* subclassInclude);
81            static bool reload(const Identifier* subclassInclude, const Identifier* subclassExclude);
82            static bool reload(const Identifier* subclassInclude, const std::vector<const Identifier*>& subclassesExclude);
83            static bool reload(const std::vector<const Identifier*>& subclassesInclude);
84            static bool reload(const std::vector<const Identifier*>& subclassesInclude, const Identifier* subclassExclude);
85            static bool reload(const std::vector<const Identifier*>& subclassesInclude, const std::vector<const Identifier*>& subclassesExclude);
86
87
88            static void unload();
89            static void unload(const Identifier* subclassInclude);
90            static void unload(const Identifier* subclassInclude, const Identifier* subclassExclude);
91            static void unload(const Identifier* subclassInclude, const std::vector<const Identifier*>& subclassesExclude);
92            static void unload(const std::vector<const Identifier*>& subclassesInclude);
93            static void unload(const std::vector<const Identifier*>& subclassesInclude, const Identifier* subclassExclude);
94            static void unload(const std::vector<const Identifier*>& subclassesInclude, const std::vector<const Identifier*>& subclassesExclude);
95
96        private:
97            static bool load(const std::vector<std::pair<std::string, std::pair<std::vector<const Identifier*>, std::vector<const Identifier*> > > >& files);
98            static bool load(const std::vector<std::string>& files, const std::vector<const Identifier*>& subclassesInclude, const std::vector<const Identifier*>& subclassesExclude);
99            static bool load(const std::vector<std::pair<std::string, std::pair<std::vector<const Identifier*>, std::vector<const Identifier*> > > >& files, const std::vector<const Identifier*>& subclassesInclude, const std::vector<const Identifier*>& subclassesExclude);
100            static bool load(const std::string& file, const std::vector<const Identifier*>& subclassesInclude, const std::vector<const Identifier*>& subclassesExclude);
101
102
103            static std::vector<std::pair<std::string, std::pair<std::vector<const Identifier*>, std::vector<const Identifier*> > > > files_s;
104    };
105}
106
107#endif /* _Loader_H__ */
Note: See TracBrowser for help on using the repository browser.