ChaiScript
Classes | Functions
bootstrap_stl.hpp File Reference

This file contains utility functions for registration of STL container classes. More...

#include <functional>
#include <memory>
#include <stdexcept>
#include <typeinfo>
#include <vector>
#include "bootstrap.hpp"
#include "boxed_value.hpp"
#include "dispatchkit.hpp"
#include "operators.hpp"
#include "proxy_constructors.hpp"
#include "register_function.hpp"
#include "type_info.hpp"
Include dependency graph for bootstrap_stl.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  chaiscript::bootstrap::standard_library::Bidir_Range< Container, IterType >
 Bidir_Range, based on the D concept of ranges. More...
 

Functions

template<typename T >
size_t chaiscript::bootstrap::standard_library::detail::count (const T &t_target, const typename T::key_type &t_key)
 
template<typename T >
void chaiscript::bootstrap::standard_library::detail::insert (T &t_target, const T &t_other)
 
template<typename T >
void chaiscript::bootstrap::standard_library::detail::insert_ref (T &t_target, const typename T::value_type &t_val)
 
template<typename Bidir_Type >
void chaiscript::bootstrap::standard_library::detail::input_range_type_impl (const std::string &type, Module &m)
 Add Bidir_Range support for the given ContainerType.
 
template<typename Type >
void chaiscript::bootstrap::standard_library::detail::insert_at (Type &container, int pos, const typename Type::value_type &v)
 Algorithm for inserting at a specific position into a container.
 
template<typename Type >
void chaiscript::bootstrap::standard_library::detail::erase_at (Type &container, int pos)
 Algorithm for erasing a specific position from a container.
 
template<typename ContainerType >
void chaiscript::bootstrap::standard_library::input_range_type (const std::string &type, Module &m)
 
template<typename ContainerType >
void chaiscript::bootstrap::standard_library::random_access_container_type (const std::string &, Module &m)
 Add random_access_container concept to the given ContainerType http://www.sgi.com/tech/stl/RandomAccessContainer.html. More...
 
template<typename ContainerType >
void chaiscript::bootstrap::standard_library::assignable_type (const std::string &type, Module &m)
 Add assignable concept to the given ContainerType http://www.sgi.com/tech/stl/Assignable.html.
 
template<typename ContainerType >
void chaiscript::bootstrap::standard_library::resizable_type (const std::string &, Module &m)
 Add container resize concept to the given ContainerType http://www.cplusplus.com/reference/stl/.
 
template<typename ContainerType >
void chaiscript::bootstrap::standard_library::reservable_type (const std::string &, Module &m)
 Add container reserve concept to the given ContainerType http://www.cplusplus.com/reference/stl/.
 
template<typename ContainerType >
void chaiscript::bootstrap::standard_library::container_type (const std::string &, Module &m)
 Add container concept to the given ContainerType http://www.sgi.com/tech/stl/Container.html.
 
template<typename Type >
void chaiscript::bootstrap::standard_library::default_constructible_type (const std::string &type, Module &m)
 Add default constructable concept to the given Type http://www.sgi.com/tech/stl/DefaultConstructible.html.
 
template<typename ContainerType >
void chaiscript::bootstrap::standard_library::sequence_type (const std::string &, Module &m)
 Add sequence concept to the given ContainerType http://www.sgi.com/tech/stl/Sequence.html.
 
template<typename ContainerType >
void chaiscript::bootstrap::standard_library::back_insertion_sequence_type (const std::string &type, Module &m)
 Add back insertion sequence concept to the given ContainerType http://www.sgi.com/tech/stl/BackInsertionSequence.html.
 
template<typename ContainerType >
void chaiscript::bootstrap::standard_library::front_insertion_sequence_type (const std::string &type, Module &m)
 Front insertion sequence http://www.sgi.com/tech/stl/FrontInsertionSequence.html.
 
template<typename PairType >
void chaiscript::bootstrap::standard_library::pair_type (const std::string &type, Module &m)
 bootstrap a given PairType http://www.sgi.com/tech/stl/pair.html
 
template<typename ContainerType >
void chaiscript::bootstrap::standard_library::pair_associative_container_type (const std::string &type, Module &m)
 Add pair associative container concept to the given ContainerType http://www.sgi.com/tech/stl/PairAssociativeContainer.html.
 
template<typename ContainerType >
void chaiscript::bootstrap::standard_library::unique_associative_container_type (const std::string &, Module &m)
 Add unique associative container concept to the given ContainerType http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html.
 
template<typename MapType >
void chaiscript::bootstrap::standard_library::map_type (const std::string &type, Module &m)
 Add a MapType container http://www.sgi.com/tech/stl/Map.html.
 
template<typename ListType >
void chaiscript::bootstrap::standard_library::list_type (const std::string &type, Module &m)
 http://www.sgi.com/tech/stl/List.html
 
template<typename VectorType >
void chaiscript::bootstrap::standard_library::vector_type (const std::string &type, Module &m)
 Create a vector type with associated concepts http://www.sgi.com/tech/stl/Vector.html.
 
template<typename String >
void chaiscript::bootstrap::standard_library::string_type (const std::string &type, Module &m)
 Add a String container http://www.sgi.com/tech/stl/basic_string.html.
 
template<typename FutureType >
void chaiscript::bootstrap::standard_library::future_type (const std::string &type, Module &m)
 Add a MapType container http://www.sgi.com/tech/stl/Map.html.
 

Detailed Description

This file contains utility functions for registration of STL container classes.

The methodology used is based on the SGI STL concepts. http://www.sgi.com/tech/stl/table_of_contents.html

Function Documentation

◆ random_access_container_type()

template<typename ContainerType >
void chaiscript::bootstrap::standard_library::random_access_container_type ( const std::string &  ,
Module m 
)

Add random_access_container concept to the given ContainerType http://www.sgi.com/tech/stl/RandomAccessContainer.html.

Todo:
we are preferring to keep the key as 'int' to avoid runtime conversions during dispatch. reevaluate
Todo:
we are preferring to keep the key as 'int' to avoid runtime conversions during dispatch. reevaluate