NewLang Project
Yet another programm language
|
#include <object.h>
Public Types | |
enum class | IterCmp : int8_t { No = static_cast<int8_t> (ObjType::None) , Yes = static_cast<int8_t> (ObjType::Iterator) , End = static_cast<int8_t> (ObjType::IteratorEnd) } |
typedef Iterator< T > | iterator |
typedef Iterator< const T > | const_iterator |
typedef Dict< T > | IterObj |
typedef Dict< T >::Type | IterObjPtr |
typedef Dict< T >::PairType | IterPairType |
typedef Dict< T >::ListType | IterListType |
typedef IterCmp | CompareFuncType(const IterPairType &pair, const T *args, void *extra) |
Public Member Functions | |
Iterator (std::shared_ptr< T > obj, const char *find_key="(.|\\n)*") | |
Iterator (std::shared_ptr< T > obj, CompareFuncType *func, T *arg, void *extra=nullptr) | |
Iterator (const Iterator &iter) | |
iterator | begin () |
iterator | end () |
const IterPairType & | data () |
const IterPairType & | operator* () |
const IterPairType & | data () const |
const IterPairType & | operator* () const |
ObjPtr | read_and_next (int64_t count) |
const iterator & | operator++ () const |
const iterator | operator++ (int) const |
bool | operator== (const iterator &other) const |
bool | operator!= (const iterator &other) const |
void | reset () |
Protected Member Functions | |
void | search_loop () const |
Static Private Member Functions | |
static IterCmp | CompareFuncDefault (const IterPairType &pair, const T *filter, void *extra) |
Private Attributes | |
std::shared_ptr< T > | m_iter_obj |
std::regex | m_match |
std::string | m_filter |
CompareFuncType * | m_func |
T * | m_func_args |
void * | m_func_extra |
Dict< T >::iterator | m_found |
const char * | m_base_filter |
Static Private Attributes | |
static const IterPairType | m_Iterator_end |
Friends | |
class | Obj |
class | Dict< Obj > |
class | Context |
class | Dict< Context, std::weak_ptr< Context > > |
typedef Iterator<T> newlang::Iterator< T >::iterator |
typedef Iterator<const T> newlang::Iterator< T >::const_iterator |
typedef Dict<T> newlang::Iterator< T >::IterObj |
typedef Dict<T>::Type newlang::Iterator< T >::IterObjPtr |
typedef Dict<T>::PairType newlang::Iterator< T >::IterPairType |
typedef Dict<T>::ListType newlang::Iterator< T >::IterListType |
typedef IterCmp newlang::Iterator< T >::CompareFuncType(const IterPairType &pair, const T *args, void *extra) |
|
strong |
|
inlineexplicit |
|
inline |
Итератор для элементов списка с фильтром в виде функции обратного вызова
obj | |
func | |
arg | |
extra |
Definition at line 207 of file object.h.
References newlang::Iterator< T >::search_loop().
|
inline |
|
inlinestaticprivate |
Definition at line 228 of file object.h.
References LOG_RUNTIME, newlang::Iterator< T >::m_base_filter, newlang::Iterator< T >::m_filter, newlang::Iterator< T >::m_func_args, newlang::Iterator< T >::m_match, newlang::Iterator< T >::No, and newlang::Iterator< T >::Yes.
|
inline |
Definition at line 261 of file object.h.
References newlang::Iterator< T >::reset().
Referenced by newlang::Iterator< T >::reset().
|
inline |
Definition at line 267 of file object.h.
References newlang::Iterator< T >::m_found, and newlang::Iterator< T >::m_iter_obj.
Referenced by newlang::Iterator< T >::data(), newlang::Iterator< T >::data(), newlang::Iterator< T >::operator++(), and newlang::Iterator< T >::search_loop().
|
inline |
Definition at line 273 of file object.h.
References newlang::Iterator< T >::end(), newlang::Iterator< T >::m_found, newlang::Iterator< T >::m_iter_obj, and newlang::Iterator< T >::m_Iterator_end.
Referenced by newlang::Obj::IteratorData(), newlang::Iterator< T >::operator*(), and newlang::Iterator< T >::operator*().
|
inline |
Definition at line 280 of file object.h.
References newlang::Iterator< T >::data().
|
inline |
Definition at line 284 of file object.h.
References newlang::Iterator< T >::end(), newlang::Iterator< T >::m_found, newlang::Iterator< T >::m_iter_obj, and newlang::Iterator< T >::m_Iterator_end.
|
inline |
Definition at line 291 of file object.h.
References newlang::Iterator< T >::data().
ObjPtr newlang::Iterator< T >::read_and_next | ( | int64_t | count | ) |
|
inline |
Definition at line 297 of file object.h.
References newlang::Iterator< T >::end(), newlang::Iterator< T >::m_found, newlang::Iterator< T >::m_iter_obj, and newlang::Iterator< T >::search_loop().
Referenced by newlang::Iterator< T >::operator++().
|
inline |
Definition at line 305 of file object.h.
References newlang::Iterator< T >::operator++().
|
inline |
Definition at line 309 of file object.h.
References newlang::Iterator< T >::m_found.
|
inline |
Definition at line 313 of file object.h.
References newlang::Iterator< T >::m_found.
|
inline |
Definition at line 317 of file object.h.
References newlang::Iterator< T >::begin(), newlang::Iterator< T >::m_found, newlang::Iterator< T >::m_iter_obj, and newlang::Iterator< T >::search_loop().
Referenced by newlang::Iterator< T >::begin().
|
inlineprotected |
Definition at line 325 of file object.h.
References newlang::Iterator< T >::End, newlang::Iterator< T >::end(), newlang::Iterator< T >::m_found, newlang::Iterator< T >::m_func, newlang::Iterator< T >::m_func_args, newlang::Iterator< T >::m_func_extra, newlang::Iterator< T >::m_iter_obj, newlang::Iterator< T >::No, result, and newlang::Iterator< T >::Yes.
Referenced by newlang::Iterator< T >::Iterator(), newlang::Iterator< T >::operator++(), and newlang::Iterator< T >::reset().
|
private |
Definition at line 217 of file object.h.
Referenced by newlang::Iterator< T >::data(), newlang::Iterator< T >::data(), newlang::Iterator< T >::end(), newlang::Iterator< T >::operator++(), newlang::Iterator< T >::reset(), and newlang::Iterator< T >::search_loop().
|
private |
Definition at line 218 of file object.h.
Referenced by newlang::Iterator< T >::CompareFuncDefault().
|
private |
Definition at line 219 of file object.h.
Referenced by newlang::Iterator< T >::CompareFuncDefault().
|
private |
Definition at line 220 of file object.h.
Referenced by newlang::Iterator< T >::search_loop().
|
private |
Definition at line 221 of file object.h.
Referenced by newlang::Iterator< T >::CompareFuncDefault(), and newlang::Iterator< T >::search_loop().
|
private |
Definition at line 222 of file object.h.
Referenced by newlang::Iterator< T >::search_loop().
|
mutableprivate |
Definition at line 223 of file object.h.
Referenced by newlang::Iterator< T >::data(), newlang::Iterator< T >::data(), newlang::Iterator< T >::end(), newlang::Iterator< T >::operator!=(), newlang::Iterator< T >::operator++(), newlang::Iterator< T >::operator==(), newlang::Iterator< T >::reset(), and newlang::Iterator< T >::search_loop().
|
private |
Definition at line 224 of file object.h.
Referenced by newlang::Iterator< T >::CompareFuncDefault().
|
staticprivate |
Definition at line 226 of file object.h.
Referenced by newlang::Iterator< T >::data(), and newlang::Iterator< T >::data().