UGDK
Classes | Namespaces | Defines | Functions
src/ugdk/script/virtualprimitive.h File Reference
#include <ugdk/script/virtualdata.h>
#include <ugdk/script/type.h>
Include dependency graph for virtualprimitive.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ugdk::script::VirtualPrimitive< T >
class  ugdk::script::VirtualPrimitive< T * >

Namespaces

namespace  ugdk
namespace  ugdk::script

Defines

#define TYPENAME_MAP(definition)
#define DEFINE_SCRIPT_PRIMITIVE_VALUE(type, name, arg)
#define DEFINE_SCRIPT_SIMPLE_PRIMITIVE_VALUE(type, name)   DEFINE_SCRIPT_PRIMITIVE_VALUE(type, name, value)

Functions

 ugdk::script::DEFINE_SCRIPT_PRIMITIVE_VALUE (std::string, String, value.c_str())

Define Documentation

#define DEFINE_SCRIPT_PRIMITIVE_VALUE (   type,
  name,
  arg 
)
Value:
template <> \
    class VirtualPrimitive<type> { \
      public: \
        static type value(const VirtualData::Ptr data, bool disown) { \
            return static_cast<type>(data->Unwrap##name()); \
        } \
        static void set_value(const VirtualData::Ptr data, type value) { \
            data->Wrap##name(arg);  \
        } \
      private: \
        VirtualPrimitive() {} \
    }
#define DEFINE_SCRIPT_SIMPLE_PRIMITIVE_VALUE (   type,
  name 
)    DEFINE_SCRIPT_PRIMITIVE_VALUE(type, name, value)
#define TYPENAME_MAP (   definition)
Value:
definition(const char*, String); \
    definition(bool, Boolean); \
    definition(int, Integer); \
    definition(long, Integer); \
    definition(short, Integer); \
    definition(float, Number); \
    definition(double, Number);
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines