HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AttrDelegate< C > Class Template Reference

#include <attrdelegate.h>

Public Member Functions

 AttrDelegate (C *obj, string_view name)
 
template<typename T , typename std::enable_if<!pvt::is_string< T >::value, int >::type = 0>
const Toperator= (const T &val)
 
template<typename T , typename std::enable_if< pvt::is_string< T >::value, int >::type = 1>
const Toperator= (const T &val)
 
const char * operator= (const char *val)
 
TypeDesc type () const
 
template<typename T , typename std::enable_if<!pvt::is_string< T >::value, int >::type = 0>
T get (const T &defaultval=T()) const
 
template<typename T = string_view, typename std::enable_if< pvt::is_string< T >::value, int >::type = 1>
T get (const T &defaultval=T()) const
 
template<typename T , typename std::enable_if<!pvt::is_string< T >::value, int >::type = 0>
T get_indexed (int index, const T &defaultval=T()) const
 
template<typename T = string_view, typename std::enable_if< pvt::is_string< T >::value, int >::type = 1>
T get_indexed (int index, const T &defaultval=T()) const
 
std::string as_string (const std::string &defaultval=std::string())
 
template<typename T , typename Allocator = std::allocator<T>>
std::vector< T, Allocator > as_vec () const
 
 operator std::string ()
 

Protected Attributes

C * m_obj
 
string_view m_name
 
bool m_readonly = false
 

Detailed Description

template<class C>
class AttrDelegate< C >

Definition at line 83 of file attrdelegate.h.

Constructor & Destructor Documentation

template<class C >
AttrDelegate< C >::AttrDelegate ( C *  obj,
string_view  name 
)
inline

Definition at line 85 of file attrdelegate.h.

Member Function Documentation

template<class C >
std::string AttrDelegate< C >::as_string ( const std::string defaultval = std::string())
inline

Definition at line 182 of file attrdelegate.h.

template<class C >
template<typename T , typename Allocator = std::allocator<T>>
std::vector<T, Allocator> AttrDelegate< C >::as_vec ( ) const
inline

Definition at line 210 of file attrdelegate.h.

template<class C >
template<typename T , typename std::enable_if<!pvt::is_string< T >::value, int >::type = 0>
T AttrDelegate< C >::get ( const T defaultval = T()) const
inline

Definition at line 133 of file attrdelegate.h.

template<class C >
template<typename T = string_view, typename std::enable_if< pvt::is_string< T >::value, int >::type = 1>
T AttrDelegate< C >::get ( const T defaultval = T()) const
inline

Definition at line 146 of file attrdelegate.h.

template<class C >
template<typename T , typename std::enable_if<!pvt::is_string< T >::value, int >::type = 0>
T AttrDelegate< C >::get_indexed ( int  index,
const T defaultval = T() 
) const
inline

Definition at line 157 of file attrdelegate.h.

template<class C >
template<typename T = string_view, typename std::enable_if< pvt::is_string< T >::value, int >::type = 1>
T AttrDelegate< C >::get_indexed ( int  index,
const T defaultval = T() 
) const
inline

Definition at line 171 of file attrdelegate.h.

template<class C >
AttrDelegate< C >::operator std::string ( )
inline

Definition at line 223 of file attrdelegate.h.

template<class C >
template<typename T , typename std::enable_if<!pvt::is_string< T >::value, int >::type = 0>
const T& AttrDelegate< C >::operator= ( const T val)
inline

Definition at line 97 of file attrdelegate.h.

template<class C >
template<typename T , typename std::enable_if< pvt::is_string< T >::value, int >::type = 1>
const T& AttrDelegate< C >::operator= ( const T val)
inline

Definition at line 109 of file attrdelegate.h.

template<class C >
const char* AttrDelegate< C >::operator= ( const char *  val)
inline

Definition at line 116 of file attrdelegate.h.

template<class C >
TypeDesc AttrDelegate< C >::type ( ) const
inline

Definition at line 126 of file attrdelegate.h.

Member Data Documentation

template<class C >
string_view AttrDelegate< C >::m_name
protected

Definition at line 227 of file attrdelegate.h.

template<class C >
C* AttrDelegate< C >::m_obj
protected

Definition at line 226 of file attrdelegate.h.

template<class C >
bool AttrDelegate< C >::m_readonly = false
protected

Definition at line 228 of file attrdelegate.h.


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