38 empty(true), ctx(name) {
64 std::pair<FunctionMap::iterator, bool> result;
73 f.ctx.setSignature(signature);
74 f.ctx.setDefaults(defaults);
120 FunctionMap::const_iterator f =
_functionMap.find(
function);
std::vector< class Variable > Parameters
void debugC(Common::DebugChannel channel, uint32 level, const char *s,...)
A class holding an UTF-8 string.
Utility functions for debug output.
Common::UString formatType(Type type)
Construct a string describing this variable type.
"EScripts", engine scripts.
The NWScript function manager.
void call(const Common::UString &function, FunctionContext &ctx) const
Basic exceptions to throw.
FunctionContext createContext(const Common::UString &function) const
const char * c_str() const
Return the (utf8 encoded) string data.
Common::UString formatReturn(const FunctionContext &ctx)
Construct a string describing the return value of this function.
Utility templates and functions.
#define DECLARE_SINGLETON(T)
Note that you need to use this macro from the global namespace.
FunctionArray _functionArray
FunctionEntry(const Common::UString &name="")
bool empty() const
Is the string empty?
std::vector< Type > Signature
const Common::UString & getName() const
void debugCN(Common::DebugChannel channel, uint32 level, const char *s,...)
#define DebugMan
Shortcut for accessing the debug manager.
void registerFunction(const Common::UString &name, uint32 id, const Function &func, const Signature &signature)
const FunctionEntry & find(const Common::UString &function) const
Common::UString formatParams(const FunctionContext &ctx)
Construct a string describing parameters of this function.
boost::function< void(class FunctionContext &ctx)> Function