Target.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <swarmio/data/Variant.pb.h>
4 #include <swarmio/data/discovery/Schema.pb.h>
5 
7 {
12  class SWARMIO_API Target
13  {
14  public:
15 
21  virtual data::Variant Get(const std::string& path) = 0;
22 
28  virtual void Set(const std::string& path, const data::Variant& value) = 0;
29 
35  virtual data::discovery::Field GetFieldDescriptor(const std::string& path) const = 0;
36 
42  virtual bool CanRead(const std::string& path) const noexcept
43  {
44  return true;
45  }
46 
52  virtual bool CanWrite(const std::string& path) const noexcept
53  {
54  return false;
55  }
56  };
57 }
virtual bool CanWrite(const std::string &path) const noexcept
Determines whether the value can be written.
Definition: Target.h:52
Abstract base class for registered keys.
Definition: Target.h:12
virtual bool CanRead(const std::string &path) const noexcept
Determines whether the value can be read.
Definition: Target.h:42


swarmros
Author(s):
autogenerated on Fri Apr 3 2020 03:42:48