DiskMemoryItemMixin Class Reference

#include <RobotAPI/libraries/armem/server/ltm/detail/mixins/DiskStorageMixin.h>

+ Inheritance diagram for DiskMemoryItemMixin:

Public Member Functions

void createPropertyDefinitions (PropertyDefinitionsPtr &defs, const std::string &prefix)
 
 DiskMemoryItemMixin ()=default
 
 DiskMemoryItemMixin (const Path &memoryParentPath, const std::string &exportName, const armem::MemoryID &id)
 
void ensureFileExists (const std::string &filename, bool createIfNotExistent=false) const
 
void ensureFullPathExists (bool createIfNotExistent=false) const
 
void ensureMemoryBasePathExists (bool createIfNotExistent=false) const
 
bool fileExists (const std::string &filename) const
 
bool fullPathExists () const
 
std::vector< PathgetAllDirectories () const
 
std::vector< PathgetAllFiles () const
 
Path getFullPath () const
 
Path getMemoryBasePath () const
 
bool memoryBasePathExists () const
 
std::vector< unsigned char > readDataFromFile (const std::string &filename) const
 
void writeDataToFile (const std::string &filename, const std::vector< unsigned char > &data) const
 
virtual ~DiskMemoryItemMixin ()=default
 

Static Public Attributes

static const int DEPTH_TO_DATA_FILES
 

Protected Member Functions

Path addDateToMemoryBasePath (const std::filesystem::path &n) const
 
void configureMixin (const nlohmann::json &json)
 
void setMixinExportName (const std::string &n)
 
void setMixinMemoryID (const MemoryID &n)
 

Static Protected Attributes

static const constexpr char * DATA_FILENAME = "data.aron"
 
static const constexpr char * MEMORY_EXPORT_SUFFIX = "_"
 
static const constexpr char * METADATA_FILENAME = "metadata.aron"
 
static const constexpr char * TYPE_FILENAME = "type.aron"
 

Detailed Description

Definition at line 19 of file DiskStorageMixin.h.

Constructor & Destructor Documentation

◆ DiskMemoryItemMixin() [1/2]

DiskMemoryItemMixin ( )
default

◆ DiskMemoryItemMixin() [2/2]

DiskMemoryItemMixin ( const Path memoryParentPath,
const std::string &  exportName,
const armem::MemoryID id 
)

Definition at line 19 of file DiskStorageMixin.cpp.

◆ ~DiskMemoryItemMixin()

virtual ~DiskMemoryItemMixin ( )
virtualdefault

Member Function Documentation

◆ addDateToMemoryBasePath()

Path addDateToMemoryBasePath ( const std::filesystem::path &  n) const
protected

Definition at line 27 of file DiskStorageMixin.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ configureMixin()

void configureMixin ( const nlohmann::json &  json)
protected

Definition at line 68 of file DiskStorageMixin.cpp.

+ Here is the caller graph for this function:

◆ createPropertyDefinitions()

void createPropertyDefinitions ( PropertyDefinitionsPtr defs,
const std::string &  prefix 
)

Definition at line 169 of file DiskStorageMixin.cpp.

+ Here is the caller graph for this function:

◆ ensureFileExists()

void ensureFileExists ( const std::string &  filename,
bool  createIfNotExistent = false 
) const

Definition at line 133 of file DiskStorageMixin.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ensureFullPathExists()

void ensureFullPathExists ( bool  createIfNotExistent = false) const

Definition at line 126 of file DiskStorageMixin.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ensureMemoryBasePathExists()

void ensureMemoryBasePathExists ( bool  createIfNotExistent = false) const

Definition at line 120 of file DiskStorageMixin.cpp.

+ Here is the call graph for this function:

◆ fileExists()

bool fileExists ( const std::string &  filename) const

Definition at line 113 of file DiskStorageMixin.cpp.

+ Here is the call graph for this function:

◆ fullPathExists()

bool fullPathExists ( ) const

Definition at line 106 of file DiskStorageMixin.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAllDirectories()

std::vector< Path > getAllDirectories ( ) const

Definition at line 156 of file DiskStorageMixin.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAllFiles()

std::vector< Path > getAllFiles ( ) const

Definition at line 163 of file DiskStorageMixin.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFullPath()

Path getFullPath ( ) const

Definition at line 89 of file DiskStorageMixin.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMemoryBasePath()

Path getMemoryBasePath ( ) const

Definition at line 77 of file DiskStorageMixin.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ memoryBasePathExists()

bool memoryBasePathExists ( ) const

Definition at line 100 of file DiskStorageMixin.cpp.

+ Here is the call graph for this function:

◆ readDataFromFile()

std::vector< unsigned char > readDataFromFile ( const std::string &  filename) const

Definition at line 149 of file DiskStorageMixin.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMixinExportName()

void setMixinExportName ( const std::string &  n)
protected

Definition at line 53 of file DiskStorageMixin.cpp.

+ Here is the caller graph for this function:

◆ setMixinMemoryID()

void setMixinMemoryID ( const MemoryID n)
protected

Definition at line 60 of file DiskStorageMixin.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeDataToFile()

void writeDataToFile ( const std::string &  filename,
const std::vector< unsigned char > &  data 
) const

Definition at line 141 of file DiskStorageMixin.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ DATA_FILENAME

const constexpr char* DATA_FILENAME = "data.aron"
staticconstexprprotected

Definition at line 67 of file DiskStorageMixin.h.

◆ DEPTH_TO_DATA_FILES

const int DEPTH_TO_DATA_FILES
static
Initial value:
=
7

Definition at line 62 of file DiskStorageMixin.h.

◆ MEMORY_EXPORT_SUFFIX

const constexpr char* MEMORY_EXPORT_SUFFIX = "_"
staticconstexprprotected

Definition at line 70 of file DiskStorageMixin.h.

◆ METADATA_FILENAME

const constexpr char* METADATA_FILENAME = "metadata.aron"
staticconstexprprotected

Definition at line 68 of file DiskStorageMixin.h.

◆ TYPE_FILENAME

const constexpr char* TYPE_FILENAME = "type.aron"
staticconstexprprotected

Definition at line 66 of file DiskStorageMixin.h.


The documentation for this class was generated from the following files: