changed copyright years in source files
[fegdk.git] / core / code / system / f_script.h
blob658a1b498b359a61a9f02e00cadd76f80156b93a
1 /*
2 fegdk: FE Game Development Kit
3 Copyright (C) 2001-2008 Alexey "waker" Yakovenko
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the Free
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 Alexey Yakovenko
20 waker@users.sourceforge.net
23 #ifndef __F_SCRIPT_H
24 #define __F_SCRIPT_H
26 #include "f_baseobject.h"
27 #include "f_parser.h"
29 namespace fe
32 // this class is responsible for loading and managing all engine scripts (materials, models, anims, etc)
34 // usage pattern:
35 // 1. create script object
36 // 2. run script::load method to load specified script file
37 // which is usually going to contain "load" calls to load other scripts
38 // it will load object definitions into memory (which will allow to access them)
39 // 3. load (reference) your application's objects (materials, models, etc) using resourceMgr
40 // 4. if u want all objects to be prefetched -- call script::prefetch method
41 // 5. if u want all unused definitions to be unloaded -- call script::flushUnused methos
43 class FE_API script : public baseObject
45 private:
46 typedef std::vector <smartPtr <baseObject> > objList;
47 objList mObjects; // list of objects specified in script file
48 public:
49 script (void);
50 ~script (void);
51 void load (const char *fname);
52 void load (charParser &p);
53 void prefetch (void);
54 void flushUnused (void);
59 #endif // __F_SCRIPT_H