Generic data type, can hold different types such as bool, casadi_int, std::string etc. More...
#include <generic_type.hpp>
Extra doc: https://github.com/casadi/casadi/wiki/L_17n
Definition at line 72 of file generic_type.hpp.


Public Types | |
| typedef std::map< std::string, GenericType > | Dict |
| C++ equivalent of Python's dict or MATLAB's struct. More... | |
| using | internal_base_type = SharedObjectInternal |
| using | base_type = SharedObject |
Public Member Functions | |
| GenericType () | |
| Default constructor. More... | |
| GenericType (bool b) | |
| Constructors (implicit type conversion) More... | |
| GenericType (casadi_int i) | |
| GenericType (int i) | |
| GenericType (double d) | |
| GenericType (const std::string &s) | |
| GenericType (const std::vector< bool > &iv) | |
| GenericType (const std::vector< casadi_int > &iv) | |
| GenericType (const std::vector< int > &iv) | |
| GenericType (const std::vector< std::vector< casadi_int > > &ivv) | |
| GenericType (const std::vector< double > &dv) | |
| GenericType (const std::vector< std::vector< double > > &dv) | |
| GenericType (const std::vector< std::string > &sv) | |
| GenericType (const std::vector< std::vector< std::string > > &sv) | |
| GenericType (const char s[]) | |
| GenericType (const Function &f) | |
| GenericType (const std::vector< Function > &f) | |
| GenericType (const Dict &dict) | |
| GenericType (const std::vector< Dict > &dictv) | |
| GenericType (const std::vector< std::vector< GenericType > > &gvv) | |
| GenericType (const std::vector< GenericType > &gv) | |
| GenericType (void *ptr) | |
| std::string | get_description () const |
| Get a description of the object's type. More... | |
| bool | can_cast_to (TypeID other) const |
| bool | can_cast_to (const GenericType &other) const |
| TypeID | getType () const |
| bool | operator== (const GenericType &op2) const |
| Equality. More... | |
| bool | operator!= (const GenericType &op2) const |
| void | serialize (SerializingStream &s) const |
| Serialize an object. More... | |
| std::string | class_name () const |
| Get class name. More... | |
| void | disp (std::ostream &stream, bool more=false) const |
| Print a description of the object. More... | |
| std::string | get_str (bool more=false) const |
| Get string representation. More... | |
| void | print_ptr (std::ostream &stream=casadi::uout()) const |
| void | own (SharedObjectInternal *node) |
| void | assign (SharedObjectInternal *node) |
| Assign the node to a node class pointer without reference counting. More... | |
| SharedObjectInternal * | get () const |
| Get a const pointer to the node. More... | |
| casadi_int | getCount () const |
| Get the reference count. More... | |
| void | swap (GenericShared &other) |
| Swap content with another instance. More... | |
| SharedObjectInternal * | operator-> () const |
| Access a member function or object. More... | |
| std::string | debug_repr () const |
| bool | is_null () const |
| Is a null pointer? More... | |
| casadi_int | __hash__ () const |
| Returns a number that is unique for a given Node. More... | |
| GenericWeakRef< SharedObject, SharedObjectInternal > * | weak () |
| Get a weak reference to the object. More... | |
| operator bool () const | |
| operator casadi_int () const | |
| operator int () const | |
| operator double () const | |
| operator std::string () const | |
| operator std::vector< bool > () const | |
| operator std::vector< casadi_int > () const | |
| operator std::vector< int > () const | |
| operator std::vector< std::vector< casadi_int > > () const | |
| operator std::vector< std::vector< int > > () const | |
| operator std::vector< double > () const | |
| operator std::vector< std::vector< double > > () const | |
| operator std::vector< std::string > () const | |
| operator std::vector< std::vector< std::string > > () const | |
| operator const Function & () const | |
| operator const std::vector< Function > & () const | |
| operator const Dict & () const | |
| operator const std::vector< Dict > & () const | |
| operator const std::vector< std::vector< GenericType > > & () const | |
| operator const std::vector< GenericType > & () const | |
| bool | is_bool () const |
| Check if a particular type. More... | |
| bool | is_int () const |
| Check if a particular type. More... | |
| bool | is_double () const |
| Check if a particular type. More... | |
| bool | is_string () const |
| Check if a particular type. More... | |
| bool | is_empty_vector () const |
| Check if a particular type. More... | |
| bool | is_int_vector () const |
| Check if a particular type. More... | |
| bool | is_int_vector_vector () const |
| Check if a particular type. More... | |
| bool | is_double_vector () const |
| Check if a particular type. More... | |
| bool | is_double_vector_vector () const |
| Check if a particular type. More... | |
| bool | is_bool_vector () const |
| Check if a particular type. More... | |
| bool | is_string_vector () const |
| Check if a particular type. More... | |
| bool | is_string_vector_vector () const |
| Check if a particular type. More... | |
| bool | is_dict () const |
| Check if a particular type. More... | |
| bool | is_dict_vector () const |
| Check if a particular type. More... | |
| bool | is_vector_vector () const |
| Check if a particular type. More... | |
| bool | is_vector () const |
| Check if a particular type. More... | |
| bool | is_function () const |
| Check if a particular type. More... | |
| bool | is_function_vector () const |
| Check if a particular type. More... | |
| bool | is_void_pointer () const |
| Check if a particular type. More... | |
| const bool & | as_bool () const |
| Cast to the internal type. More... | |
| const casadi_int & | as_int () const |
| Cast to the internal type. More... | |
| const double & | as_double () const |
| Cast to the internal type. More... | |
| const std::string & | as_string () const |
| Cast to the internal type. More... | |
| const std::vector< casadi_int > & | as_int_vector () const |
| Cast to the internal type. More... | |
| const std::vector< bool > & | as_bool_vector () const |
| Cast to the internal type. More... | |
| const std::vector< std::vector< casadi_int > > & | as_int_vector_vector () const |
| Cast to the internal type. More... | |
| const std::vector< double > & | as_double_vector () const |
| Cast to the internal type. More... | |
| const std::vector< std::vector< double > > & | as_double_vector_vector () const |
| Cast to the internal type. More... | |
| const std::vector< std::string > & | as_string_vector () const |
| Cast to the internal type. More... | |
| const std::vector< std::vector< std::string > > & | as_string_vector_vector () const |
| Cast to the internal type. More... | |
| const Dict & | as_dict () const |
| Cast to the internal type. More... | |
| const std::vector< Dict > & | as_dict_vector () const |
| Cast to the internal type. More... | |
| const std::vector< std::vector< GenericType > > & | as_vector_vector () const |
| Cast to the internal type. More... | |
| const std::vector< GenericType > & | as_vector () const |
| Cast to the internal type. More... | |
| const Function & | as_function () const |
| Cast to the internal type. More... | |
| const std::vector< Function > & | as_function_vector () const |
| Cast to the internal type. More... | |
| void *const & | as_void_pointer () const |
| Cast to the internal type. More... | |
| bool | to_bool () const |
| Convert to a type. More... | |
| casadi_int | to_int () const |
| Convert to a type. More... | |
| double | to_double () const |
| Convert to a type. More... | |
| std::string | to_string () const |
| Convert to a type. More... | |
| std::vector< casadi_int > | to_int_vector () const |
| Convert to a type. More... | |
| std::vector< bool > | to_bool_vector () const |
| Convert to a type. More... | |
| std::vector< std::vector< casadi_int > > | to_int_vector_vector () const |
| Convert to a type. More... | |
| std::vector< double > | to_double_vector () const |
| Convert to a type. More... | |
| std::vector< std::vector< double > > | to_double_vector_vector () const |
| Convert to a type. More... | |
| std::vector< std::string > | to_string_vector () const |
| Convert to a type. More... | |
| std::vector< std::vector< std::string > > | to_string_vector_vector () const |
| Convert to a type. More... | |
| Dict | to_dict () const |
| Convert to a type. More... | |
| std::vector< Dict > | to_dict_vector () const |
| Convert to a type. More... | |
| std::vector< GenericType > | to_vector () const |
| Convert to a type. More... | |
| std::vector< std::vector< GenericType > > | to_vector_vector () const |
| Convert to a type. More... | |
| Function | to_function () const |
| Convert to a type. More... | |
| std::vector< Function > | to_function_vector () const |
| Convert to a type. More... | |
| void * | to_void_pointer () const |
| Convert to a type. More... | |
| std::vector< int > | to_int_type_vector () const |
| Convert to a type. More... | |
Static Public Member Functions | |
| static std::string | type_name () |
| Public class name. More... | |
| static std::string | get_type_description (TypeID type) |
| Get a description of a type. More... | |
| static GenericType | create (SharedObjectInternal *node) |
| Create from node. More... | |
| static GenericType | from_type (TypeID type) |
| Construct a GenericType given an TypeID. More... | |
| static GenericType | deserialize (DeserializingStream &s) |
| Deserialize with type disambiguation. More... | |
Protected Member Functions | |
| void | count_up () |
| void | count_down () |
|
inherited |
Definition at line 103 of file shared_object.hpp.
| typedef std::map<std::string, GenericType> casadi::GenericType::Dict |
Definition at line 80 of file generic_type.hpp.
|
inherited |
Definition at line 102 of file shared_object.hpp.
| casadi::GenericType::GenericType | ( | ) |
Definition at line 252 of file generic_type.cpp.
| casadi::GenericType::GenericType | ( | bool | b | ) |
Definition at line 255 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | casadi_int | i | ) |
Definition at line 259 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
|
inline |
Definition at line 90 of file generic_type.hpp.
| casadi::GenericType::GenericType | ( | double | d | ) |
Definition at line 263 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const std::string & | s | ) |
Definition at line 303 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const std::vector< bool > & | iv | ) |
Definition at line 281 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const std::vector< casadi_int > & | iv | ) |
Definition at line 267 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const std::vector< int > & | iv | ) |
Definition at line 271 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const std::vector< std::vector< casadi_int > > & | ivv | ) |
Definition at line 277 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const std::vector< double > & | dv | ) |
Definition at line 287 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const std::vector< std::vector< double > > & | dv | ) |
Definition at line 291 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const std::vector< std::string > & | sv | ) |
Definition at line 295 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const std::vector< std::vector< std::string > > & | sv | ) |
Definition at line 299 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const char | s[] | ) |
Definition at line 307 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const Function & | f | ) |
Definition at line 311 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const std::vector< Function > & | f | ) |
Definition at line 315 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const Dict & | dict | ) |
Definition at line 745 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const std::vector< Dict > & | dictv | ) |
Definition at line 749 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const std::vector< std::vector< GenericType > > & | gvv | ) |
Definition at line 757 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | const std::vector< GenericType > & | gv | ) |
Definition at line 753 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
| casadi::GenericType::GenericType | ( | void * | ptr | ) |
Definition at line 761 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
|
inherited |
If the Object does not point to any node, "0" is returned.
Extra doc: https://github.com/casadi/casadi/wiki/L_av
Definition at line 123 of file generic_shared_impl.hpp.
| const bool & casadi::GenericType::as_bool | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 319 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_bool().
Referenced by to_bool(), to_bool_vector(), to_double_vector(), and to_int_vector().
| const std::vector< bool > & casadi::GenericType::as_bool_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 344 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_bool_vector().
Referenced by to_bool_vector(), and to_vector().
| const GenericType::Dict & casadi::GenericType::as_dict | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 374 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_dict().
Referenced by to_dict(), and to_dict_vector().
| const std::vector< GenericType::Dict > & casadi::GenericType::as_dict_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 379 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_dict_vector().
Referenced by is_empty_vector(), to_dict_vector(), and to_vector().
| const double & casadi::GenericType::as_double | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 329 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_double().
Referenced by to_bool_vector(), to_double(), to_double_vector(), and to_int_vector().
| const std::vector< double > & casadi::GenericType::as_double_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 354 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_double_vector().
Referenced by to_double_vector(), to_string_vector(), and to_vector().
| const std::vector< std::vector< double > > & casadi::GenericType::as_double_vector_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 359 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_double_vector_vector().
Referenced by to_double_vector_vector(), to_vector(), and to_vector_vector().
| const Function & casadi::GenericType::as_function | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 394 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_function().
Referenced by to_function().
| const std::vector< Function > & casadi::GenericType::as_function_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 399 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_function_vector().
Referenced by to_function_vector(), and to_vector().
| const casadi_int & casadi::GenericType::as_int | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 324 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_int().
Referenced by to_bool_vector(), to_double_vector(), to_int(), to_int_vector(), and to_void_pointer().
| const std::vector< casadi_int > & casadi::GenericType::as_int_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 339 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_int_vector().
Referenced by to_double_vector(), to_int_type_vector(), to_int_vector(), to_string_vector(), and to_vector().
| const std::vector< std::vector< casadi_int > > & casadi::GenericType::as_int_vector_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 349 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_int_vector_vector().
Referenced by to_double_vector_vector(), to_int_vector_vector(), to_vector(), and to_vector_vector().
| const std::string & casadi::GenericType::as_string | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 334 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_string().
Referenced by to_string(), and to_string_vector().
| const std::vector< std::string > & casadi::GenericType::as_string_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 364 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_string_vector().
Referenced by to_string_vector(), and to_vector().
| const std::vector< std::vector< std::string > > & casadi::GenericType::as_string_vector_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 369 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_string_vector_vector().
Referenced by to_string_vector_vector(), to_vector(), and to_vector_vector().
| const std::vector< GenericType > & casadi::GenericType::as_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 389 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_vector().
Referenced by to_vector().
| const std::vector< std::vector< GenericType > > & casadi::GenericType::as_vector_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 384 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_vector_vector().
Referenced by to_vector(), and to_vector_vector().
| void *const & casadi::GenericType::as_void_pointer | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 404 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_void_pointer().
Referenced by to_void_pointer().
|
inherited |
improper use will cause memory leaks!
Extra doc: https://github.com/casadi/casadi/wiki/L_at
Definition at line 96 of file generic_shared_impl.hpp.
|
inline |
Definition at line 161 of file generic_type.hpp.
References can_cast_to(), and getType().
Referenced by can_cast_to().
| bool casadi::GenericType::can_cast_to | ( | TypeID | other | ) | const |
Definition at line 61 of file generic_type.cpp.
References getType(), is_bool(), is_bool_vector(), is_dict_vector(), is_double(), is_double_vector(), is_double_vector_vector(), is_function_vector(), is_int(), is_int_vector(), is_int_vector_vector(), is_string(), is_string_vector(), is_string_vector_vector(), is_vector(), is_vector_vector(), is_void_pointer(), casadi::OT_BOOL, casadi::OT_BOOLVECTOR, casadi::OT_DOUBLE, casadi::OT_DOUBLEVECTOR, casadi::OT_DOUBLEVECTORVECTOR, casadi::OT_INT, casadi::OT_INTVECTOR, casadi::OT_INTVECTORVECTOR, casadi::OT_STRINGVECTOR, casadi::OT_VECTOR, casadi::OT_VECTORVECTOR, and casadi::OT_VOIDPTR.
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_au
Definition at line 31 of file shared_object.cpp.
Referenced by casadi::FmuFunction::check_mem_count(), casadi::MXFunction::export_code_body(), and casadi::BlazingSplineFunction::merge().
|
protectedinherited |
Definition at line 133 of file generic_shared_impl.hpp.
|
protectedinherited |
Definition at line 132 of file generic_shared_impl.hpp.
|
static |
Extra doc: https://github.com/casadi/casadi/wiki/L_17o
Definition at line 820 of file generic_type.cpp.
References casadi::GenericShared< Shared, Internal >::own().
|
inherited |
Definition at line 112 of file generic_shared_impl.hpp.
|
static |
Extra doc: https://github.com/casadi/casadi/wiki/L_17s
Definition at line 778 of file generic_type.cpp.
References casadi::GenericTypeInternal< ID, T >::deserialize(), get_type_description(), casadi::OT_BOOL, casadi::OT_DICT, casadi::OT_DICTVECTOR, casadi::OT_DOUBLE, casadi::OT_DOUBLEVECTOR, casadi::OT_DOUBLEVECTORVECTOR, casadi::OT_FUNCTION, casadi::OT_FUNCTIONVECTOR, casadi::OT_INT, casadi::OT_INTVECTOR, casadi::OT_INTVECTORVECTOR, casadi::OT_STRING, casadi::OT_STRINGVECTOR, casadi::OT_STRINGVECTORVECTOR, casadi::OT_VECTOR, casadi::OT_VECTORVECTOR, and casadi::DeserializingStream::unpack().
|
inherited |
Definition at line 35 of file shared_object.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::is_null().
Referenced by casadi::Nlpsol::disp_more(), and casadi::CsparseInterface::nfact().
|
static |
Definition at line 95 of file generic_type.cpp.
References casadi::OT_BOOLVECTOR, casadi::OT_DICTVECTOR, casadi::OT_DOUBLEVECTOR, casadi::OT_DOUBLEVECTORVECTOR, casadi::OT_INTVECTOR, casadi::OT_INTVECTORVECTOR, casadi::OT_STRINGVECTOR, casadi::OT_STRINGVECTORVECTOR, casadi::OT_VECTOR, casadi::OT_VECTORVECTOR, and casadi::str().
|
inherited |
Definition at line 99 of file generic_shared_impl.hpp.
|
inline |
Definition at line 128 of file generic_type.hpp.
|
inlineinherited |
Definition at line 91 of file shared_object.hpp.
|
static |
Definition at line 122 of file generic_type.cpp.
References casadi::OT_BOOL, casadi::OT_BOOLVECTOR, casadi::OT_DICT, casadi::OT_DICTVECTOR, casadi::OT_DOUBLE, casadi::OT_DOUBLEVECTOR, casadi::OT_DOUBLEVECTORVECTOR, casadi::OT_FUNCTION, casadi::OT_FUNCTIONVECTOR, casadi::OT_INT, casadi::OT_INTVECTOR, casadi::OT_INTVECTORVECTOR, casadi::OT_STRING, casadi::OT_STRINGVECTOR, casadi::OT_STRINGVECTORVECTOR, casadi::OT_VECTOR, casadi::OT_VECTORVECTOR, and casadi::OT_VOIDPTR.
Referenced by casadi::Options::check(), deserialize(), casadi::Options::Entry::disp(), and casadi::Options::type().
|
inherited |
Definition at line 102 of file generic_shared_impl.hpp.
| TypeID casadi::GenericType::getType | ( | ) | const |
Definition at line 765 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), casadi::GenericShared< SharedObject, SharedObjectInternal >::is_null(), and casadi::OT_NULL.
Referenced by can_cast_to(), is_bool(), is_bool_vector(), is_dict(), is_dict_vector(), is_double(), is_double_vector(), is_double_vector_vector(), is_function(), is_function_vector(), is_int(), is_int_vector(), is_int_vector_vector(), is_string(), is_string_vector(), is_string_vector_vector(), is_vector(), is_vector_vector(), is_void_pointer(), and serialize().
| bool casadi::GenericType::is_bool | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 167 of file generic_type.cpp.
References getType(), and casadi::OT_BOOL.
Referenced by as_bool(), can_cast_to(), casadi::set_uno_option(), to_bool(), to_bool_vector(), to_double(), to_double_vector(), to_int(), and to_int_vector().
| bool casadi::GenericType::is_bool_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 200 of file generic_type.cpp.
References getType(), and casadi::OT_BOOLVECTOR.
Referenced by as_bool_vector(), can_cast_to(), is_empty_vector(), to_bool_vector(), and to_vector().
| bool casadi::GenericType::is_dict | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 236 of file generic_type.cpp.
References getType(), and casadi::OT_DICT.
Referenced by as_dict(), casadi::Options::sanitize(), to_dict(), to_dict_vector(), casadi::transform_token_str(), and casadi::update_dict().
| bool casadi::GenericType::is_dict_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 240 of file generic_type.cpp.
References getType(), and casadi::OT_DICTVECTOR.
Referenced by as_dict_vector(), can_cast_to(), is_empty_vector(), to_dict_vector(), and to_vector().
| bool casadi::GenericType::is_double | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 175 of file generic_type.cpp.
References getType(), and casadi::OT_DOUBLE.
Referenced by as_double(), can_cast_to(), operator!=(), casadi::set_uno_option(), to_bool_vector(), to_double(), to_double_vector(), to_int(), and to_int_vector().
| bool casadi::GenericType::is_double_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 208 of file generic_type.cpp.
References getType(), and casadi::OT_DOUBLEVECTOR.
Referenced by as_double_vector(), can_cast_to(), is_empty_vector(), operator!=(), to_double_vector(), to_string_vector(), and to_vector().
| bool casadi::GenericType::is_double_vector_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 212 of file generic_type.cpp.
References getType(), and casadi::OT_DOUBLEVECTORVECTOR.
Referenced by as_double_vector_vector(), can_cast_to(), is_empty_vector(), operator!=(), to_double_vector_vector(), to_vector(), and to_vector_vector().
| bool casadi::GenericType::is_empty_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 183 of file generic_type.cpp.
References as_dict_vector(), is_bool_vector(), is_dict_vector(), is_double_vector(), is_double_vector_vector(), is_int_vector(), is_int_vector_vector(), is_string_vector(), is_string_vector_vector(), is_vector(), is_vector_vector(), to_bool_vector(), to_double_vector(), to_double_vector_vector(), to_int_vector(), to_int_vector_vector(), to_string_vector(), to_string_vector_vector(), to_vector(), and to_vector_vector().
Referenced by to_dict_vector().
| bool casadi::GenericType::is_function | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 224 of file generic_type.cpp.
References getType(), and casadi::OT_FUNCTION.
Referenced by as_function(), and to_function().
| bool casadi::GenericType::is_function_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 228 of file generic_type.cpp.
References getType(), and casadi::OT_FUNCTIONVECTOR.
Referenced by as_function_vector(), can_cast_to(), to_function_vector(), and to_vector().
| bool casadi::GenericType::is_int | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 171 of file generic_type.cpp.
References getType(), and casadi::OT_INT.
Referenced by as_int(), can_cast_to(), operator!=(), casadi::set_uno_option(), to_bool(), to_bool_vector(), to_double(), to_double_vector(), to_int(), to_int_vector(), and casadi::transform_token_str().
| bool casadi::GenericType::is_int_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 196 of file generic_type.cpp.
References getType(), and casadi::OT_INTVECTOR.
Referenced by as_int_vector(), can_cast_to(), is_empty_vector(), operator!=(), to_bool_vector(), to_double_vector(), to_int_type_vector(), to_int_vector(), to_string_vector(), and to_vector().
| bool casadi::GenericType::is_int_vector_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 204 of file generic_type.cpp.
References getType(), and casadi::OT_INTVECTORVECTOR.
Referenced by as_int_vector_vector(), can_cast_to(), is_empty_vector(), operator!=(), to_double_vector_vector(), to_int_vector_vector(), to_vector(), and to_vector_vector().
|
inherited |
Definition at line 116 of file generic_shared_impl.hpp.
| bool casadi::GenericType::is_string | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 179 of file generic_type.cpp.
References getType(), and casadi::OT_STRING.
Referenced by as_string(), can_cast_to(), operator!=(), casadi::set_uno_option(), to_string(), to_string_vector(), and casadi::transform_token_str().
| bool casadi::GenericType::is_string_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 216 of file generic_type.cpp.
References getType(), and casadi::OT_STRINGVECTOR.
Referenced by as_string_vector(), can_cast_to(), is_empty_vector(), to_string_vector(), and to_vector().
| bool casadi::GenericType::is_string_vector_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 220 of file generic_type.cpp.
References getType(), and casadi::OT_STRINGVECTORVECTOR.
Referenced by as_string_vector_vector(), can_cast_to(), is_empty_vector(), to_string_vector_vector(), to_vector(), and to_vector_vector().
| bool casadi::GenericType::is_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 248 of file generic_type.cpp.
References getType(), and casadi::OT_VECTOR.
Referenced by as_vector(), can_cast_to(), is_empty_vector(), and to_vector().
| bool casadi::GenericType::is_vector_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 244 of file generic_type.cpp.
References getType(), and casadi::OT_VECTORVECTOR.
Referenced by as_vector_vector(), can_cast_to(), is_empty_vector(), to_vector(), and to_vector_vector().
| bool casadi::GenericType::is_void_pointer | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 232 of file generic_type.cpp.
References getType(), and casadi::OT_VOIDPTR.
Referenced by as_void_pointer(), can_cast_to(), and to_void_pointer().
|
inline |
|
inline |
Implicit typecasting
Definition at line 137 of file generic_type.hpp.
References casadi::to_int().
|
inline |
Implicit typecasting
Definition at line 154 of file generic_type.hpp.
|
inline |
Implicit typecasting
Definition at line 152 of file generic_type.hpp.
|
inline |
|
inline |
Implicit typecasting
Definition at line 153 of file generic_type.hpp.
|
inline |
Implicit typecasting
Definition at line 157 of file generic_type.hpp.
|
inline |
Implicit typecasting
Definition at line 156 of file generic_type.hpp.
|
inline |
Implicit typecasting
Definition at line 139 of file generic_type.hpp.
|
inline |
|
inline |
Implicit typecasting
Definition at line 140 of file generic_type.hpp.
References casadi::to_string().
|
inline |
|
inline |
|
inline |
| casadi::GenericType::operator std::vector< int > | ( | ) | const |
|
inline |
|
inline |
|
inline |
Implicit typecasting
Definition at line 147 of file generic_type.hpp.
| casadi::GenericType::operator std::vector< std::vector< int > > | ( | ) | const |
Implicit typecasting
|
inline |
| bool casadi::GenericType::operator!= | ( | const GenericType & | op2 | ) | const |
Definition at line 684 of file generic_type.cpp.
References is_double(), is_double_vector(), is_double_vector_vector(), is_int(), is_int_vector(), is_int_vector_vector(), is_string(), to_double(), to_double_vector(), to_double_vector_vector(), to_int(), to_int_vector(), to_int_vector_vector(), and to_string().
|
inherited |
Definition at line 108 of file generic_shared_impl.hpp.
| bool casadi::GenericType::operator== | ( | const GenericType & | op2 | ) | const |
Definition at line 680 of file generic_type.cpp.
|
inherited |
Assign the node to a node class pointer (or null)
Definition at line 89 of file generic_shared_impl.hpp.
|
inherited |
Print the pointer to the internal class
Definition at line 43 of file shared_object.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get().
| void casadi::GenericType::serialize | ( | SerializingStream & | s | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17r
Definition at line 773 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), getType(), and casadi::SerializingStream::pack().
|
inherited |
Definition at line 105 of file generic_shared_impl.hpp.
| bool casadi::GenericType::to_bool | ( | ) | const |
Definition at line 409 of file generic_type.cpp.
References as_bool(), is_bool(), is_int(), and to_int().
Referenced by casadi::set_uno_option(), to_double(), and to_int().
| std::vector< bool > casadi::GenericType::to_bool_vector | ( | ) | const |
Definition at line 470 of file generic_type.cpp.
References as_bool(), as_bool_vector(), as_double(), as_int(), is_bool(), is_bool_vector(), is_double(), is_int(), is_int_vector(), and to_int_vector().
Referenced by is_empty_vector().
| Dict casadi::GenericType::to_dict | ( | ) | const |
Definition at line 551 of file generic_type.cpp.
References as_dict(), and is_dict().
Referenced by casadi::transform_token_str().
| std::vector< Dict > casadi::GenericType::to_dict_vector | ( | ) | const |
Definition at line 556 of file generic_type.cpp.
References as_dict(), as_dict_vector(), is_dict(), is_dict_vector(), and is_empty_vector().
| double casadi::GenericType::to_double | ( | ) | const |
Definition at line 431 of file generic_type.cpp.
References as_double(), is_bool(), is_double(), is_int(), to_bool(), and to_int().
Referenced by operator!=(), casadi::set_uno_option(), and to_int().
| std::vector< double > casadi::GenericType::to_double_vector | ( | ) | const |
Definition at line 499 of file generic_type.cpp.
References as_bool(), as_double(), as_double_vector(), as_int(), as_int_vector(), is_bool(), is_double(), is_double_vector(), is_int(), and is_int_vector().
Referenced by is_empty_vector(), and operator!=().
| std::vector< std::vector< double > > casadi::GenericType::to_double_vector_vector | ( | ) | const |
Definition at line 515 of file generic_type.cpp.
References as_double_vector_vector(), as_int_vector_vector(), casadi::GenericShared< SharedObject, SharedObjectInternal >::assign(), is_double_vector_vector(), and is_int_vector_vector().
Referenced by is_empty_vector(), and operator!=().
| Function casadi::GenericType::to_function | ( | ) | const |
Definition at line 660 of file generic_type.cpp.
References as_function(), and is_function().
| std::vector< Function > casadi::GenericType::to_function_vector | ( | ) | const |
Definition at line 665 of file generic_type.cpp.
References as_function_vector(), and is_function_vector().
| casadi_int casadi::GenericType::to_int | ( | ) | const |
Definition at line 420 of file generic_type.cpp.
References as_int(), is_bool(), is_double(), is_int(), to_bool(), and to_double().
Referenced by operator!=(), casadi::set_uno_option(), to_bool(), to_double(), and casadi::transform_token_str().
| std::vector< int > casadi::GenericType::to_int_type_vector | ( | ) | const |
Definition at line 447 of file generic_type.cpp.
References as_int_vector(), is_int_vector(), and casadi::to_int().
| std::vector< casadi_int > casadi::GenericType::to_int_vector | ( | ) | const |
Definition at line 452 of file generic_type.cpp.
References as_bool(), as_double(), as_int(), as_int_vector(), is_bool(), is_double(), is_int(), and is_int_vector().
Referenced by is_empty_vector(), operator!=(), and to_bool_vector().
| std::vector< std::vector< casadi_int > > casadi::GenericType::to_int_vector_vector | ( | ) | const |
Definition at line 494 of file generic_type.cpp.
References as_int_vector_vector(), and is_int_vector_vector().
Referenced by is_empty_vector(), and operator!=().
| std::string casadi::GenericType::to_string | ( | ) | const |
Definition at line 442 of file generic_type.cpp.
References as_string(), and is_string().
Referenced by casadi::ResourceInternal::change_option(), casadi::FmuFunction::change_option(), casadi::FunctionInternal::change_option(), operator!=(), casadi::set_uno_option(), and casadi::transform_token_str().
| std::vector< std::string > casadi::GenericType::to_string_vector | ( | ) | const |
Definition at line 528 of file generic_type.cpp.
References as_double_vector(), as_int_vector(), as_string(), as_string_vector(), is_double_vector(), is_int_vector(), is_string(), and is_string_vector().
Referenced by is_empty_vector().
| std::vector< std::vector< std::string > > casadi::GenericType::to_string_vector_vector | ( | ) | const |
Definition at line 546 of file generic_type.cpp.
References as_string_vector_vector(), and is_string_vector_vector().
Referenced by is_empty_vector().
| std::vector< GenericType > casadi::GenericType::to_vector | ( | ) | const |
Definition at line 566 of file generic_type.cpp.
References as_bool_vector(), as_dict_vector(), as_double_vector(), as_double_vector_vector(), as_function_vector(), as_int_vector(), as_int_vector_vector(), as_string_vector(), as_string_vector_vector(), as_vector(), as_vector_vector(), is_bool_vector(), is_dict_vector(), is_double_vector(), is_double_vector_vector(), is_function_vector(), is_int_vector(), is_int_vector_vector(), is_string_vector(), is_string_vector_vector(), is_vector(), and is_vector_vector().
Referenced by is_empty_vector().
| std::vector< std::vector< GenericType > > casadi::GenericType::to_vector_vector | ( | ) | const |
Definition at line 623 of file generic_type.cpp.
References as_double_vector_vector(), as_int_vector_vector(), as_string_vector_vector(), as_vector_vector(), is_double_vector_vector(), is_int_vector_vector(), is_string_vector_vector(), and is_vector_vector().
Referenced by is_empty_vector().
| void * casadi::GenericType::to_void_pointer | ( | ) | const |
Definition at line 670 of file generic_type.cpp.
References as_int(), as_void_pointer(), and is_void_pointer().
|
inlinestatic |
Definition at line 111 of file generic_type.hpp.
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_aw
Definition at line 130 of file generic_shared_impl.hpp.