Otclient  14/8/2020
Module Class Reference

#include <module.h>

Inheritance diagram for Module:
Collaboration diagram for Module:

Public Member Functions

 Module (const std::string &name)
 
bool load ()
 
void unload ()
 
bool reload ()
 
bool canUnload ()
 
bool canReload ()
 
bool isLoaded ()
 
bool isReloadable ()
 
bool isDependent ()
 
bool isSandboxed ()
 
bool hasDependency (const std::string &name, bool recursive=false)
 
int getSandbox (LuaInterface *lua)
 
std::string getDescription ()
 
std::string getName ()
 
std::string getAuthor ()
 
std::string getWebsite ()
 
std::string getVersion ()
 
bool isAutoLoad ()
 
int getAutoLoadPriority ()
 
ModulePtr asModule ()
 
- Public Member Functions inherited from LuaObject
 LuaObject ()
 
virtual ~LuaObject ()
 
template<typename T >
void connectLuaField (const std::string &field, const std::function< T > &f, bool pushFront=false)
 
template<typename... T>
int luaCallLuaField (const std::string &field, const T &... args)
 
template<typename R , typename... T>
callLuaField (const std::string &field, const T &... args)
 
template<typename... T>
void callLuaField (const std::string &field, const T &... args)
 
bool hasLuaField (const std::string &field)
 Returns true if the lua field exists. More...
 
template<typename T >
void setLuaField (const std::string &key, const T &value)
 Sets a field in this lua object. More...
 
template<typename T >
getLuaField (const std::string &key)
 Gets a field from this lua object. More...
 
void releaseLuaFieldsTable ()
 Release fields table reference. More...
 
void luaSetField (const std::string &key)
 Sets a field from this lua object, the value must be on the stack. More...
 
void luaGetField (const std::string &key)
 Gets a field from this lua object, the result is pushed onto the stack. More...
 
void luaGetMetatable ()
 Get object's metatable. More...
 
void luaGetFieldsTable ()
 Gets the table containing all stored fields of this lua object, the result is pushed onto the stack. More...
 
int getUseCount ()
 
std::string getClassName ()
 Returns the derived class name, its the same name used in Lua. More...
 
LuaObjectPtr asLuaObject ()
 
void operator= (const LuaObject &)
 
- Public Member Functions inherited from stdext::shared_object
 shared_object ()
 
virtual ~shared_object ()
 
void add_ref ()
 
void dec_ref ()
 
refcount_t ref_count ()
 
template<typename T >
stdext::shared_object_ptr< T > static_self_cast ()
 
template<typename T >
stdext::shared_object_ptr< T > dynamic_self_cast ()
 
template<typename T >
stdext::shared_object_ptr< T > const_self_cast ()
 

Protected Member Functions

void discover (const OTMLNodePtr &moduleNode)
 

Friends

class ModuleManager
 

Detailed Description

Definition at line 32 of file module.h.

Constructor & Destructor Documentation

◆ Module()

Module::Module ( const std::string &  name)

Definition at line 30 of file module.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ asModule()

ModulePtr Module::asModule ( )
inline

Definition at line 59 of file module.h.

Here is the caller graph for this function:

◆ canReload()

bool Module::canReload ( )
inline

Definition at line 42 of file module.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ canUnload()

bool Module::canUnload ( )
inline

Definition at line 41 of file module.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ discover()

void Module::discover ( const OTMLNodePtr moduleNode)
protected

Definition at line 189 of file module.cpp.

Here is the call graph for this function:

◆ getAuthor()

std::string Module::getAuthor ( )
inline

Definition at line 52 of file module.h.

Here is the caller graph for this function:

◆ getAutoLoadPriority()

int Module::getAutoLoadPriority ( )
inline

Definition at line 56 of file module.h.

Here is the caller graph for this function:

◆ getDescription()

std::string Module::getDescription ( )
inline

Definition at line 50 of file module.h.

Here is the caller graph for this function:

◆ getName()

std::string Module::getName ( )
inline

Definition at line 51 of file module.h.

Here is the caller graph for this function:

◆ getSandbox()

int Module::getSandbox ( LuaInterface lua)

Definition at line 183 of file module.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVersion()

std::string Module::getVersion ( )
inline

Definition at line 54 of file module.h.

Here is the caller graph for this function:

◆ getWebsite()

std::string Module::getWebsite ( )
inline

Definition at line 53 of file module.h.

Here is the caller graph for this function:

◆ hasDependency()

bool Module::hasDependency ( const std::string &  name,
bool  recursive = false 
)

Definition at line 167 of file module.cpp.

Here is the call graph for this function:

◆ isAutoLoad()

bool Module::isAutoLoad ( )
inline

Definition at line 55 of file module.h.

Here is the caller graph for this function:

◆ isDependent()

bool Module::isDependent ( )

Definition at line 158 of file module.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isLoaded()

bool Module::isLoaded ( )
inline

Definition at line 43 of file module.h.

Here is the caller graph for this function:

◆ isReloadable()

bool Module::isReloadable ( )
inline

Definition at line 44 of file module.h.

Here is the caller graph for this function:

◆ isSandboxed()

bool Module::isSandboxed ( )
inline

Definition at line 46 of file module.h.

Here is the caller graph for this function:

◆ load()

bool Module::load ( )

Definition at line 36 of file module.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reload()

bool Module::reload ( )

Definition at line 152 of file module.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unload()

void Module::unload ( )

Definition at line 113 of file module.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ ModuleManager

friend class ModuleManager
friend

Definition at line 63 of file module.h.


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