class
AbstractFileBasedManagedObject
Base classes
- class AbstractManagedObject
- This abstract base class provides the interface of expected functionality for an object to be manageable by esp::
core:: managedContainers:: ManagedContainer class template specializations. Any class that inherits from this class properly can be managed by a esp:: core:: managedContainers:: ManagedContainer specialization.
Derived classes
- class esp::metadata::attributes::AbstractAttributes
- Base class for all implemented attributes. Inherits from esp::
core:: managedContainers:: AbstractFileBasedManagedObject so the attributes can be managed by a esp:: core:: managedContainers:: ManagedContainer.
Public functions
-
void setFileDirectory(const std::
string& fileDirectory) pure virtual - Set the directory where files used to construct ManagedObject can be found.
-
auto getFileDirectory() const -> std::
string pure virtual - Get directory where files used to construct ManagedObject can be found.
-
void setActualFilename(const std::
string& fullFileName) pure virtual - Set the fully qualified filename of the file used to create or most recently save this ManagedObject.
-
auto getActualFilename() const -> std::
string pure virtual - Get the fully qualified filename of the file used to create or most recently save this ManagedObject.
- auto isAttrSaved() const -> bool pure virtual
- Get whether this ManagedObject has been saved to disk in its current state. Only applicable to registered ManagedObjects.
- void setAttrIsNotSaved()
- Set that this ManagedObject has values that are different than its most recently saved-to-disk version. This is called when the ManagedObject is registered.
- void setAttrIsSaved()
- Set that this ManagedObject is the same as its saved-to-disk version. This is called when the ManagedObject is saved to disk.
-
auto getSimplifiedHandle() const -> std::
string virtual - This will return a simplified version of the AbstractFileBasedManagedObject handle, removing extensions and any parent directories in name. Note : there's no guarantee this handle will be sufficiently unique to identify this AbstractFileBasedManagedObject, so this should only be used for logging, and not for attempts to search for AbstractFileBasedManagedObjects.
- auto writeToJsonObject(io::JsonAllocator& allocator) const -> io::JsonGenericValue pure virtual
- Build and return a json object holding the pertinent data for this AbstractFileBasedManagedObject.
Protected functions
- void setFileSaveStatus(bool _isSaved) pure virtual
- Set this ManagedObject's save status (i.e. whether it matches its version on disk or not)