YARP
Yet Another Robot Platform
StyleNameService.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_SERVERSQL_IMPL_STYLENAMESERVICE_H
10 #define YARP_SERVERSQL_IMPL_STYLENAMESERVICE_H
11 
12 #include <yarp/os/Property.h>
13 #include <yarp/name/NameService.h>
14 
15 
16 namespace yarp {
17 namespace serversql {
18 namespace impl {
19 
21 {
22 public:
23  StyleNameService() = default;
24 
25  bool configure(const yarp::os::Searchable& options)
26  {
27  this->options.fromString(options.toString());
28  return true;
29  }
30 
31  bool apply(yarp::os::Bottle& cmd,
32  yarp::os::Bottle& reply,
33  yarp::os::Bottle& event,
34  const yarp::os::Contact& remote) override;
35 
36 private:
37  yarp::os::Property options;
38  yarp::os::Property content;
39  yarp::os::Property mime;
40 };
41 
42 } // namespace impl
43 } // namespace serversql
44 } // namespace yarp
45 
46 
47 #endif // YARP_SERVERSQL_IMPL_STYLENAMESERVICE_H
yarp::os::Bottle
A simple collection of objects that can be described and transmitted in a portable way.
Definition: Bottle.h:73
yarp::os::Searchable
A base class for nested structures that can be searched.
Definition: Searchable.h:69
yarp::os::Searchable::toString
virtual std::string toString() const =0
Return a standard text representation of the content of the object.
yarp::serversql::impl::StyleNameService::apply
bool apply(yarp::os::Bottle &cmd, yarp::os::Bottle &reply, yarp::os::Bottle &event, const yarp::os::Contact &remote) override
Definition: StyleNameService.cpp:18
Property.h
yarp::serversql::impl::StyleNameService::configure
bool configure(const yarp::os::Searchable &options)
Definition: StyleNameService.h:25
yarp::serversql::impl::StyleNameService::StyleNameService
StyleNameService()=default
NameService.h
yarp::name::NameService
Abstract interface for a name server operator.
Definition: NameService.h:39
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::os::Contact
Represents how to reach a part of a YARP network.
Definition: Contact.h:39
yarp::serversql::impl::StyleNameService
Definition: StyleNameService.h:21
yarp::os::Property
A class for storing options and configuration information.
Definition: Property.h:37