1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
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 Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef RY_MODULE_PROXY_H
18 #define RY_MODULE_PROXY_H
20 #include "nel/misc/types_nl.h"
21 #include "nel/misc/smart_ptr.h"
27 * A proxy to a module core. Usulful to abstract the core completly
28 * If you dont have a module but need a proxy ( e.g. : just before creating the module), build it with IModuleProxy( IModuleCore * core)
29 * Otherwise, use the getProxy method of your module, and inside a module method
30 * \author Nicolas Brigand
31 * \author Nevrax France
38 /// ctor ( needed by the module class )
40 /// ctor to use if you are not in a module ( CAUTION : the only real case is when you have to interact with a core before creating the module )
41 IModuleProxy( IModuleCore
* core
)
43 _ModuleCore
= dynamic_cast<T
*>(core
);
44 MODULE_AST(_ModuleCore
);
48 NLMISC::CRefPtr
<T
> _ModuleCore
;
52 #endif // RY_MODULE_PROXY_H
54 /* End of module_proxy.h */