Otclient  14/8/2020
luavaluecasts.h File Reference
#include "declarations.h"
#include <framework/otml/declarations.h>
#include "luaexception.h"
#include "luainterface.h"
#include "luaobject.h"
Include dependency graph for luavaluecasts.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  push_tuple_internal_luavalue< N >
 
struct  push_tuple_internal_luavalue< 0 >
 
struct  push_tuple_luavalue< N >
 
struct  push_tuple_luavalue< 0 >
 

Functions

template<typename T >
int push_internal_luavalue (T v)
 
int push_luavalue (bool b)
 
bool luavalue_cast (int index, bool &b)
 
int push_luavalue (int i)
 
bool luavalue_cast (int index, int &i)
 
int push_luavalue (double d)
 
bool luavalue_cast (int index, double &d)
 
int push_luavalue (float f)
 
bool luavalue_cast (int index, float &f)
 
int push_luavalue (int8 v)
 
bool luavalue_cast (int index, int8 &v)
 
int push_luavalue (uint8 v)
 
bool luavalue_cast (int index, uint8 &v)
 
int push_luavalue (int16 v)
 
bool luavalue_cast (int index, int16 &v)
 
int push_luavalue (uint16 v)
 
bool luavalue_cast (int index, uint16 &v)
 
int push_luavalue (uint32 v)
 
bool luavalue_cast (int index, uint32 &v)
 
int push_luavalue (int64 v)
 
bool luavalue_cast (int index, int64 &v)
 
int push_luavalue (uint64 v)
 
bool luavalue_cast (int index, uint64 &v)
 
int push_luavalue (const char *cstr)
 
int push_luavalue (const std::string &str)
 
bool luavalue_cast (int index, std::string &str)
 
int push_luavalue (const LuaCppFunction &func)
 
int push_luavalue (const Color &color)
 
bool luavalue_cast (int index, Color &color)
 
int push_luavalue (const Rect &rect)
 
bool luavalue_cast (int index, Rect &rect)
 
int push_luavalue (const Point &point)
 
bool luavalue_cast (int index, Point &point)
 
int push_luavalue (const Size &size)
 
bool luavalue_cast (int index, Size &size)
 
int push_luavalue (const OTMLNodePtr &node)
 
bool luavalue_cast (int index, OTMLNodePtr &node)
 
template<class T >
std::enable_if< std::is_enum< T >::value, int >::type push_luavalue (T e)
 
template<class T >
std::enable_if< std::is_enum< T >::value, bool >::type luavalue_cast (int index, T &myenum)
 
template<class T >
std::enable_if< std::is_base_of< LuaObject, typename T::element_type >::value, int >::type push_luavalue (const T &obj)
 
bool luavalue_cast (int index, LuaObjectPtr &obj)
 
template<class T >
std::enable_if< std::is_base_of< LuaObject, T >::value, bool >::type luavalue_cast (int index, stdext::shared_object_ptr< T > &ptr)
 
template<typename Ret , typename... Args>
int push_luavalue (const std::function< Ret(Args...)> &func)
 
template<typename... Args>
bool luavalue_cast (int index, std::function< void(Args...)> &func)
 
template<typename Ret , typename... Args>
std::enable_if<!std::is_void< Ret >::value, bool >::type luavalue_cast (int index, std::function< Ret(Args...)> &func)
 
template<typename T >
int push_luavalue (const std::list< T > &list)
 
template<typename T >
bool luavalue_cast (int index, std::list< T > &list)
 
template<typename T >
int push_luavalue (const std::vector< T > &vec)
 
template<typename T >
bool luavalue_cast (int index, std::vector< T > &vec)
 
template<class T >
int push_luavalue (const std::deque< T > &vec)
 
template<typename T >
bool luavalue_cast (int index, std::deque< T > &vec)
 
template<class K , class V >
int push_luavalue (const std::map< K, V > &map)
 
template<class K , class V >
bool luavalue_cast (int index, std::map< K, V > &map)
 
template<typename... Args>
int push_luavalue (const std::tuple< Args... > &tuple)
 
template<typename... Args>
int push_internal_luavalue (const std::tuple< Args... > &tuple)
 

Function Documentation

