knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
VersionedOrigin.h
Go to the documentation of this file.
1 /*
2  * This file is part of KnowRob, please consult
3  * https://github.com/knowrob/knowrob for license details.
4  */
5 
6 #ifndef KNOWROB_VERSIONED_ORIGIN_H
7 #define KNOWROB_VERSIONED_ORIGIN_H
8 
9 namespace knowrob {
13  class VersionedOrigin {
14  public:
15  VersionedOrigin(std::string_view origin, std::string_view version)
16  : origin_(origin), version_(version) {}
17 
23  bool operator<(const VersionedOrigin &other) const {
24  return origin_ < other.origin_ || (origin_ == other.origin_ && version_ < other.version_);
25  }
26 
30  const auto &value() const { return origin_; }
31 
35  const auto &version() const { return version_; }
36 
37  protected:
40  };
41 
42  using VersionedOriginPtr = std::shared_ptr<VersionedOrigin>;
43 }
44 
45 #endif //KNOWROB_VERSIONED_ORIGIN_H
const auto & value() const
const auto & version() const
bool operator<(const VersionedOrigin &other) const
VersionedOrigin(std::string_view origin, std::string_view version)
TermRule & string()
Definition: terms.cpp:63
std::shared_ptr< VersionedOrigin > VersionedOriginPtr