xoreos  0.0.5
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Aurora::NWScript::FunctionManager Class Reference

#include <functionman.h>

Inheritance diagram for Aurora::NWScript::FunctionManager:
Inheritance graph
[legend]
Collaboration diagram for Aurora::NWScript::FunctionManager:
Collaboration graph
[legend]

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, FunctionEntryFunctionMap
 
typedef std::vector< FunctionEntryFunctionArray
 

Private Member Functions

const FunctionEntryfind (const Common::UString &function) const
 
const FunctionEntryfind (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 ()
 

Detailed Description

Definition at line 41 of file functionman.h.

Member Typedef Documentation

◆ FunctionArray

Definition at line 71 of file functionman.h.

◆ FunctionMap

Definition at line 70 of file functionman.h.

Constructor & Destructor Documentation

◆ FunctionManager()

Aurora::NWScript::FunctionManager::FunctionManager ( )

Definition at line 42 of file functionman.cpp.

◆ ~FunctionManager()

Aurora::NWScript::FunctionManager::~FunctionManager ( )

Definition at line 45 of file functionman.cpp.

Member Function Documentation

◆ call() [1/2]

void Aurora::NWScript::FunctionManager::call ( const Common::UString function,
FunctionContext ctx 
) const

◆ call() [2/2]

void Aurora::NWScript::FunctionManager::call ( uint32  function,
FunctionContext ctx 
) const

◆ clear()

void Aurora::NWScript::FunctionManager::clear ( )

Definition at line 48 of file functionman.cpp.

References _functionArray, and _functionMap.

◆ createContext() [1/2]

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().

Here is the call graph for this function:

◆ createContext() [2/2]

FunctionContext Aurora::NWScript::FunctionManager::createContext ( uint32  function) const

Definition at line 101 of file functionman.cpp.

References Aurora::NWScript::FunctionManager::FunctionEntry::ctx, and find().

Here is the call graph for this function:

◆ find() [1/2]

const FunctionManager::FunctionEntry & Aurora::NWScript::FunctionManager::find ( const Common::UString function) const
private

Definition at line 119 of file functionman.cpp.

References _functionMap.

Referenced by call(), and createContext().

Here is the caller graph for this function:

◆ find() [2/2]

const FunctionManager::FunctionEntry & Aurora::NWScript::FunctionManager::find ( uint32  function) const
private

Definition at line 127 of file functionman.cpp.

References _functionArray.

◆ registerFunction() [1/2]

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.

◆ registerFunction() [2/2]

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.

Here is the call graph for this function:

Member Data Documentation

◆ _functionArray

FunctionArray Aurora::NWScript::FunctionManager::_functionArray
private

Definition at line 74 of file functionman.h.

Referenced by clear(), find(), and registerFunction().

◆ _functionMap

FunctionMap Aurora::NWScript::FunctionManager::_functionMap
private

Definition at line 73 of file functionman.h.

Referenced by clear(), find(), and registerFunction().


The documentation for this class was generated from the following files: