NewLang Project
Yet another programm language
|
#include <object.h>
Public Member Functions | |
IntPlus (const ObjPtr value) | |
![]() | |
IntAny (const ObjPtr value, ObjType type) | |
virtual | ~IntAny () |
![]() | |
Obj (ObjType type=ObjType::None, const char *var_name=nullptr, TermPtr func_proto=nullptr, ObjType fixed=ObjType::None, bool init=false, Sync *sync=nullptr) | |
ObjPtr | shared () |
ObjPtr | MakeConst () |
ObjPtr | MakeMutable () |
virtual ObjPtr | IteratorMake (const char *filter=nullptr, bool check_create=true) |
virtual ObjPtr | IteratorMake (Obj *args) |
virtual ObjPtr | IteratorData () |
virtual ObjPtr | IteratorReset () |
virtual ObjPtr | IteratorNext (int64_t count) |
ObjPtr | IteratorNext (ObjPtr count) |
ObjType | getType () |
ObjType | getTypeAsLimit () |
std::string & | getName () |
const std::string & | getName () const |
void | SetClassName (std::string &name) |
bool | is_const () const |
bool | is_init () const |
bool | is_none_type () const |
bool | is_bool_type () const |
bool | is_arithmetic_type () const |
bool | is_string_type () const |
bool | is_string_char_type () const |
bool | is_string_wide_type () const |
bool | is_dictionary_type () const |
bool | is_plain_type () const |
bool | is_other_type () const |
bool | is_class_type () const |
bool | is_simple_type () const |
bool | is_scalar () const |
bool | is_function_type () const |
bool | is_native () const |
bool | is_tensor_type () const |
bool | is_integer () const |
bool | is_integral () const |
bool | is_complex () const |
bool | is_floating () const |
bool | is_indexing () const |
bool | is_ellipsis () const |
bool | is_range () const |
bool | is_rational () const |
bool | is_type_name () const |
bool | is_error () const |
bool | is_return () const |
bool | is_block () const |
bool | is_defined_type () |
bool | is_any_size () |
void | SetTermProp (Term &term) |
virtual int64_t | size () const |
virtual int64_t | size (int64_t ind) const |
int64_t | resize_ (int64_t size, ObjPtr fill, const std::string="") |
virtual bool | empty () const |
Dict< Obj >::PairType & | at (const std::string name) const |
Dict< Obj >::PairType & | at (const std::string name) override |
Dict< Obj >::PairType & | at (const int64_t index) override |
const Dict< Obj >::PairType & | at (const int64_t index) const override |
Dict< Obj >::PairType & | at (ObjPtr find) |
bool | exist (ObjPtr &find, bool strong) |
size_t | ItemValueCount (ObjPtr &find, bool strong) |
ObjPtr | operator() () |
ObjPtr | op_call (ObjPtr args) |
ObjPtr | op_call (Obj &args) |
template<typename... T> | |
std::enable_if< is_all< Obj::PairType, T... >::value, ObjPtr >::type | operator() (T ... args) |
template<typename... T> | |
std::enable_if<!is_all< Obj::PairType, T... >::value, ObjPtr >::type | operator() (T ... args) |
template<typename I > | |
std::enable_if< std::is_integral< I >::value &&!std::is_pointer< I >::value, constPairType & >::type | operator[] (const I index) |
template<typename N > | |
std::enable_if< std::is_same< N, std::string >::value||std::is_pointer< N >::value, constPairType & >::type | operator[] (const N name) |
Obj::iterator | find (const std::string name) |
Obj::iterator | begin () |
Obj::iterator | end () |
Obj::const_iterator | begin () const |
Obj::const_iterator | end () const |
PairType & | push_back (const PairType &p) |
PairType & | push_back (const Type value, const std::string &name="") |
Obj::iterator | at_index (const int64_t index) |
Obj::const_iterator | at_index_const (const int64_t index) const |
Obj::const_iterator | insert (Obj::const_iterator pos, const PairType &data) |
const std::string & | name (const int64_t index) const override |
int64_t | resize (int64_t new_size, const Type fill, const std::string &name="") override |
void | erase (const size_t from, const size_t to) override |
void | erase (const int64_t index) override |
void | clear_ () override |
void | clear_ (bool clear_iterator_name) |
operator bool () const | |
operator int8_t () const | |
operator uint8_t () const | |
operator int16_t () const | |
operator uint16_t () const | |
operator int32_t () const | |
operator uint32_t () const | |
operator int64_t () const | |
operator uint64_t () const | |
operator float () const | |
operator double () const | |
operator std::string () const | |
operator std::wstring () const | |
operator void * () const | |
operator Rational () const | |
ObjPtr | operator+ () |
ObjPtr | operator- () |
ObjPtr & | operator+ (ObjPtr &obj) |
ObjPtr & | operator- (ObjPtr &obj) |
ObjPtr | operator++ () |
ObjPtr | operator++ (int) |
ObjPtr | operator-- () |
ObjPtr | operator-- (int) |
ObjPtr | operator* (ObjPtr obj) |
ObjPtr | operator* (Obj value) |
ObjPtr | operator/ (ObjPtr obj) |
ObjPtr | operator/ (Obj value) |
ObjPtr | op_div_ceil (ObjPtr obj) |
ObjPtr | op_div_ceil (Obj value) |
ObjPtr | op_concat (ObjPtr obj, ConcatMode mode=ConcatMode::Error) |
ObjPtr | op_concat (Obj &value, ConcatMode mode=ConcatMode::Error) |
ObjPtr | op_concat_ (Obj &obj, ConcatMode mode=ConcatMode::Error) |
ObjPtr | op_concat_ (ObjPtr obj, ConcatMode mode=ConcatMode::Error) |
ObjPtr | operator% (ObjPtr obj) |
ObjPtr | operator% (Obj value) |
ObjPtr | operator+ (ObjPtr obj) |
ObjPtr | operator+ (Obj value) |
ObjPtr | operator+= (ObjPtr obj) |
ObjPtr | operator+= (Obj obj) |
ObjPtr | operator- (ObjPtr obj) |
ObjPtr | operator- (Obj value) |
ObjPtr | operator-= (ObjPtr obj) |
ObjPtr | operator-= (Obj obj) |
bool | operator< (ObjPtr obj) |
bool | operator< (Obj obj) |
bool | operator<= (ObjPtr obj) |
bool | operator<= (Obj obj) |
bool | operator> (ObjPtr obj) |
bool | operator> (Obj obj) |
bool | operator>= (ObjPtr obj) |
bool | operator>= (Obj obj) |
int | op_compare (Obj &value) |
bool | op_class_test (ObjPtr obj, Context *ctx) const |
bool | op_class_test (const char *name, Context *ctx) const |
bool | op_duck_test (ObjPtr obj, bool strong) |
bool | op_duck_test (Obj *value, bool strong) |
bool | op_equal (ObjPtr value) |
bool | op_equal (Obj &value) |
bool | op_accurate (ObjPtr obj) |
bool | op_accurate (Obj &value) |
ObjPtr | op_bit_and (ObjPtr obj, bool strong) |
ObjPtr | op_bit_and (Obj &obj, bool strong) |
ObjPtr | op_pow (ObjPtr obj) const |
ObjPtr | op_pow (Obj &obj) const |
ObjPtr | op_pow_ (ObjPtr obj) |
ObjPtr | op_pow_ (Obj &obj) |
ObjPtr | op_assign (ObjPtr obj) |
ObjPtr | op_assign (Obj &obj) |
bool | operator= (Obj &obj) |
ObjPtr | operator*= (ObjPtr obj) |
ObjPtr | operator*= (Obj obj) |
ObjPtr | operator/= (ObjPtr obj) |
ObjPtr | operator/= (Obj obj) |
ObjPtr | op_div_ceil_ (ObjPtr obj) |
ObjPtr | op_div_ceil_ (Obj &obj) |
ObjPtr | operator%= (ObjPtr obj) |
ObjPtr | operator%= (Obj obj) |
ObjPtr | op_bit_and_set (Obj &obj, bool strong) |
ObjPtr | operator^= (ObjPtr obj) |
ObjPtr | operator^= (Obj) |
ObjPtr | operator|= (ObjPtr obj) |
ObjPtr | operator|= (Obj) |
ObjPtr | op_lshift_set (ObjPtr obj) |
ObjPtr | op_lshift_set (Obj) |
ObjPtr | op_rshift_set (ObjPtr obj) |
ObjPtr | op_rshift_set (Obj) |
ObjPtr | op_rrshift_set (ObjPtr obj) |
ObjPtr | op_rrshift_set (Obj) |
template<typename T > | |
bool | operator= (T value) |
void | dump_dict_ (std::string &str, bool deep=true) const |
std::string | toString (bool deep=true) const |
std::string | GetValueAsString () const |
std::wstring | GetValueAsStringWide () const |
std::shared_ptr< Rational > | GetValueAsRational () const |
int64_t | GetValueAsInteger () const |
double | GetValueAsNumber () const |
bool | GetValueAsBoolean () const |
std::vector< int64_t > | toIntVector (bool raise=true) const |
ObjPtr | CallNative (Context *ctx, Obj args) |
ObjPtr | Copy () const |
ObjPtr | Clone (const char *new_name=nullptr) const |
void | CloneTo (Obj &clone) |
void | CloneTo (ObjPtr &clone) |
void | CloneDataTo (Obj &clone) const |
void | ClonePropTo (Obj &clone) const |
ObjPtr | toType (ObjType type) const |
void | toType_ (ObjType type) |
virtual | ~Obj () |
const ObjPtr | index_get (const std::vector< Index > &index) const |
ObjPtr | index_set (const std::vector< Index > &index, const ObjPtr value) const |
ObjPtr | index_set_ (const std::vector< Index > &index, const ObjPtr value) |
ObjPtr | op_set_index (ObjPtr index, ObjPtr value) |
ObjPtr | op_set_index (int64_t index, std::string value) |
template<typename T > | |
std::enable_if< std::is_same< T, bool >::value, void >::type | SetValue_ (bool value) |
template<typename T > | |
std::enable_if< std::is_integral< T >::value, void >::type | SetValue_ (T value) |
template<typename T > | |
std::enable_if< std::is_floating_point< T >::value, void >::type | SetValue_ (T value) |
template<typename T > | |
std::enable_if< std::is_same< char *, T >::value, void >::type | SetValue_ (T text) |
template<typename T > | |
std::enable_if< std::is_same< wchar_t *, T >::value, void >::type | SetValue_ (T text) |
void | SetValue_ (std::string text) |
void | SetValue_ (std::wstring text) |
void | testConvertType (ObjType type) |
void | testResultIntegralType (ObjType type, bool upscalint) |
void | SetValue_ (ObjPtr value) |
bool | CallAll (const char *func_name, ObjPtr &arg_in, ObjPtr &result, ObjPtr object=nullptr, size_t limit=0) |
bool | CallOnce (ObjPtr &arg_in, ObjPtr &result, ObjPtr object=nullptr) |
const TermPtr | Proto () |
void | remove (const Dict::PairType &value) |
![]() | |
std::enable_if< std::is_integral< I >::value &&!std::is_pointer< I >::value, constPairType & >::type | operator[] (I index) |
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="") |
ListType::iterator | find (const std::string_view name) |
virtual int64_t | index (const std::string_view field_name) |
ListType::iterator | at_index (const int64_t index) |
ListType::const_iterator | at_index_const (const int64_t index) const |
virtual | ~Dict () |
Dict () | |
Dict (PairType arg) | |
Dict (PairType arg, A... rest) | |
Additional Inherited Members | |
![]() | |
typedef Dict::PairType | PairType |
![]() | |
typedef std::shared_ptr< Obj > | Type |
typedef std::pair< std::string, Type > | PairType |
typedef std::list< PairType > | ListType |
![]() | |
static PairType | ArgNull (const std::string name="") |
static PairType | Arg () |
static PairType | Arg (ObjPtr value, const std::string name="") |
template<typename T > | |
static std::enable_if< std::is_pointer< T >::value||std::is_same< std::string, T >::value, PairType >::type | Arg (T value, const std::string name="") |
template<typename T > | |
static std::enable_if<!std::is_same< PairType, T >::value &&!std::is_pointer< T >::value &&!std::is_same< std::string, T >::value, PairType >::type | Arg (T value, const std::string name="") |
static bool | is_true (const char *text) |
static bool | op_duck_test_prop (Obj *base, Obj *value, bool strong) |
static ObjPtr | GetIndex (ObjPtr obj, TermPtr index_arg) |
static ObjPtr | GetIndex (ObjPtr obj, size_t index) |
static ObjPtr | CreateType (ObjType type, ObjType fixed=ObjType::None, bool is_init=false, Sync *sync=nullptr) |
static ObjPtr | CreateRational (const Rational &val) |
static ObjPtr | CreateRational (const std::string val) |
static ObjPtr | BaseTypeConstructor (Context *ctx, Obj &in) |
static ObjPtr | ConstructorSimpleType_ (Context *ctx, Obj &args) |
static ObjPtr | ConstructorDictionary_ (Context *ctx, Obj &args) |
static ObjPtr | ConstructorNative_ (Context *ctx, Obj &args) |
static ObjPtr | ConstructorStub_ (Context *ctx, Obj &args) |
static ObjPtr | ConstructorClass_ (Context *ctx, Obj &args) |
static ObjPtr | ConstructorStruct_ (Context *ctx, Obj &args) |
static ObjPtr | ConstructorEnum_ (Context *ctx, Obj &args) |
static ObjPtr | CreateBaseType (ObjType type) |
static ObjPtr | CreateNone (Sync *sync=nullptr) |
static ObjPtr | CreateEmpty (Sync *sync=nullptr) |
static ObjPtr | CreatePointer (void *ptr=nullptr, Sync *sync=nullptr) |
static ObjPtr | CreateNil (Sync *sync=nullptr) |
static ObjPtr | CreateBool (bool value, Sync *sync=nullptr) |
template<typename T1 , typename T2 , typename T3 > | |
static ObjPtr | CreateRange (T1 start, T2 stop, T3 step, Sync *sync=nullptr) |
template<typename T1 , typename T2 > | |
static ObjPtr | CreateRange (T1 start, T2 stop, Sync *sync=nullptr) |
template<typename T > | |
static std::enable_if< std::is_same< T, std::string >::value||std::is_same< T, constchar * >::value, ObjPtr >::type | CreateValue (T value, Sync *sync=nullptr) |
template<typename T > | |
static std::enable_if< std::is_same< T, std::wstring >::value||std::is_same< T, constwchar_t * >::value, ObjPtr >::type | CreateValue (T value, Sync *sync=nullptr) |
template<typename T > | |
static std::enable_if< std::is_integral< T >::value, ObjPtr >::type | CreateValue (T value, ObjType fix_type=ObjType::None, Sync *sync=nullptr) |
template<typename T > | |
static std::enable_if< std::is_floating_point< T >::value, ObjPtr >::type | CreateValue (T value, ObjType fix_type=ObjType::None, Sync *sync=nullptr) |
static ObjPtr | CreateString (const std::string_view str, Sync *sync=nullptr) |
static ObjPtr | CreateString (const std::wstring_view str, Sync *sync=nullptr) |
static ObjPtr | Yes (Sync *sync=nullptr) |
static ObjPtr | No (Sync *sync=nullptr) |
static ObjPtr | CreateDict (Sync *sync=nullptr) |
template<typename... T> | |
static std::enable_if< is_all< PairType, T... >::value, ObjPtr >::type | CreateDict (T ... args) |
static ObjPtr | CreateDict (const std::vector< ObjPtr > &arr, Sync *sync=nullptr) |
static ObjPtr | CreateClass (std::string name) |
template<typename... T> | |
static std::enable_if< is_all< PairType, T... >::value, ObjPtr >::type | CreateClass (std::string name, T ... args) |
![]() | |
static PairType | pair (const Type value, const std::string name="") |
![]() | |
ObjType | m_var_type_current |
Текущий тип значения объекта | |
ObjType | m_var_type_fixed |
Максимальный размер для арифметических типов, который задается разработчиком | |
bool | m_var_is_init |
Содержит ли объект корректное значение ??? | |
std::string | m_var_name |
Имя переменной, в которой хранится объект | |
std::string | m_class_name |
Имя класса объекта (у базовых типов отсуствует) | |
std::vector< ObjPtr > | m_class_parents |
Родительские классы (типы) | |
std::string | m_module_name |
const TermPtr | m_prototype |
Описание прототипа функции (или данных) | |
Context * | m_ctx |
ObjPtr | m_dimensions |
Размерности для ObjType::Type. | |
PairType | m_str_pair |
std::string | m_func_mangle_name |
std::variant< std::monostate, int64_t, double, void *, bool *, int8_t *, int16_t *, int32_t *, int64_t *, float *, double *, NativeData, std::string, TermPtr, Iterator< Obj > > | m_var |
std::string | m_value |
Содержит байтовую строку или байтовый массив с данными для представления в нативном виде (Struct, Unuion, Enum) | |
std::wstring | m_string |
Содержит строку широких символов | |
std::shared_ptr< torch::Tensor > | m_tensor |
Содержит только размерные тензоры (скляры хранятся в поле m_pointer и не создают m_tensor->defined()) | |
Rational | m_rational |
Содержит дробь из длинных чисел | |
std::shared_ptr< Iterator< Obj > > | m_iterator |
Итератор для данных | |
ObjPtr | m_iter_range_value |
TermPtr | m_sequence |
Последовательно распарсенных команд для выполнения | |
ObjPtr | m_return_obj |
ObjWeak | m_reference |
Sync * | m_sync |
bool | m_check_args |
bool | m_is_const |
bool | m_is_reference |