xoreos
0.0.5
|
#include <functionman.h>
Classes | |
struct | FunctionEntry |
Public Member Functions | |
FunctionManager () | |
~FunctionManager () | |
void | clear () |
void | registerFunction (const Common::UString &name, uint32 id, const Function &func, const Signature &signature) |
void | registerFunction (const Common::UString &name, uint32 id, const Function &func, const Signature &signature, const Parameters &defaults) |
FunctionContext | createContext (const Common::UString &function) const |
void | call (const Common::UString &function, FunctionContext &ctx) const |
FunctionContext | createContext (uint32 function) const |
void | call (uint32 function, FunctionContext &ctx) const |
Private Types | |
typedef std::map< Common::UString, FunctionEntry > | FunctionMap |
typedef std::vector< FunctionEntry > | FunctionArray |
Private Member Functions | |
const FunctionEntry & | find (const Common::UString &function) const |
const FunctionEntry & | find (uint32 function) const |
Private Attributes | |
FunctionMap | _functionMap |
FunctionArray | _functionArray |
Additional Inherited Members | |
Static Public Member Functions inherited from Common::Singleton< FunctionManager > | |
static FunctionManager & | instance () |
static void | destroy () |
Protected Types inherited from Common::Singleton< FunctionManager > | |
typedef FunctionManager | SingletonBaseType |
Protected Member Functions inherited from Common::Singleton< FunctionManager > | |
Singleton () | |
virtual | ~Singleton () |
Definition at line 41 of file functionman.h.
|
private |
Definition at line 71 of file functionman.h.
|
private |
Definition at line 70 of file functionman.h.
Aurora::NWScript::FunctionManager::FunctionManager | ( | ) |
Definition at line 42 of file functionman.cpp.
Aurora::NWScript::FunctionManager::~FunctionManager | ( | ) |
Definition at line 45 of file functionman.cpp.
void Aurora::NWScript::FunctionManager::call | ( | const Common::UString & | function, |
FunctionContext & | ctx | ||
) | const |
Definition at line 87 of file functionman.cpp.
References Common::UString::c_str(), debugC(), debugCN(), DebugMan, Common::UString::empty(), find(), Aurora::NWScript::formatParams(), Aurora::NWScript::formatReturn(), Aurora::NWScript::formatType(), Aurora::NWScript::FunctionManager::FunctionEntry::func, Aurora::NWScript::FunctionContext::getName(), Aurora::NWScript::FunctionContext::getReturn(), Aurora::NWScript::Variable::getType(), and Common::kDebugEngineScripts.
void Aurora::NWScript::FunctionManager::call | ( | uint32 | function, |
FunctionContext & | ctx | ||
) | const |
Definition at line 105 of file functionman.cpp.
References Common::UString::c_str(), debugC(), debugCN(), DebugMan, Common::UString::empty(), find(), Aurora::NWScript::formatParams(), Aurora::NWScript::formatReturn(), Aurora::NWScript::formatType(), Aurora::NWScript::FunctionManager::FunctionEntry::func, Aurora::NWScript::FunctionContext::getName(), Aurora::NWScript::FunctionContext::getReturn(), Aurora::NWScript::Variable::getType(), and Common::kDebugEngineScripts.
void Aurora::NWScript::FunctionManager::clear | ( | ) |
Definition at line 48 of file functionman.cpp.
References _functionArray, and _functionMap.
FunctionContext Aurora::NWScript::FunctionManager::createContext | ( | const Common::UString & | function | ) | const |
Definition at line 83 of file functionman.cpp.
References Aurora::NWScript::FunctionManager::FunctionEntry::ctx, and find().
FunctionContext Aurora::NWScript::FunctionManager::createContext | ( | uint32 | function | ) | const |
Definition at line 101 of file functionman.cpp.
References Aurora::NWScript::FunctionManager::FunctionEntry::ctx, and find().
|
private |
Definition at line 119 of file functionman.cpp.
References _functionMap.
Referenced by call(), and createContext().
|
private |
Definition at line 127 of file functionman.cpp.
References _functionArray.
void Aurora::NWScript::FunctionManager::registerFunction | ( | const Common::UString & | name, |
uint32 | id, | ||
const Function & | func, | ||
const Signature & | signature | ||
) |
Definition at line 53 of file functionman.cpp.
void Aurora::NWScript::FunctionManager::registerFunction | ( | const Common::UString & | name, |
uint32 | id, | ||
const Function & | func, | ||
const Signature & | signature, | ||
const Parameters & | defaults | ||
) |
Definition at line 60 of file functionman.cpp.
References _functionArray, _functionMap, Common::UString::c_str(), and Aurora::NWScript::FunctionManager::FunctionEntry::func.
|
private |
Definition at line 74 of file functionman.h.
Referenced by clear(), find(), and registerFunction().
|
private |
Definition at line 73 of file functionman.h.
Referenced by clear(), find(), and registerFunction().