source: Plugins/luaScripting/ScriptLoader.h @ 35

Revision 35, 2.1 KB checked in by art, 12 years ago (diff)

Big changes in resource managment system. Interface functions were renamed.
Resource loading is now done throughthe resource and not through the loader.

Line 
1/***************************************************************************
2 *                                                                         *
3 *   (c) Art Tevs, MPI Informatik Saarbruecken                             *
4 *       mailto: <tevs@mpi-sb.mpg.de>                                      *
5 *                                                                         *
6 *   This program is free software; you can redistribute it and/or modify  *
7 *   it under the terms of the GNU General Public License as published by  *
8 *   the Free Software Foundation; either version 2 of the License, or     *
9 *   (at your option) any later version.                                   *
10 *                                                                         *
11 ***************************************************************************/
12
13
14#ifndef _NR_LUA_LOADER_H_
15#define _NR_LUA_LOADER_H_
16
17//----------------------------------------------------------------------------------
18// Includes
19//----------------------------------------------------------------------------------
20#include <nrEngine/nrEngine.h>
21
22using namespace nrEngine;
23       
24/**
25* Scriptloader is used to load standard scripts based on the engine's language.
26* Standard scripts are very simple and at the time they can only be used
27* to load other script languages having more functionality.
28*
29* @see IResourceLoader
30* \ingroup script
31**/
32class LuaScriptLoader : public IResourceLoader{
33public:
34
35        /**
36        * Declare supported resource types and supported files.
37        **/
38        LuaScriptLoader();
39
40        /**
41        * Destructor
42        **/
43        ~LuaScriptLoader();
44
45        private:
46               
47        /**
48        * Initialize supported resource and file types for the resource script
49        **/
50        Result initializeResourceLoader();
51
52        /**
53        * Load the script resource.
54        **/
55        Result loadResource(IResource* res, const std::string& fileName, PropertyList* param = NULL);
56
57        /**
58        * Create an empty script resource. The resource represents a script
59        * which does have no effect.
60        **/
61        IResource* createEmptyResource(const ::std::string& resourceType);
62
63
64        /**
65        * Create an instance of script object.
66        **/
67        IResource* createResource(const std::string& resourceType, PropertyList* params = NULL);
68
69};
70
71#endif
Note: See TracBrowser for help on using the repository browser.