◆ luavalue_cast() [1/26]

bool luavalue_cast ( int  index,
bool &  b 
)

Definition at line 34 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ luavalue_cast() [2/26]

bool luavalue_cast ( int  index,
Color color 
)

Definition at line 111 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ luavalue_cast() [3/26]

bool luavalue_cast ( int  index,
double &  d 
)

Definition at line 62 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ luavalue_cast() [4/26]

bool luavalue_cast ( int  index,
float &  f 
)
inline

Definition at line 48 of file luavaluecasts.h.

Here is the call graph for this function:

◆ luavalue_cast() [5/26]

bool luavalue_cast ( int  index,
int &  i 
)

Definition at line 47 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ luavalue_cast() [6/26]

bool luavalue_cast ( int  index,
int16 v 
)
inline

Definition at line 58 of file luavaluecasts.h.

Here is the call graph for this function:

◆ luavalue_cast() [7/26]

bool luavalue_cast ( int  index,
int64 v 
)
inline

Definition at line 67 of file luavaluecasts.h.

Here is the call graph for this function:

◆ luavalue_cast() [8/26]

bool luavalue_cast ( int  index,
int8 v 
)
inline

Definition at line 52 of file luavaluecasts.h.

Here is the call graph for this function:

◆ luavalue_cast() [9/26]

bool luavalue_cast ( int  index,
LuaObjectPtr obj 
)

Definition at line 326 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ luavalue_cast() [10/26]

bool luavalue_cast ( int  index,
OTMLNodePtr node 
)

Definition at line 284 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ luavalue_cast() [11/26]

bool luavalue_cast ( int  index,
Point point 
)

Definition at line 179 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ luavalue_cast() [12/26]

bool luavalue_cast ( int  index,
Rect rect 
)

Definition at line 147 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ luavalue_cast() [13/26]

bool luavalue_cast ( int  index,
Size size 
)

Definition at line 207 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ luavalue_cast() [14/26]

template<typename T >
bool luavalue_cast ( int  index,
std::deque< T > &  vec 
)

Definition at line 357 of file luavaluecasts.h.

Here is the call graph for this function:

◆ luavalue_cast() [15/26]

template<typename Ret , typename... Args>
std::enable_if<!std::is_void< Ret >::value, bool >::type luavalue_cast ( int  index,
std::function< Ret(Args...)> &  func 
)

Definition at line 255 of file luavaluecasts.h.

Here is the call graph for this function:

◆ luavalue_cast() [16/26]

template<typename... Args>
bool luavalue_cast ( int  index,
std::function< void(Args...)> &  func 
)

Definition at line 222 of file luavaluecasts.h.

Here is the call graph for this function:

◆ luavalue_cast() [17/26]

template<typename T >
bool luavalue_cast ( int  index,
std::list< T > &  list 
)

Definition at line 301 of file luavaluecasts.h.

Here is the call graph for this function:

◆ luavalue_cast() [18/26]

template<class K , class V >
bool luavalue_cast ( int  index,
std::map< K, V > &  map 
)

Definition at line 385 of file luavaluecasts.h.

Here is the call graph for this function:

◆ luavalue_cast() [19/26]

bool luavalue_cast ( int  index,
std::string &  str 
)

Definition at line 83 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ luavalue_cast() [20/26]

template<typename T >
bool luavalue_cast ( int  index,
std::vector< T > &  vec 
)

Definition at line 329 of file luavaluecasts.h.

Here is the call graph for this function:

◆ luavalue_cast() [21/26]

template<class T >
std::enable_if< std::is_base_of< LuaObject, T >::value, bool >::type luavalue_cast ( int  index,
stdext::shared_object_ptr< T > &  ptr 
)

Definition at line 200 of file luavaluecasts.h.

Here is the call graph for this function:

◆ luavalue_cast() [22/26]

template<class T >
std::enable_if< std::is_enum< T >::value, bool >::type luavalue_cast ( int  index,
T &  myenum 
)

Definition at line 179 of file luavaluecasts.h.

Here is the call graph for this function:

◆ luavalue_cast() [23/26]

bool luavalue_cast ( int  index,
uint16 v 
)
inline

Definition at line 61 of file luavaluecasts.h.

