GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
boxed_value.hpp File Reference
#include <map>
#include <memory>
#include <type_traits>
#include "../chaiscript_defines.hpp"
#include "any.hpp"
#include "type_info.hpp"
Include dependency graph for boxed_value.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  chaiscript::Boxed_Value
 A wrapper for holding any valid C++ type. All types in ChaiScript are Boxed_Value objects. More...
struct  chaiscript::Boxed_Value::Void_Type
 used for explicitly creating a "void" object More...

Namespaces

namespace  chaiscript
 Namespace chaiscript contains every API call that the average user will be concerned with.
namespace  chaiscript::detail
 Classes and functions reserved for internal use. Items in this namespace are not supported.

Functions

template<typename T>
Boxed_Value chaiscript::var (T &&t)
 Creates a Boxed_Value. If the object passed in is a value type, it is copied. If it is a pointer, std::shared_ptr, or std::reference_type a copy is not made.
template<typename T>
Boxed_Value chaiscript::detail::const_var_impl (const T &t)
 Takes a value, copies it and returns a Boxed_Value object that is immutable.
template<typename T>
Boxed_Value chaiscript::detail::const_var_impl (T *t)
 Takes a pointer to a value, adds const to the pointed to type and returns an immutable Boxed_Value. Does not copy the pointed to value.
template<typename T>
Boxed_Value chaiscript::detail::const_var_impl (const std::shared_ptr< T > &t)
 Takes a std::shared_ptr to a value, adds const to the pointed to type and returns an immutable Boxed_Value. Does not copy the pointed to value.
template<typename T>
Boxed_Value chaiscript::detail::const_var_impl (const std::reference_wrapper< T > &t)
 Takes a std::reference_wrapper value, adds const to the referenced type and returns an immutable Boxed_Value. Does not copy the referenced value.
template<typename T>
Boxed_Value chaiscript::const_var (const T &t)
 Takes an object and returns an immutable Boxed_Value. If the object is a std::reference or pointer type the value is not copied. If it is an object type, it is copied.
Boxed_Value chaiscript::void_var ()
Boxed_Value chaiscript::const_var (bool b)