ObjectRelation.hpp
Go to the documentation of this file.
1 
18 #pragma once
19 
20 #include <boost/shared_ptr.hpp>
21 #include <map>
22 #include <functional>
26 #include "common_type/Track.hpp"
27 
28 namespace ISM
29 {
30 /*
31  *Class to store relations between two objects.
32  */
33 
35 {
36  public:
37  ObjectRelation (ISM::TrackPtr objectA, ISM::TrackPtr objectB, std::string patternName);
38  ObjectRelation (ISM::TrackPtr objectA, std::string patternName);
39  //ObjectRelation (const ISM::ObjectRelation& other);
40  //std::pair<std::string, std::string> getObjectIds();
41  std::string getObjectIdA() const;
42  std::string getObjectIdB() const;
43  //std::pair<std::string, std::string> getObjectTypes();
44  std::string getObjectTypeA() const;
45  std::string getObjectTypeB() const;
46  //std::pair<std::vector<ISM::VoteSpecifierPtr>, std::vector<ISM::VoteSpecifierPtr> > getVoteSpecifiers();
47  std::vector<ISM::VoteSpecifierPtr> getVotesFromAForReferencePoseB() const;
48  std::vector<ISM::VoteSpecifierPtr> getVotesFromBForReferencePoseA() const;
50  {
51  return trackA;
52  }
54  {
55  return trackB;
56  }
57  bool containsObject(const std::string& type, const std::string& id);
58  virtual void serialize(std::ostream& strm) const;
59 
60  private:
61  //The two objects whichs positions relative to each other, are stored
62  std::string objectIdA;
63  std::string objectIdB;
64  std::string objectTypeA;
65  std::string objectTypeB;
68  //The valid positions B might have if A is reference
69  std::vector<VoteSpecifierPtr> votesFromBForReferencePoseA;
70  //The valid positions A might have if B is reference
71  std::vector<VoteSpecifierPtr> votesFromAForReferencePoseB;
72 };
73 
74 typedef boost::shared_ptr<ISM::ObjectRelation> ObjectRelationPtr;
75 typedef std::map<unsigned int, ISM::ObjectRelationPtr, std::less<unsigned> >ObjectRelations;
76 std::ostream& operator<<(std::ostream &strm, const ISM::ObjectRelation &q);
77 std::ostream& operator<<(std::ostream &strm, const ISM::ObjectRelationPtr &q);
78 std::ostream& operator<<(std::ostream &strm, const ISM::ObjectRelations &q);
79 
80 }
std::vector< ISM::VoteSpecifierPtr > getVotesFromBForReferencePoseA() const
boost::shared_ptr< ISM::ObjectRelation > ObjectRelationPtr
std::vector< VoteSpecifierPtr > votesFromAForReferencePoseB
std::string patternName
std::string getObjectTypeA() const
virtual void serialize(std::ostream &strm) const
std::map< unsigned int, ISM::ObjectRelationPtr, std::less< unsigned > > ObjectRelations
std::ostream & operator<<(std::ostream &strm, const ISM::ObjectRelation &r)
std::string getObjectTypeB() const
std::vector< VoteSpecifierPtr > votesFromBForReferencePoseA
std::vector< ISM::VoteSpecifierPtr > getVotesFromAForReferencePoseB() const
bool containsObject(const std::string &type, const std::string &id)
std::string getObjectIdB() const
boost::shared_ptr< Track > TrackPtr
Definition: Track.hpp:55
ObjectRelation(ISM::TrackPtr objectA, ISM::TrackPtr objectB, std::string patternName)
this namespace contains all generally usable classes.
std::string getObjectIdA() const


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