RTC Toolkit  1.0.0
persistentRepoAdapter.hpp
Go to the documentation of this file.
1 
12 #ifndef RTCTK_COMPONENTFRAMEWORK_PERSISTENTREPOADAPTER_HPP
13 #define RTCTK_COMPONENTFRAMEWORK_PERSISTENTREPOADAPTER_HPP
14 
15 #include <mal/utility/Uri.hpp>
18 
19 namespace rtctk::componentFramework {
20 
31 public:
34 
37 
40 
43 
46 
53  explicit PersistentRepoAdapter(const elt::mal::Uri& datauri);
54 
55  virtual ~PersistentRepoAdapter() = default;
56 
58  void CreateDataPoint(const DataPointPath& path, const std::type_info& type) override;
59 
60  void DeleteDataPoint(const DataPointPath& path) override;
61  const std::type_info& GetDataPointType(const DataPointPath& path) const override;
62  std::size_t GetDataPointSize(const DataPointPath& path) const override;
63  bool DataPointExists(const DataPointPath& path) const override;
64  std::pair<StringList, StringList> GetChildren(const DataPointPath& path) const override;
65  Response SendReadRequest(const Request& request) const override;
66  Response SendWriteRequest(const Request& request) override;
67 
68 private:
69  elt::mal::Uri m_baseuri;
70 };
71 
72 } // namespace rtctk::componentFramework
73 
74 #endif // RTCTK_COMPONENTFRAMEWORK_PERSISTENTREPOADAPTER_HPP
rtctk::componentFramework::PersistentRepoAdapter::CreateDataPoint
virtual void CreateDataPoint(const DataPointPath &path, const std::type_info &type)=0
Creates a new datapoint in the repository with a specified type.
rtctk::componentFramework::PersistentRepoIf
Definition: persistentRepoIf.hpp:19
rtctk::componentFramework::PersistentRepoAdapter::PersistentRepoAdapter
PersistentRepoAdapter(PersistentRepoAdapter &&)=default
Objects of this class can be moved.
rtctk::componentFramework::RepositoryIf::Request
A request object to pass information about datapoints that should be read (written) from (to) the rep...
Definition: repositoryIf.hpp:45
persistentRepoIf.hpp
Header file for PersistentRepoIf, which defines the API for PersistentRepoAdapter.
rtctk::componentFramework::PersistentRepoAdapter::operator=
PersistentRepoAdapter & operator=(const PersistentRepoAdapter &)=delete
This class cannot be copy assigned.
rtctk::componentFramework::PersistentRepoAdapter
Implements the Persistent Configuration Repository adapter that uses the CII configuration service as...
Definition: persistentRepoAdapter.hpp:30
rtctk::componentFramework
Definition: commandReplier.cpp:20
rtctk::componentFramework::PersistentRepoAdapter::SendWriteRequest
Response SendWriteRequest(const Request &request) override
Sends a request to write data to the repository.
Definition: persistentRepoAdapter.cpp:59
rtctk::componentFramework::PersistentRepoAdapter::DataPointExists
bool DataPointExists(const DataPointPath &path) const override
Checks for the existence of a datapoint in the repository.
Definition: persistentRepoAdapter.cpp:41
rtctk::componentFramework::PersistentRepoAdapter::GetDataPointType
const std::type_info & GetDataPointType(const DataPointPath &path) const override
Fetches the type of the datapoint.
Definition: persistentRepoAdapter.cpp:31
rtctk::componentFramework::PersistentRepoAdapter::GetChildren
std::pair< StringList, StringList > GetChildren(const DataPointPath &path) const override
Queries the datapoints and child paths for a given path.
Definition: persistentRepoAdapter.cpp:47
rtctk::componentFramework::PersistentRepoAdapter::PersistentRepoAdapter
PersistentRepoAdapter()=delete
Do not allow construction with no arguments.
fileRepository.hpp
Declaration of FileRepository that provides a simple file based repository.
rtctk::componentFramework::PersistentRepoAdapter::~PersistentRepoAdapter
virtual ~PersistentRepoAdapter()=default
rtctk::componentFramework::PersistentRepoAdapter::PersistentRepoAdapter
PersistentRepoAdapter(const PersistentRepoAdapter &)=delete
This class cannot be copy constructed.
rtctk::componentFramework::RepositoryIf::CreateDataPoint
virtual void CreateDataPoint(const DataPointPath &path, const std::type_info &type)=0
Creates a new datapoint in the repository with a specified type.
rtctk::componentFramework::DataPointPath
This class provides a wraper for DataPoint paths which ensures that they only contain valid character...
Definition: dataPointPath.hpp:34
rtctk::componentFramework::RepositoryIf::Response
An object used to wait for a request to complete.
Definition: repositoryIf.hpp:106
rtctk::componentFramework::PersistentRepoAdapter::GetDataPointSize
std::size_t GetDataPointSize(const DataPointPath &path) const override
Fetches the size of the datapoint's data.
Definition: persistentRepoAdapter.cpp:36
rtctk::componentFramework::PersistentRepoAdapter::operator=
PersistentRepoAdapter & operator=(PersistentRepoAdapter &&)=default
Objects of this class can be moved with the move assignment operator.
rtctk::componentFramework::PersistentRepoAdapter::DeleteDataPoint
void DeleteDataPoint(const DataPointPath &path) override
Deletes a datapoint.
Definition: persistentRepoAdapter.cpp:27
rtctk::componentFramework::PersistentRepoAdapter::SendReadRequest
Response SendReadRequest(const Request &request) const override
Sends a request to read data from the repository.
Definition: persistentRepoAdapter.cpp:53