12#ifndef RTCTK_COMPONENTFRAMEWORK_PATHMAPPER_HPP
13#define RTCTK_COMPONENTFRAMEWORK_PATHMAPPER_HPP
16#include <mal/utility/Uri.hpp>
63 explicit PathMapper(
const elt::mal::Uri& baseuri,
bool simple_layout =
false);
81 return m_simple_layout;
94 m_simple_layout = simple_layout;
152 std::string& filepath,
153 std::vector<std::string>& dictkeys)
const;
156 elt::mal::Uri m_baseuri;
159 bool m_simple_layout;
165 std::filesystem::path m_basepath;
This class provides a wrapper for a data point path.
Definition dataPointPath.hpp:76
FilePathResult PathToFile(const DataPointPath &path) const
Maps a datapoint path to the corresponding local filesystem path.
Definition pathMapper.cpp:31
void SetSimpleLayout(bool simple_layout)
Sets the flag that indicates if the simple repository layout should be used.
Definition pathMapper.hpp:93
bool GetSimpleLayout() const
Definition pathMapper.hpp:80
PathMapper(const elt::mal::Uri &baseuri, bool simple_layout=false)
Constructs the mapper object with base URI and format flag.
Definition pathMapper.cpp:19
static std::vector< std::string > SplitPathComponents(const DataPointPath &path)
Splits the datapoint path into a list of individual path components.
Definition pathMapper.cpp:39
UriResult PathToUri(const DataPointPath &path) const
Maps a datapoint path to the corresponding URI.
Definition pathMapper.cpp:23
const std::filesystem::path & GetBasePath() const
Get the base path for the repository.
Definition pathMapper.hpp:75
const elt::mal::Uri & GetBaseUri() const
Definition pathMapper.hpp:66
Header file for DataPointPath.
Definition commandReplier.cpp:21
Result object returned by the PathToFile method.
Definition pathMapper.hpp:48
std::filesystem::path m_filepath
Local YAML file path calculated from a datapoint path.
Definition pathMapper.hpp:50
std::vector< std::string > m_key_names
The dictionary keys needed to lookup the datapoint within the YAML file.
Definition pathMapper.hpp:53
Result object returned by the PathToUri method.
Definition pathMapper.hpp:37
elt::mal::Uri m_uri
URI calculated from a datapoint path.
Definition pathMapper.hpp:39
std::vector< std::string > m_key_names
The dictionary keys needed to lookup the datapoint within the document.
Definition pathMapper.hpp:42