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

#include <type_conversions.hpp>

Classes

struct  Conversion_Saves
struct  Less_Than

Public Member Functions

 Type_Conversions ()
 Type_Conversions (const Type_Conversions &t_other)=delete
 Type_Conversions (Type_Conversions &&)=default
Type_Conversions & operator= (const Type_Conversions &)=delete
Type_Conversions & operator= (Type_Conversions &&)=default
const std::set< const std::type_info *, Less_Than > & thread_cache () const
void add_conversion (const std::shared_ptr< detail::Type_Conversion_Base > &conversion)
template<typename T>
bool convertable_type () const
template<typename To, typename From>
bool converts () const
bool converts (const Type_Info &to, const Type_Info &from) const
template<typename To>
Boxed_Value boxed_type_conversion (Conversion_Saves &t_saves, const Boxed_Value &from) const
template<typename From>
Boxed_Value boxed_type_down_conversion (Conversion_Saves &t_saves, const Boxed_Value &to) const
Boxed_Value boxed_type_conversion (const Type_Info &to, Conversion_Saves &t_saves, const Boxed_Value &from) const
Boxed_Value boxed_type_down_conversion (const Type_Info &from, Conversion_Saves &t_saves, const Boxed_Value &to) const
std::vector< Boxed_Value > take_saves (Conversion_Saves &t_saves)
bool has_conversion (const Type_Info &to, const Type_Info &from) const
std::shared_ptr< detail::Type_Conversion_Base > get_conversion (const Type_Info &to, const Type_Info &from) const
Conversion_Saves & conversion_saves () const

Static Public Member Functions

static void enable_conversion_saves (Conversion_Saves &t_saves, bool t_val)

Constructor & Destructor Documentation

◆ Type_Conversions() [1/3]

chaiscript::Type_Conversions::Type_Conversions ( )
inline
Here is the caller graph for this function:

◆ Type_Conversions() [2/3]

chaiscript::Type_Conversions::Type_Conversions ( const Type_Conversions & t_other)
delete

◆ Type_Conversions() [3/3]

chaiscript::Type_Conversions::Type_Conversions ( Type_Conversions && )
default

Member Function Documentation

◆ add_conversion()

void chaiscript::Type_Conversions::add_conversion ( const std::shared_ptr< detail::Type_Conversion_Base > & conversion)
inline
Todo
error if a conversion already exists

◆ boxed_type_conversion() [1/2]

Boxed_Value chaiscript::Type_Conversions::boxed_type_conversion ( const Type_Info & to,
Conversion_Saves & t_saves,
const Boxed_Value & from ) const
inline

◆ boxed_type_conversion() [2/2]

template<typename To>
Boxed_Value chaiscript::Type_Conversions::boxed_type_conversion ( Conversion_Saves & t_saves,
const Boxed_Value & from ) const
inline
Here is the caller graph for this function:

◆ boxed_type_down_conversion() [1/2]

Boxed_Value chaiscript::Type_Conversions::boxed_type_down_conversion ( const Type_Info & from,
Conversion_Saves & t_saves,
const Boxed_Value & to ) const
inline

◆ boxed_type_down_conversion() [2/2]

template<typename From>
Boxed_Value chaiscript::Type_Conversions::boxed_type_down_conversion ( Conversion_Saves & t_saves,
const Boxed_Value & to ) const
inline
Here is the caller graph for this function:

◆ conversion_saves()

Conversion_Saves & chaiscript::Type_Conversions::conversion_saves ( ) const
inline
Here is the caller graph for this function:

◆ convertable_type()

template<typename T>
bool chaiscript::Type_Conversions::convertable_type ( ) const
inline

◆ converts() [1/2]

template<typename To, typename From>
bool chaiscript::Type_Conversions::converts ( ) const
inline
Here is the caller graph for this function:

◆ converts() [2/2]

bool chaiscript::Type_Conversions::converts ( const Type_Info & to,
const Type_Info & from ) const
inline

◆ enable_conversion_saves()

void chaiscript::Type_Conversions::enable_conversion_saves ( Conversion_Saves & t_saves,
bool t_val )
inlinestatic

◆ get_conversion()

std::shared_ptr< detail::Type_Conversion_Base > chaiscript::Type_Conversions::get_conversion ( const Type_Info & to,
const Type_Info & from ) const
inline
Here is the caller graph for this function:

◆ has_conversion()

bool chaiscript::Type_Conversions::has_conversion ( const Type_Info & to,
const Type_Info & from ) const
inline
Here is the caller graph for this function:

◆ operator=() [1/2]

Type_Conversions & chaiscript::Type_Conversions::operator= ( const Type_Conversions & )
delete

◆ operator=() [2/2]

Type_Conversions & chaiscript::Type_Conversions::operator= ( Type_Conversions && )
default

◆ take_saves()

std::vector< Boxed_Value > chaiscript::Type_Conversions::take_saves ( Conversion_Saves & t_saves)
inline

◆ thread_cache()

const std::set< const std::type_info *, Less_Than > & chaiscript::Type_Conversions::thread_cache ( ) const
inline
Here is the caller graph for this function:

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