26 #ifndef CASADI_RESOURCE_HPP
27 #define CASADI_RESOURCE_HPP
29 #include "shared_object.hpp"
30 #include "printable.hpp"
31 #include "generic_type.hpp"
35 class ResourceInternal;
36 class SerializingStream;
37 class DeserializingStream;
44 public SWIG_IF_ELSE(PrintableCommon, Printable<Resource>) {
62 static bool test_cast(
const SharedObjectInternal* ptr);
68 static Resource create(ResourceInternal *node);
70 ResourceInternal* get()
const;
73 const ResourceInternal* operator->()
const;
76 ResourceInternal* operator->();
79 const ResourceInternal& operator*()
const;
83 const std::string&
path()
const;
Helper class for Serialization.
Generic data type, can hold different types such as bool, casadi_int, std::string etc.
RAII class for reading from a zip file.
void serialize(SerializingStream &s) const
Serialize an object.
static bool test_cast(const SharedObjectInternal *ptr)
Check if a particular cast is allowed.
static Resource deserialize(DeserializingStream &s)
Deserialize with type disambiguation.
static std::string type_name()
Readable name of the public class.
Resource()
Default constructor.
Resource(const std::string &path)
Initialize with a path.
const std::string & path() const
Get path for a consumer.
void change_option(const std::string &option_name, const GenericType &option_value)
Change option after object creation for debugging.
Helper class for Serialization.
GenericShared implements a reference counting framework similar for efficient and.