Class LazyLoadResource
Defined in File LazyLoadResource.h
Class Documentation
-
class LazyLoadResource
Looks like a
std::shared_ptr
, but is stored on disk when not used.Public Functions
-
LazyLoadResource() = default
-
inline LazyLoadResource(const mrpt::serialization::CSerializable::Ptr &source, const std::string &f)
-
inline const std::string &externalStorage() const
-
inline mrpt::serialization::CSerializable::Ptr value()
Access (a copy of) the underlying smart pointer to the object
-
inline const mrpt::serialization::CSerializable::Ptr &value() const
Access (a const-ref to) the underlying smart pointer to the object
-
void load() const
Ensure data is loaded from disk, if it was automatically swapped-off
-
void unload() const
Unload data and save to disk now, if not already done before
-
bool isUnloaded() const
-
inline void reset()
Empty this container.
-
void set(const mrpt::serialization::CSerializable::Ptr &source, const std::string &f)
Sets the contents of this container, including the desired external file name
Public Static Attributes
-
static std::string EXTERNAL_BASE_DIR
-
LazyLoadResource() = default