13#ifndef RTCTK_COMPONENTFRAMEWORK_PATHMAPPER_HPP
14#define RTCTK_COMPONENTFRAMEWORK_PATHMAPPER_HPP
17#include <mal/utility/Uri.hpp>
64 PathMapper(
const elt::mal::Uri& baseuri,
bool simple_layout =
false);
82 return m_simple_layout;
95 m_simple_layout = simple_layout;
153 std::string& filepath,
154 std::vector<std::string>& dictkeys)
const;
157 elt::mal::Uri m_baseuri;
160 bool m_simple_layout;
166 std::filesystem::path m_basepath;
This class provides a wrapper for a data point path.
Definition: dataPointPath.hpp:73
Used to calculate URIs from datapoint paths.
Definition: pathMapper.hpp:33
FilePathResult PathToFile(const DataPointPath &path) const
Maps a datapoint path to the corresponding local filesystem path.
Definition: pathMapper.cpp:33
void SetSimpleLayout(bool simple_layout)
Sets the flag that indicates if the simple repository layout should be used.
Definition: pathMapper.hpp:94
bool GetSimpleLayout() const
Definition: pathMapper.hpp:81
static std::vector< std::string > SplitPathComponents(const DataPointPath &path)
Splits the datapoint path into a list of individual path components.
Definition: pathMapper.cpp:41
UriResult PathToUri(const DataPointPath &path) const
Maps a datapoint path to the corresponding URI.
Definition: pathMapper.cpp:25
const std::filesystem::path & GetBasePath() const
Get the base path for the repository.
Definition: pathMapper.hpp:76
const elt::mal::Uri & GetBaseUri() const
Definition: pathMapper.hpp:67
Header file for DataPointPath.
Definition: commandReplier.cpp:22
Result object returned by the PathToFile method.
Definition: pathMapper.hpp:49
std::filesystem::path m_filepath
Local YAML file path calculated from a datapoint path.
Definition: pathMapper.hpp:51
std::vector< std::string > m_key_names
The dictionary keys needed to lookup the datapoint within the YAML file.
Definition: pathMapper.hpp:54
Result object returned by the PathToUri method.
Definition: pathMapper.hpp:38
elt::mal::Uri m_uri
URI calculated from a datapoint path.
Definition: pathMapper.hpp:40
std::vector< std::string > m_key_names
The dictionary keys needed to lookup the datapoint within the document.
Definition: pathMapper.hpp:43