]> git.mxchange.org Git - flightgear.git/blob - src/Model/loader.hxx
This is step "1" of probably "many" in the process of separating out the
[flightgear.git] / src / Model / loader.hxx
1 #ifndef __MODEL_LOADER_HXX
2 #define __MODEL_LOADER_HXX 1
3
4 #ifndef __cplusplus
5 # error This library requires C++
6 #endif
7
8 #include <simgear/compiler.h>   // for SG_USING_STD
9
10 #include <map>
11 SG_USING_STD(map);
12
13 #include <string>
14 SG_USING_STD(string);
15
16 #include <plib/ssg.h>
17
18
19 /**
20  * Base class for loading and managing SSG things.
21  */
22 class FGSSGLoader
23 {
24 public:
25     FGSSGLoader ();
26     virtual ~FGSSGLoader ();
27     virtual void flush ();
28 protected:
29     std::map<string,ssgBase *> _table;
30 };
31
32
33 /**
34  * Class for loading and managing models with XML wrappers.
35  */
36 class FGModelLoader : public FGSSGLoader
37 {
38 public:
39     FGModelLoader ();
40     virtual ~FGModelLoader ();
41
42     virtual ssgEntity * load_model( const string &fg_root,
43                                     const string &path,
44                                     SGPropertyNode *prop_root,
45                                     double sim_time_sec );
46 };
47
48
49 /**
50  * Class for loading and managing textures.
51  */
52 class FGTextureLoader : public FGSSGLoader
53 {
54 public:
55     FGTextureLoader ();
56     virtual ~FGTextureLoader ();
57
58     virtual ssgTexture * load_texture( const string &fg_root,
59                                        const string &path );
60 };
61
62 #endif