Class MongoMetadata

Inheritance Relationships

Base Types

  • public warehouse_ros::Metadata

  • public warehouse_ros_mongo::WrappedBSON (Class WrappedBSON)

Class Documentation

class MongoMetadata : public warehouse_ros::Metadata, public warehouse_ros_mongo::WrappedBSON

Represents metadata attached to a message. Automatically includes a unique id and creation time.

Usage:

Metadata m(“x”, 24, “y”, 42); (templated so you can use varying number of fields, numeric or string values)

Or: m = Metadata().append(“x”, 24).append(“name”, “foo”);

Public Functions

inline MongoMetadata()
inline MongoMetadata(const std::string &json)
inline MongoMetadata(const MongoMetadata &other)
inline MongoMetadata(const BSONObj &other)
inline void append(const std::string &name, const std::string &val)
inline void append(const std::string &name, const double val)
inline void append(const std::string &name, const int val)
inline void append(const std::string &name, const bool val)
inline std::string lookupString(const std::string &name) const
inline double lookupDouble(const std::string &name) const
inline int lookupInt(const std::string &name) const
inline bool lookupBool(const std::string &name) const
inline bool lookupField(const std::string &name) const
inline std::set<std::string> lookupFieldNames() const