metadata.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008, Willow Garage, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Willow Garage, Inc. nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  *
29  */
30 
39 #ifndef WAREHOUSE_ROS_METADATA_H
40 #define WAREHOUSE_ROS_METADATA_H
41 
42 #include <ros/ros.h>
43 #include <boost/shared_ptr.hpp>
44 #include <set>
45 
46 namespace warehouse_ros
47 {
52 class Query
53 {
54 public:
57 
58  virtual ~Query()
59  {
60  }
61  virtual void append(const std::string& name, const std::string& val) = 0;
62  virtual void append(const std::string& name, const double val) = 0;
63  virtual void append(const std::string& name, const int val) = 0;
64  virtual void append(const std::string& name, const bool val) = 0;
65  virtual void appendLT(const std::string& name, const double val) = 0;
66  virtual void appendLT(const std::string& name, const int val) = 0;
67  virtual void appendLTE(const std::string& name, const double val) = 0;
68  virtual void appendLTE(const std::string& name, const int val) = 0;
69  virtual void appendGT(const std::string& name, const double val) = 0;
70  virtual void appendGT(const std::string& name, const int val) = 0;
71  virtual void appendGTE(const std::string& name, const double val) = 0;
72  virtual void appendGTE(const std::string& name, const int val) = 0;
73  virtual void appendRange(const std::string& name, const double lower, const double upper) = 0;
74  virtual void appendRange(const std::string& name, const int lower, const int upper) = 0;
75  virtual void appendRangeInclusive(const std::string& name, const double lower, const double upper) = 0;
76  virtual void appendRangeInclusive(const std::string& name, const int lower, const int upper) = 0;
77 };
78 
83 class Metadata
84 {
85 public:
88 
89  virtual ~Metadata()
90  {
91  }
92  virtual void append(const std::string& name, const std::string& val) = 0;
93  virtual void append(const std::string& name, const double val) = 0;
94  virtual void append(const std::string& name, const int val) = 0;
95  virtual void append(const std::string& name, const bool val) = 0;
96  virtual std::string lookupString(const std::string& name) const = 0;
97  virtual double lookupDouble(const std::string& name) const = 0;
98  virtual int lookupInt(const std::string& name) const = 0;
99  virtual bool lookupBool(const std::string& name) const = 0;
100  virtual bool lookupField(const std::string& name) const = 0;
101  virtual std::set<std::string> lookupFieldNames() const = 0;
102 };
103 
104 } // namespace
105 
106 #endif // include guard
virtual void appendGTE(const std::string &name, const double val)=0
virtual ~Query()
Definition: metadata.h:58
boost::shared_ptr< Query > Ptr
Definition: metadata.h:55
boost::shared_ptr< const Metadata > ConstPtr
Definition: metadata.h:87
virtual void appendLTE(const std::string &name, const double val)=0
boost::shared_ptr< const Query > ConstPtr
Definition: metadata.h:56
virtual void appendLT(const std::string &name, const double val)=0
Represents metadata attached to a message.
Definition: metadata.h:83
boost::shared_ptr< Metadata > Ptr
Definition: metadata.h:86
Represents a query to the db.
Definition: metadata.h:52
virtual void append(const std::string &name, const std::string &val)=0
virtual void appendRange(const std::string &name, const double lower, const double upper)=0
virtual void appendRangeInclusive(const std::string &name, const double lower, const double upper)=0
virtual void appendGT(const std::string &name, const double val)=0


warehouse_ros
Author(s): Bhaskara Marthi , Connor Brew
autogenerated on Fri Jun 7 2019 21:44:23