RAII class for reading from a zip file. More...
#include <resource.hpp>
Extra doc: https://github.com/casadi/casadi/wiki/L_2cn
Definition at line 42 of file resource.hpp.

Public Types | |
| using | internal_base_type = SharedObjectInternal |
| using | base_type = SharedObject |
Public Member Functions | |
| Resource (const std::string &path) | |
| Initialize with a path. More... | |
| Resource () | |
| Default constructor. More... | |
| const std::string & | path () const |
| Get path for a consumer. More... | |
| void | serialize (SerializingStream &s) const |
| Serialize an object. More... | |
| void | change_option (const std::string &option_name, const GenericType &option_value) |
| Change option after object creation for debugging. 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... | |
| 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... | |
Static Public Member Functions | |
| static std::string | type_name () |
| Readable name of the public class. More... | |
| static bool | test_cast (const SharedObjectInternal *ptr) |
| Check if a particular cast is allowed. More... | |
| static Resource | deserialize (DeserializingStream &s) |
| Deserialize with type disambiguation. More... | |
|
inherited |
Definition at line 103 of file shared_object.hpp.
|
inherited |
Definition at line 102 of file shared_object.hpp.
| casadi::Resource::Resource | ( | const std::string & | path | ) |
If the path is a directory or empty, the path is passed through to the consumer. Otherwise, the zip file is extracted to a temporary directory.
Upon destruction, the temporary directory is removed.
Extra doc: https://github.com/casadi/casadi/wiki/L_2co
|
explicit |
|
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.
| void casadi::Resource::change_option | ( | const std::string & | option_name, |
| const GenericType & | option_value | ||
| ) |
This is only possible for a selected number of options that do not change the numerical results of the comput
Extra doc: https://github.com/casadi/casadi/wiki/L_2d4
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_au
|
inherited |
Definition at line 112 of file generic_shared_impl.hpp.
|
static |
Extra doc: https://github.com/casadi/casadi/wiki/L_2cr
|
inherited |
|
inlineinherited |
Definition at line 91 of file shared_object.hpp.
|
inherited |
Definition at line 116 of file generic_shared_impl.hpp.
| const std::string& casadi::Resource::path | ( | ) | const |
| void casadi::Resource::serialize | ( | SerializingStream & | s | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_2cq
|
static |
|
inlinestatic |
Definition at line 59 of file resource.hpp.