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< casadi_int > & | 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 249 of file generic_type.cpp.
casadi::GenericType::GenericType | ( | bool | b | ) |
Definition at line 252 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | casadi_int | i | ) |
Definition at line 256 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 260 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | const std::string & | s | ) |
Definition at line 300 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | const std::vector< bool > & | iv | ) |
Definition at line 278 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | const std::vector< casadi_int > & | iv | ) |
Definition at line 264 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | const std::vector< int > & | iv | ) |
Definition at line 268 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 274 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | const std::vector< double > & | dv | ) |
Definition at line 284 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | const std::vector< std::vector< double > > & | dv | ) |
Definition at line 288 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | const std::vector< std::string > & | sv | ) |
Definition at line 292 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 296 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | const char | s[] | ) |
Definition at line 304 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | const Function & | f | ) |
Definition at line 308 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | const std::vector< Function > & | f | ) |
Definition at line 312 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | const Dict & | dict | ) |
Definition at line 714 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | const std::vector< Dict > & | dictv | ) |
Definition at line 718 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | const std::vector< std::vector< GenericType > > & | gvv | ) |
Definition at line 726 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | const std::vector< GenericType > & | gv | ) |
Definition at line 722 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::GenericType::GenericType | ( | void * | ptr | ) |
Definition at line 730 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 124 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 316 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_bool().
Referenced by to_bool().
const std::vector< casadi_int > & casadi::GenericType::as_bool_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 341 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_bool_vector().
Referenced by to_vector().
const GenericType::Dict & casadi::GenericType::as_dict | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 371 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 376 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 326 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_double().
Referenced by to_double().
const std::vector< double > & casadi::GenericType::as_double_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17q
Definition at line 351 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 356 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 391 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 396 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 321 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), and is_int().
Referenced by to_int(), 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 336 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 346 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 331 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 361 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 366 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 386 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 381 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 401 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 97 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 60 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 134 of file generic_shared_impl.hpp.
|
protectedinherited |
Definition at line 133 of file generic_shared_impl.hpp.
|
static |
Extra doc: https://github.com/casadi/casadi/wiki/L_17o
Definition at line 789 of file generic_type.cpp.
References casadi::GenericShared< Shared, Internal >::own().
|
inherited |
Definition at line 113 of file generic_shared_impl.hpp.
|
static |
Extra doc: https://github.com/casadi/casadi/wiki/L_17s
Definition at line 747 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 92 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 100 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 119 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 103 of file generic_shared_impl.hpp.
TypeID casadi::GenericType::getType | ( | ) | const |
Definition at line 734 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 164 of file generic_type.cpp.
References getType(), and casadi::OT_BOOL.
Referenced by as_bool(), can_cast_to(), to_bool(), and to_int().
bool casadi::GenericType::is_bool_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 197 of file generic_type.cpp.
References getType(), and casadi::OT_BOOLVECTOR.
Referenced by as_bool_vector(), can_cast_to(), is_empty_vector(), and to_vector().
bool casadi::GenericType::is_dict | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 233 of file generic_type.cpp.
References getType(), and casadi::OT_DICT.
Referenced by as_dict(), casadi::Options::sanitize(), to_dict(), to_dict_vector(), and casadi::update_dict().
bool casadi::GenericType::is_dict_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 237 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 172 of file generic_type.cpp.
References getType(), and casadi::OT_DOUBLE.
Referenced by as_double(), can_cast_to(), operator!=(), to_double(), and to_int().
bool casadi::GenericType::is_double_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 205 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 209 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 180 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 221 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 225 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 168 of file generic_type.cpp.
References getType(), and casadi::OT_INT.
Referenced by as_int(), can_cast_to(), operator!=(), to_bool(), to_double(), and to_int().
bool casadi::GenericType::is_int_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 193 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 201 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 117 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 176 of file generic_type.cpp.
References getType(), and casadi::OT_STRING.
Referenced by as_string(), can_cast_to(), operator!=(), to_string(), and to_string_vector().
bool casadi::GenericType::is_string_vector | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_17p
Definition at line 213 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 217 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 245 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 241 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 229 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 653 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 109 of file generic_shared_impl.hpp.
bool casadi::GenericType::operator== | ( | const GenericType & | op2 | ) | const |
Definition at line 649 of file generic_type.cpp.
|
inherited |
Assign the node to a node class pointer (or null)
Definition at line 90 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 742 of file generic_type.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get(), getType(), and casadi::SerializingStream::pack().
|
inherited |
Definition at line 106 of file generic_shared_impl.hpp.
bool casadi::GenericType::to_bool | ( | ) | const |
Definition at line 406 of file generic_type.cpp.
References as_bool(), is_bool(), is_int(), and to_int().
Referenced by to_int().
std::vector< bool > casadi::GenericType::to_bool_vector | ( | ) | const |
Definition at line 458 of file generic_type.cpp.
References is_int_vector(), and to_int_vector().
Referenced by is_empty_vector().
Dict casadi::GenericType::to_dict | ( | ) | const |
std::vector< Dict > casadi::GenericType::to_dict_vector | ( | ) | const |
Definition at line 525 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 428 of file generic_type.cpp.
References as_double(), is_double(), is_int(), and to_int().
Referenced by operator!=(), and to_int().
std::vector< double > casadi::GenericType::to_double_vector | ( | ) | const |
Definition at line 474 of file generic_type.cpp.
References as_double_vector(), as_int_vector(), is_double_vector(), 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 484 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 629 of file generic_type.cpp.
References as_function(), and is_function().
std::vector< Function > casadi::GenericType::to_function_vector | ( | ) | const |
Definition at line 634 of file generic_type.cpp.
References as_function_vector(), and is_function_vector().
casadi_int casadi::GenericType::to_int | ( | ) | const |
Definition at line 417 of file generic_type.cpp.
References as_int(), is_bool(), is_double(), is_int(), to_bool(), and to_double().
Referenced by operator!=(), to_bool(), and to_double().
std::vector< int > casadi::GenericType::to_int_type_vector | ( | ) | const |
Definition at line 442 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 447 of file generic_type.cpp.
References as_int_vector(), 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 469 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 437 of file generic_type.cpp.
References as_string(), and is_string().
Referenced by casadi::ResourceInternal::change_option(), casadi::FunctionInternal::change_option(), and operator!=().
std::vector< std::string > casadi::GenericType::to_string_vector | ( | ) | const |
Definition at line 497 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 515 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 535 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 592 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 639 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 131 of file generic_shared_impl.hpp.