NewLang Project
Yet another programm language
|
#include <dict.h>
Public Types | |
typedef PTR | Type |
typedef std::pair< std::string, Type > | PairType |
typedef std::list< PairType > | ListType |
Public Member Functions | |
template<typename I > | |
std::enable_if< std::is_integral< I >::value &&!std::is_pointer< I >::value, constPairType & >::type | operator[] (I index) |
template<typename N > | |
std::enable_if< std::is_same< N, std::string >::value||std::is_pointer< N >::value, constPairType & >::type | operator[] (N name) |
PairType & | push_back (const PairType &p) |
PairType & | push_back (const Type value, const std::string &name="") |
virtual PairType & | at (const int64_t index) |
virtual const PairType & | at (const int64_t index) const |
ListType::iterator | find (const std::string_view name) |
virtual PairType & | at (const std::string name) |
virtual const std::string & | name (const int64_t index) const |
virtual int64_t | index (const std::string_view field_name) |
virtual void | clear_ () |
virtual int64_t | resize (int64_t new_size, const Type fill, const std::string &name="") |
ListType::iterator | at_index (const int64_t index) |
ListType::const_iterator | at_index_const (const int64_t index) const |
virtual void | erase (const int64_t index) |
virtual void | erase (const size_t index_from, const size_t index_to) |
virtual | ~Dict () |
Dict () | |
Dict (PairType arg) | |
template<class... A> | |
Dict (PairType arg, A... rest) | |
Static Public Member Functions | |
static PairType | pair (const Type value, const std::string name="") |
Friends | |
class | Context |
typedef PTR newlang::Dict< T, PTR >::Type |
typedef std::pair<std::string, Type> newlang::Dict< T, PTR >::PairType |
typedef std::list<PairType> newlang::Dict< T, PTR >::ListType |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 84 of file dict.h.
References newlang::Dict< T, PTR >::at(), and newlang::Dict< T, PTR >::index().
Referenced by newlang::Obj::op_set_index().
|
inline |
Definition at line 90 of file dict.h.
References newlang::Dict< T, PTR >::at(), and newlang::Dict< T, PTR >::name().
|
inline |
Definition at line 94 of file dict.h.
References newlang::Dict< T, PTR >::at_index().
Referenced by newlang::Dict< T, PTR >::push_back(), newlang::Obj::push_back(), newlang::Obj::push_back(), and newlang::Obj::toType_().
|
inline |
Definition at line 99 of file dict.h.
References newlang::Dict< T, PTR >::name(), newlang::Dict< T, PTR >::pair(), and newlang::Dict< T, PTR >::push_back().
|
inlinestatic |
Definition at line 110 of file dict.h.
References newlang::Dict< T, PTR >::name().
Referenced by newlang::Dict< T, PTR >::push_back().
|
inlinevirtual |
Reimplemented in newlang::Obj.
Definition at line 114 of file dict.h.
References newlang::Dict< T, PTR >::at_index(), and newlang::Dict< T, PTR >::index().
Referenced by newlang::Obj::at(), newlang::Obj::at(), newlang::Obj::at(), newlang::Obj::at(), newlang::Obj::index_get(), newlang::Dict< T, PTR >::operator[](), and newlang::Dict< T, PTR >::operator[]().
|
inlinevirtual |
Reimplemented in newlang::Obj.
Definition at line 118 of file dict.h.
References newlang::Dict< T, PTR >::at_index_const(), and newlang::Dict< T, PTR >::index().
|
inline |
Definition at line 122 of file dict.h.
References newlang::Dict< T, PTR >::name().
Referenced by newlang::Dict< T, PTR >::at(), newlang::Obj::find(), and newlang::Dict< T, PTR >::index().
|
inlinevirtual |
Reimplemented in newlang::Obj.
Definition at line 137 of file dict.h.
References newlang::Dict< T, PTR >::find(), LOG_RUNTIME, and newlang::Dict< T, PTR >::name().
|
inlinevirtual |
Reimplemented in newlang::Obj.
Definition at line 145 of file dict.h.
References newlang::Dict< T, PTR >::at_index_const(), and newlang::Dict< T, PTR >::index().
Referenced by newlang::Dict< T, PTR >::at(), newlang::Dict< T, PTR >::find(), newlang::Obj::name(), newlang::Dict< T, PTR >::operator[](), newlang::Dict< T, PTR >::pair(), newlang::Dict< T, PTR >::push_back(), and newlang::Dict< T, PTR >::resize().
|
inlinevirtual |
Definition at line 149 of file dict.h.
References newlang::Dict< T, PTR >::find().
Referenced by newlang::Dict< T, PTR >::at(), newlang::Dict< T, PTR >::at(), newlang::Dict< T, PTR >::at_index(), newlang::Dict< T, PTR >::at_index_const(), newlang::Dict< T, PTR >::erase(), newlang::Dict< T, PTR >::name(), and newlang::Dict< T, PTR >::operator[]().
|
inlinevirtual |
Reimplemented in newlang::Obj, and newlang::Term.
Definition at line 157 of file dict.h.
Referenced by newlang::Obj::clear_(), newlang::Obj::op_bit_and_set(), newlang::Obj::operator*=(), and newlang::Obj::toType_().
|
inlinevirtual |
Reimplemented in newlang::Obj.
Definition at line 161 of file dict.h.
References newlang::Dict< T, PTR >::at_index(), and newlang::Dict< T, PTR >::name().
Referenced by newlang::Obj::resize(), and newlang::Obj::resize_().
|
inline |
Definition at line 181 of file dict.h.
References newlang::Dict< T, PTR >::index(), and LOG_RUNTIME.
Referenced by newlang::Dict< T, PTR >::at(), newlang::Obj::at_index(), newlang::Dict< T, PTR >::erase(), newlang::Dict< T, PTR >::push_back(), and newlang::Dict< T, PTR >::resize().
|
inline |
Definition at line 208 of file dict.h.
References newlang::Dict< T, PTR >::index(), and LOG_RUNTIME.
Referenced by newlang::Dict< T, PTR >::at(), newlang::Obj::at_index_const(), newlang::Dict< T, PTR >::erase(), and newlang::Dict< T, PTR >::name().
|
inlinevirtual |
Reimplemented in newlang::Obj.
Definition at line 235 of file dict.h.
References newlang::Dict< T, PTR >::at_index_const(), and newlang::Dict< T, PTR >::index().
Referenced by newlang::Obj::erase(), and newlang::Obj::erase().
|
inlinevirtual |
Reimplemented in newlang::Obj.
Definition at line 239 of file dict.h.
References ASSERT, and newlang::Dict< T, PTR >::at_index().
|
friend |