Object.cpp
Go to the documentation of this file.
1 
18 #include "Object.hpp"
19 #include "JsonStream.hpp"
20 
21 namespace ISM{
22  std::ostream& operator<<(std::ostream &strm, const ISM::Object &o) {
23  return strm<<"object: [type: "<<o.type<<"; Id: "<<o.observedId<<"; weight: "<<o.weight<<"; confidence: "<<o.confidence<<"; "<<o.pose<<"]";
24  }
25 
26  std::ostream& operator<<(std::ostream &strm, const ISM::ObjectPtr &o) {
27  return strm<<(*o);
28  }
29 
30  void Object::serialize(std::ostream& strm) const {
31  strm<<"{"<<std::endl
32  <<"\"type\": \""<<this->type<<"\", "<<std::endl
33  <<"\"observedId\": \""<<this->observedId<<"\", "<<std::endl
34  <<"\"weight\": "<<this->weight<<","<<std::endl
35  <<"\"confidence\": "<<this->confidence<<","<<std::endl
36  <<"\"pose\": "<<json(this->pose)<<std::endl
37  <<"}"<<std::endl;
38  }
39 }
std::string observedId
Definition: Object.hpp:39
PosePtr pose
Definition: Object.hpp:37
void serialize(std::ostream &strm) const
Definition: Object.cpp:30
std::ostream & operator<<(std::ostream &strm, const ISM::ObjectRelation &r)
std::string type
Definition: Object.hpp:38
double confidence
Definition: Object.hpp:44
this namespace contains all generally usable classes.
boost::shared_ptr< Object > ObjectPtr
Definition: Object.hpp:82
double weight
Definition: Object.hpp:43


asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:40