Go to the documentation of this file.
12 #ifndef RTCTK_COMPONENTFRAMEWORK_PATHMAPPER_HPP
13 #define RTCTK_COMPONENTFRAMEWORK_PATHMAPPER_HPP
16 #include <mal/utility/Uri.hpp>
60 PathMapper(
const elt::mal::Uri& baseuri,
bool simple_layout =
false);
78 return m_simple_layout;
90 m_simple_layout = simple_layout;
148 std::string& filepath,
149 std::vector<std::string>& dictkeys)
const;
152 elt::mal::Uri m_baseuri;
155 bool m_simple_layout;
161 std::filesystem::path m_basepath;
166 #endif // RTCTK_COMPONENTFRAMEWORK_PATHMAPPER_HPP
elt::mal::Uri m_uri
URI calculated from a datapoint path.
Definition: pathMapper.hpp:36
static std::vector< std::string > SplitPathComponents(const DataPointPath &path)
Splits the datapoint path into a list of individual path components.
Definition: pathMapper.cpp:39
FilePathResult PathToFile(const DataPointPath &path) const
Maps a datapoint path to the corresponding local filesystem path.
Definition: pathMapper.cpp:31
Definition: commandReplier.cpp:20
Used to calculate URIs from datapoint paths.
Definition: pathMapper.hpp:29
PathMapper(const elt::mal::Uri &baseuri, bool simple_layout=false)
Constructs the mapper object with base URI and format flag.
Definition: pathMapper.cpp:18
std::filesystem::path m_filepath
Local YAML file path calculated form a datapoint path.
Definition: pathMapper.hpp:47
const std::filesystem::path & GetBasePath() const
Get the base path for the repository.
Definition: pathMapper.hpp:72
void SetSimpleLayout(bool simple_layout)
Sets the flag that indicates if the simple repository layout should be used.
Definition: pathMapper.hpp:89
std::vector< std::string > m_key_names
The dictionary keys needed to lookup the datapoint within the document.
Definition: pathMapper.hpp:39
Result object returned by the PathToUri method.
Definition: pathMapper.hpp:34
UriResult PathToUri(const DataPointPath &path) const
Maps a datapoint path to the corresponding URI.
Definition: pathMapper.cpp:23
bool GetSimpleLayout() const
Definition: pathMapper.hpp:77
Header file for DataPointPath.
std::vector< std::string > m_key_names
The dictionary keys needed to lookup the datapoint within the YAML file.
Definition: pathMapper.hpp:50
Result object returned by the PathToFile method.
Definition: pathMapper.hpp:45
This class provides a wrapper for a data point path.
Definition: dataPointPath.hpp:65
const elt::mal::Uri & GetBaseUri() const
Definition: pathMapper.hpp:63