26 #include "resource.hpp"
27 #include "resource_internal.hpp"
28 #include "filesystem_impl.hpp"
71 return (*this)->path();
75 return (*this)->change_option(option_name, option_value);
79 return (*this)->serialize(s);
Helper class for Serialization.
static bool is_directory(const std::string &path)
SharedObjectInternal * get() const
Get a const pointer to the node.
void own(SharedObjectInternal *node)
SharedObjectInternal * operator->() const
Access a member function or object.
Generic data type, can hold different types such as bool, casadi_int, std::string etc.
RAII class base for reading from resources.
static ResourceInternal * deserialize(DeserializingStream &s)
RAII class for reading from a zip file.
const ResourceInternal & operator*() const
Reference to internal structure.
void serialize(SerializingStream &s) const
Serialize an object.
ResourceInternal * get() const
static bool test_cast(const SharedObjectInternal *ptr)
Check if a particular cast is allowed.
const ResourceInternal * operator->() const
Access a member function or object.
Resource()
Default constructor.
static Resource deserialize(DeserializingStream &s)
Deserialize with type disambiguation.
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.
static Resource create(ResourceInternal *node)
Create from node.
Helper class for Serialization.
RAII class for reading from a zip file.
std::vector< casadi_int > path(const std::vector< casadi_int > &map, casadi_int i_start)