Catos Engine (Source) 0.0.1
Lightweight Game engine
Loading...
Searching...
No Matches
catos::PropertyImpl< T, U > Class Template Reference

PropertyImpl implements Property and holds an member function pointer. Used to get an value of an field of an Type's instance. More...

#include <registry.h>

Inherits catos::Property.

Public Member Functions

 PropertyImpl (U T::*memPtr)
 PropertyImpl exist in order to avoid having to deal with templates at the user-side.
 
void set_name (const char *new_name) override
 Set the name of the property.
 
voidget_value (const void *objPtr) override
 Use Get value (which can be cased to the desired type) to return an value of an instance.
 
const charget_name () override
 Get the name of the property.
 
const charget_type_name () override
 Returns the name of the fields type.
 
size_t & get_type_hash () override
 Returns (a reference of) the type's hash.
 
void registerToPy () override
 
- Public Member Functions inherited from catos::Property
virtual ~Property ()
 

Public Attributes

U T::* memberPtr
 
const charname
 
std::string type_name
 
size_t type_hash
 
- Public Attributes inherited from catos::Property
cstr desc = "NONE"
 

Detailed Description

template<typename T, typename U>
class catos::PropertyImpl< T, U >

PropertyImpl implements Property and holds an member function pointer. Used to get an value of an field of an Type's instance.

Constructor & Destructor Documentation

◆ PropertyImpl()

template<typename T , typename U >
catos::PropertyImpl< T, U >::PropertyImpl ( U T::* memPtr)
inline

PropertyImpl exist in order to avoid having to deal with templates at the user-side.

Member Function Documentation

◆ get_name()

template<typename T , typename U >
const char * catos::PropertyImpl< T, U >::get_name ( )
inlineoverridevirtual

Get the name of the property.

Implements catos::Property.

◆ get_type_hash()

template<typename T , typename U >
size_t & catos::PropertyImpl< T, U >::get_type_hash ( )
inlineoverridevirtual

Returns (a reference of) the type's hash.

Implements catos::Property.

◆ get_type_name()

template<typename T , typename U >
const char * catos::PropertyImpl< T, U >::get_type_name ( )
inlineoverridevirtual

Returns the name of the fields type.

Implements catos::Property.

◆ get_value()

template<typename T , typename U >
void * catos::PropertyImpl< T, U >::get_value ( const void * objPtr)
inlineoverridevirtual

Use Get value (which can be cased to the desired type) to return an value of an instance.

Implements catos::Property.

◆ registerToPy()

template<typename T , typename U >
void catos::PropertyImpl< T, U >::registerToPy ( )
inlineoverridevirtual

Implements catos::Property.

◆ set_name()

template<typename T , typename U >
void catos::PropertyImpl< T, U >::set_name ( const char * new_name)
inlineoverridevirtual

Set the name of the property.

Implements catos::Property.

Member Data Documentation

◆ memberPtr

template<typename T , typename U >
U T::* catos::PropertyImpl< T, U >::memberPtr

◆ name

template<typename T , typename U >
const char* catos::PropertyImpl< T, U >::name

◆ type_hash

template<typename T , typename U >
size_t catos::PropertyImpl< T, U >::type_hash

◆ type_name

template<typename T , typename U >
std::string catos::PropertyImpl< T, U >::type_name

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