14#ifndef DOXYGEN_SHOULD_SKIP_THIS
15yarp::os::SearchReport::SearchReport() :
25yarp::os::SearchMonitor::~SearchMonitor() =
default;
38 const std::string& comment)
const
40 if (getMonitor() !=
nullptr && !comment.empty()) {
43 report.value = comment;
44 report.isComment =
true;
45 reportToMonitor(report);
57 const std::string& comment)
const
59 if (getMonitor() !=
nullptr && !comment.empty()) {
60 yarp::os::SearchReport report;
62 report.value = comment;
63 report.isComment =
true;
64 reportToMonitor(report);
66 if (getMonitor() !=
nullptr) {
67 yarp::os::SearchReport report;
70 report.isDefault =
true;
71 reportToMonitor(report);
82 const std::string& comment)
const
84 if (getMonitor() !=
nullptr && !comment.empty()) {
85 yarp::os::SearchReport report;
87 report.value = comment;
88 report.isComment =
true;
89 reportToMonitor(report);
95 const std::string& comment)
const
97 if (getMonitor() !=
nullptr && !comment.empty()) {
98 yarp::os::SearchReport report;
100 report.value = comment;
101 report.isComment =
true;
102 reportToMonitor(report);
112#ifndef DOXYGEN_SHOULD_SKIP_THIS
114void yarp::os::Searchable::setMonitor(yarp::os::SearchMonitor* monitor,
const char* context)
116 this->monitor = monitor;
117 this->monitorContext = context;
120yarp::os::SearchMonitor* yarp::os::Searchable::getMonitor()
const
125std::string yarp::os::Searchable::getMonitorContext()
const
127 return monitorContext;
130void yarp::os::Searchable::reportToMonitor(
const yarp::os::SearchReport& report)
const
132 if (monitor !=
nullptr) {
133 monitor->report(report, monitorContext.c_str());
A simple collection of objects that can be described and transmitted in a portable way.
virtual bool isNull() const
Checks if the object is invalid.
virtual ~Searchable()
Destructor.
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
virtual Bottle & findGroup(const std::string &key) const =0
Gets a list corresponding to a given keyword.
Searchable()
Default constructor.
A single value (typically within a Bottle).
std::string toString() const override
Return a standard text representation of the content of the object.
bool isNull() const override
Checks if the object is invalid.
An interface to the operating system, including Port based communication.
std::string findGroup(const robotinterface::ParamList &list, const std::string &name)