RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
repositoryIfUtils.hpp
Go to the documentation of this file.
1
11
12#ifndef RTCTK_COMPONENTFRAMEWORK_REPOSITORYIFUTILS_HPP
13#define RTCTK_COMPONENTFRAMEWORK_REPOSITORYIFUTILS_HPP
14
15#include <optional>
16
19
20#include <numapp/numapolicies.hpp>
21
23
38template <typename T>
39bool GetOptionalParam(RepositoryIf& repo, const DataPointPath& path, T& value) {
40 if (repo.DataPointExists(path)) {
41 value = repo.GetDataPoint<T>(path);
42 return true;
43 } else {
44 return false;
45 }
46}
47
90std::optional<numapp::NumaPolicies> GetNumaPolicies(RepositoryIf& repo, const DataPointPath& path);
91
92} // namespace rtctk::componentFramework
93#endif // #ifndef RTCTK_COMPONENTFRAMEWORK_REPOSITORYIFUTILS_HPP
This class provides a wrapper for a data point path.
Definition dataPointPath.hpp:76
Abstract interface providing basic read and write facilities to a repository.
Definition repositoryIf.hpp:50
T GetDataPoint(const DataPointPath &path) const
Fetches a datapoint from the repository.
Definition repositoryIf.ipp:1864
bool DataPointExists(const DataPointPath &path) const
Checks for the existence of a datapoint in the repository.
Definition repositoryIf.cpp:771
bool GetOptionalParam(RepositoryIf &repo, const DataPointPath &path, T &value)
Get optional datapoint.
Definition repositoryIfUtils.hpp:39
std::optional< numapp::NumaPolicies > GetNumaPolicies(RepositoryIf &repo, const DataPointPath &path)
Constructs a NumaPolicies object from the configuration datapoints found under the given datapoint pa...
Definition repositoryIfUtils.cpp:32
Logging Support Library based on log4cplus.
Definition commandReplier.cpp:21
Header file for RepositoryIf and related base classes.