Classes | Public Member Functions | Static Public Member Functions | List of all members
chaiscript::Boxed_Value Class Reference

A wrapper for holding any valid C++ type. More...

#include <boxed_value.hpp>


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

Public Member Functions

template<typename T , typename = std::enable_if_t<!std::is_same_v<Boxed_Value, std::decay_t<T>>>>
 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_Valueoperator= (Boxed_Value &&)=default
 Boxed_Value (const Boxed_Value &)=default
Boxed_Valueoperator= (const Boxed_Value &)=default
void swap (Boxed_Value &rhs) noexcept
Boxed_Value assign (const Boxed_Value &rhs) noexcept
 Copy the values stored in rhs.m_data to m_data. More...
const Type_Infoget_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 noexcept
bool is_null () const noexcept
const chaiscript::detail::Anyget () 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_Valuecopy_attrs (const Boxed_Value &t_obj)
Boxed_Valueclone_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

Member Function Documentation

§ assign()

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

Copy the values stored in rhs.m_data to m_data.

m_data pointers are not shared in this case

§ type_match()

static bool chaiscript::Boxed_Value::type_match ( const Boxed_Value l,
const Boxed_Value r 
true if the two Boxed_Values share the same internal type

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