Here is the call graph for this function:

◆ luavalue_cast() [24/26]

bool luavalue_cast ( int  index,
uint32 v 
)
inline

Definition at line 64 of file luavaluecasts.h.

Here is the call graph for this function:

◆ luavalue_cast() [25/26]

bool luavalue_cast ( int  index,
uint64 v 
)
inline

Definition at line 70 of file luavaluecasts.h.

Here is the call graph for this function:

◆ luavalue_cast() [26/26]

bool luavalue_cast ( int  index,
uint8 v 
)
inline

Definition at line 55 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_internal_luavalue() [1/2]

template<typename... Args>
int push_internal_luavalue ( const std::tuple< Args... > &  tuple)

Definition at line 419 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_internal_luavalue() [2/2]

template<typename T >
int push_internal_luavalue ( v)

Definition at line 173 of file luavaluecasts.h.

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

◆ push_luavalue() [1/27]

int push_luavalue ( bool  b)

Definition at line 28 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ push_luavalue() [2/27]

int push_luavalue ( const char *  cstr)

Definition at line 71 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ push_luavalue() [3/27]

int push_luavalue ( const Color color)

Definition at line 97 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ push_luavalue() [4/27]

int push_luavalue ( const LuaCppFunction func)

Definition at line 90 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ push_luavalue() [5/27]

int push_luavalue ( const OTMLNodePtr node)

Definition at line 267 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ push_luavalue() [6/27]

int push_luavalue ( const Point point)

Definition at line 169 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ push_luavalue() [7/27]

int push_luavalue ( const Rect rect)

Definition at line 133 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ push_luavalue() [8/27]

int push_luavalue ( const Size size)

Definition at line 197 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ push_luavalue() [9/27]

template<class T >
int push_luavalue ( const std::deque< T > &  vec)

Definition at line 345 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_luavalue() [10/27]

template<typename Ret , typename... Args>
int push_luavalue ( const std::function< Ret(Args...)> &  func)

Definition at line 212 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_luavalue() [11/27]

template<typename T >
int push_luavalue ( const std::list< T > &  list)

Definition at line 289 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_luavalue() [12/27]

template<class K , class V >
int push_luavalue ( const std::map< K, V > &  map)

Definition at line 373 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_luavalue() [13/27]

int push_luavalue ( const std::string &  str)

Definition at line 77 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ push_luavalue() [14/27]

template<typename... Args>
int push_luavalue ( const std::tuple< Args... > &  tuple)

Definition at line 441 of file luavaluecasts.h.

◆ push_luavalue() [15/27]

template<typename T >
int push_luavalue ( const std::vector< T > &  vec)

Definition at line 317 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_luavalue() [16/27]

template<class T >
std::enable_if< std::is_base_of< LuaObject, typename T::element_type >::value, int >::type push_luavalue ( const T &  obj)

Definition at line 190 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_luavalue() [17/27]

int push_luavalue ( double  d)

Definition at line 56 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ push_luavalue() [18/27]

int push_luavalue ( float  f)
inline

Definition at line 47 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_luavalue() [19/27]

int push_luavalue ( int  i)

Definition at line 41 of file luavaluecasts.cpp.

Here is the call graph for this function:

◆ push_luavalue() [20/27]

int push_luavalue ( int16  v)
inline

Definition at line 57 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_luavalue() [21/27]

int push_luavalue ( int64  v)
inline

Definition at line 66 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_luavalue() [22/27]

int push_luavalue ( int8  v)
inline

Definition at line 51 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_luavalue() [23/27]

template<class T >
std::enable_if<std::is_enum<T>::value, int>::type push_luavalue ( e)

Definition at line 103 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_luavalue() [24/27]

int push_luavalue ( uint16  v)
inline

Definition at line 60 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_luavalue() [25/27]

int push_luavalue ( uint32  v)
inline

Definition at line 63 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_luavalue() [26/27]

int push_luavalue ( uint64  v)
inline

Definition at line 69 of file luavaluecasts.h.

Here is the call graph for this function:

◆ push_luavalue() [27/27]

int push_luavalue ( uint8  v)
inline

Definition at line 54 of file luavaluecasts.h.

Here is the call graph for this function: