GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
chaiscript::Boxed_Value Class Reference

A wrapper for holding any valid C++ type. All types in ChaiScript are Boxed_Value objects. More...

#include <boxed_value.hpp>

Classes

struct  Void_Type
 used for explicitly creating a "void" object More...

Public Member Functions

template<typename T, typename = typename std::enable_if<!std::is_same<Boxed_Value, typename std::decay<T>::type>::value>::type>
 Boxed_Value (T &&t, bool t_return_value=false)
 Basic Boxed_Value constructor.
 Boxed_Value ()=default
 Unknown-type constructor.
 Boxed_Value (Boxed_Value &&)=default
Boxed_Value & operator= (Boxed_Value &&)=default
 Boxed_Value (const Boxed_Value &)=default
Boxed_Value & operator= (const Boxed_Value &)=default
void swap (Boxed_Value &rhs)
Boxed_Value assign (const Boxed_Value &rhs)
const Type_Info & get_type_info () const noexcept
bool is_undef () const noexcept
 return true if the object is uninitialized
bool is_const () const noexcept
bool is_type (const Type_Info &ti) const noexcept
template<typename T>
auto pointer_sentinel (std::shared_ptr< T > &ptr) const
bool is_null () const noexcept
const chaiscript::detail::Any & get () const noexcept
bool is_ref () const noexcept
bool is_return_value () const noexcept
void reset_return_value () const noexcept
bool is_pointer () const noexcept
void * get_ptr () const noexcept
const void * get_const_ptr () const noexcept
Boxed_Value get_attr (const std::string &t_name)
Boxed_Value & copy_attrs (const Boxed_Value &t_obj)
Boxed_Value & clone_attrs (const Boxed_Value &t_obj)

Static Public Member Functions

static bool type_match (const Boxed_Value &l, const Boxed_Value &r) noexcept

Detailed Description

A wrapper for holding any valid C++ type. All types in ChaiScript are Boxed_Value objects.

See also
chaiscript::boxed_cast

Constructor & Destructor Documentation

◆ Boxed_Value() [1/4]

template<typename T, typename = typename std::enable_if<!std::is_same<Boxed_Value, typename std::decay<T>::type>::value>::type>
chaiscript::Boxed_Value::Boxed_Value ( T && t,
bool t_return_value = false )
inlineexplicit

Basic Boxed_Value constructor.

Here is the caller graph for this function:

◆ Boxed_Value() [2/4]

chaiscript::Boxed_Value::Boxed_Value ( )
default

Unknown-type constructor.

Here is the caller graph for this function:

◆ Boxed_Value() [3/4]

chaiscript::Boxed_Value::Boxed_Value ( Boxed_Value && )
default

◆ Boxed_Value() [4/4]

chaiscript::Boxed_Value::Boxed_Value ( const Boxed_Value & )
default

Member Function Documentation

◆ assign()

Boxed_Value chaiscript::Boxed_Value::assign ( const Boxed_Value & rhs)
inline

Copy the values stored in rhs.m_data to m_data. m_data pointers are not shared in this case

Here is the caller graph for this function:

◆ clone_attrs()

Boxed_Value & chaiscript::Boxed_Value::clone_attrs ( const Boxed_Value & t_obj)
inline
Here is the caller graph for this function:

◆ copy_attrs()

Boxed_Value & chaiscript::Boxed_Value::copy_attrs ( const Boxed_Value & t_obj)
inline
Here is the caller graph for this function:

◆ get()

const chaiscript::detail::Any & chaiscript::Boxed_Value::get ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ get_attr()

Boxed_Value chaiscript::Boxed_Value::get_attr ( const std::string & t_name)
inline
Here is the caller graph for this function:

◆ get_const_ptr()

const void * chaiscript::Boxed_Value::get_const_ptr ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ get_ptr()

void * chaiscript::Boxed_Value::get_ptr ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ get_type_info()

const Type_Info & chaiscript::Boxed_Value::get_type_info ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ is_const()

bool chaiscript::Boxed_Value::is_const ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ is_null()

bool chaiscript::Boxed_Value::is_null ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ is_pointer()

bool chaiscript::Boxed_Value::is_pointer ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ is_ref()

bool chaiscript::Boxed_Value::is_ref ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ is_return_value()

bool chaiscript::Boxed_Value::is_return_value ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ is_type()

bool chaiscript::Boxed_Value::is_type ( const Type_Info & ti) const
inlinenoexcept
Here is the caller graph for this function:

◆ is_undef()

bool chaiscript::Boxed_Value::is_undef ( ) const
inlinenoexcept

return true if the object is uninitialized

Here is the caller graph for this function:

◆ operator=() [1/2]

Boxed_Value & chaiscript::Boxed_Value::operator= ( Boxed_Value && )
default
Here is the caller graph for this function:

◆ operator=() [2/2]

Boxed_Value & chaiscript::Boxed_Value::operator= ( const Boxed_Value & )
default

◆ pointer_sentinel()

template<typename T>
auto chaiscript::Boxed_Value::pointer_sentinel ( std::shared_ptr< T > & ptr) const
inline
Here is the caller graph for this function:

◆ reset_return_value()

void chaiscript::Boxed_Value::reset_return_value ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ swap()

void chaiscript::Boxed_Value::swap ( Boxed_Value & rhs)
inline

◆ type_match()

bool chaiscript::Boxed_Value::type_match ( const Boxed_Value & l,
const Boxed_Value & r )
inlinestaticnoexcept
Returns
true if the two Boxed_Values share the same internal type
Here is the caller graph for this function:

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