Public Member Functions | Private Member Functions | List of all members
warehouse_ros_mongo::MongoMetadata Class Reference

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

#include <metadata.h>

Inheritance diagram for warehouse_ros_mongo::MongoMetadata:
Inheritance graph
[legend]

Public Member Functions

void append (const std::string &name, const std::string &val)
 
void append (const std::string &name, const double val)
 
void append (const std::string &name, const int val)
 
void append (const std::string &name, const bool val)
 
bool lookupBool (const std::string &name) const
 
double lookupDouble (const std::string &name) const
 
bool lookupField (const std::string &name) const
 
std::set< std::string > lookupFieldNames () const
 
int lookupInt (const std::string &name) const
 
std::string lookupString (const std::string &name) const
 
 MongoMetadata ()
 
 MongoMetadata (const std::string &json)
 
 MongoMetadata (const MongoMetadata &other)
 
 MongoMetadata (const BSONObj &other)
 
- Public Member Functions inherited from warehouse_ros_mongo::WrappedBSON
 WrappedBSON ()
 
 WrappedBSON (const WrappedBSON &other)
 
 WrappedBSON (const BSONObj &other)
 
 WrappedBSON (const std::string &json)
 

Private Member Functions

void initialize ()
 

Additional Inherited Members

- Protected Member Functions inherited from warehouse_ros_mongo::WrappedBSON
void update ()
 
- Protected Attributes inherited from warehouse_ros_mongo::WrappedBSON
std::shared_ptr< BSONObjBuilder > builder_
 

Detailed Description

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");

Definition at line 227 of file metadata.h.

Constructor & Destructor Documentation

◆ MongoMetadata() [1/4]

warehouse_ros_mongo::MongoMetadata::MongoMetadata ( )
inline

Definition at line 230 of file metadata.h.

◆ MongoMetadata() [2/4]

warehouse_ros_mongo::MongoMetadata::MongoMetadata ( const std::string &  json)
inline

Definition at line 235 of file metadata.h.

◆ MongoMetadata() [3/4]

warehouse_ros_mongo::MongoMetadata::MongoMetadata ( const MongoMetadata other)
inline

Definition at line 239 of file metadata.h.

◆ MongoMetadata() [4/4]

warehouse_ros_mongo::MongoMetadata::MongoMetadata ( const BSONObj &  other)
inline

Definition at line 243 of file metadata.h.

Member Function Documentation

◆ append() [1/4]

void warehouse_ros_mongo::MongoMetadata::append ( const std::string &  name,
const std::string &  val 
)
inlinevirtual

Implements warehouse_ros::Metadata.

Definition at line 247 of file metadata.h.

◆ append() [2/4]

void warehouse_ros_mongo::MongoMetadata::append ( const std::string &  name,
const double  val 
)
inlinevirtual

Implements warehouse_ros::Metadata.

Definition at line 253 of file metadata.h.

◆ append() [3/4]

void warehouse_ros_mongo::MongoMetadata::append ( const std::string &  name,
const int  val 
)
inlinevirtual

Implements warehouse_ros::Metadata.

Definition at line 259 of file metadata.h.

◆ append() [4/4]

void warehouse_ros_mongo::MongoMetadata::append ( const std::string &  name,
const bool  val 
)
inlinevirtual

Implements warehouse_ros::Metadata.

Definition at line 265 of file metadata.h.

◆ initialize()

void warehouse_ros_mongo::MongoMetadata::initialize ( )
inlineprivate

Definition at line 306 of file metadata.h.

◆ lookupBool()

bool warehouse_ros_mongo::MongoMetadata::lookupBool ( const std::string &  name) const
inlinevirtual

Implements warehouse_ros::Metadata.

Definition at line 288 of file metadata.h.

◆ lookupDouble()

double warehouse_ros_mongo::MongoMetadata::lookupDouble ( const std::string &  name) const
inlinevirtual

Implements warehouse_ros::Metadata.

Definition at line 276 of file metadata.h.

◆ lookupField()

bool warehouse_ros_mongo::MongoMetadata::lookupField ( const std::string &  name) const
inlinevirtual

Implements warehouse_ros::Metadata.

Definition at line 293 of file metadata.h.

◆ lookupFieldNames()

std::set<std::string> warehouse_ros_mongo::MongoMetadata::lookupFieldNames ( ) const
inlinevirtual

Implements warehouse_ros::Metadata.

Definition at line 298 of file metadata.h.

◆ lookupInt()

int warehouse_ros_mongo::MongoMetadata::lookupInt ( const std::string &  name) const
inlinevirtual

Implements warehouse_ros::Metadata.

Definition at line 283 of file metadata.h.

◆ lookupString()

std::string warehouse_ros_mongo::MongoMetadata::lookupString ( const std::string &  name) const
inlinevirtual

Implements warehouse_ros::Metadata.

Definition at line 271 of file metadata.h.


The documentation for this class was generated from the following file:


warehouse_ros_mongo
Author(s): Bhaskara Marthi , Connor Brew
autogenerated on Sat Apr 2 2022 02:29:13