YARP
Yet Another Robot Platform
Type.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef YARP_OS_TYPE_H
7 #define YARP_OS_TYPE_H
8 
9 #include <yarp/os/api.h>
10 
11 #include <string>
12 
13 namespace yarp {
14 namespace os {
15 
16 class Property;
17 class Searchable;
18 class Value;
19 
21 {
22 public:
28  Type();
29 
35  Type(const Type& rhs);
36 
42  Type(Type&& rhs) noexcept;
43 
47  virtual ~Type();
48 
55  Type& operator=(const Type& rhs);
56 
63  Type& operator=(Type&& rhs) noexcept;
64 
68  std::string getName() const;
69 
70  std::string getNameOnWire() const;
71 
72  bool hasName() const;
73 
74  bool isValid() const;
75 
76  std::string toString() const;
77 
78  const Searchable& readProperties() const;
79 
80  Property& writeProperties();
81 
82  Type& addProperty(const char* key, const Value& val);
83 
87  static Type byName(const char* name);
88 
89  static Type byName(const char* name, const char* name_on_wire);
90 
91  static Type byNameOnWire(const char* name_on_wire);
92 
93  static Type anon();
94 
97 #ifndef DOXYGEN_SHOULD_SKIP_THIS
98 private:
99  class Private;
100  Private* mPriv;
101 #endif // DOXYGEN_SHOULD_SKIP_THIS
102 };
103 
104 } // namespace os
105 } // namespace yarp
106 
107 #endif // YARP_OS_TYPE_H
A class for storing options and configuration information.
Definition: Property.h:34
A base class for nested structures that can be searched.
Definition: Searchable.h:66
A single value (typically within a Bottle).
Definition: Value.h:45
std::string toString(const T &value)
convert an arbitrary type to string.
bool isValid()
Check if time is valid (non-zero).
Definition: Time.cpp:314
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_os_API
Definition: api.h:18