knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
knowrob::VersionedOrigin Class Reference

#include <VersionedOrigin.h>

Public Member Functions

 VersionedOrigin (std::string_view origin, std::string_view version)
 
bool operator< (const VersionedOrigin &other) const
 
const auto & value () const
 
const auto & version () const
 
 VersionedOrigin (std::string_view origin, std::string_view version)
 
bool operator< (const VersionedOrigin &other) const
 
const auto & value () const
 
const auto & version () const
 

Protected Attributes

std::string origin_
 
std::string version_
 

Detailed Description

A versioned origin is a pair of an origin and a version.

Definition at line 13 of file VersionedOrigin.h.

Constructor & Destructor Documentation

◆ VersionedOrigin() [1/2]

knowrob::VersionedOrigin::VersionedOrigin ( std::string_view  origin,
std::string_view  version 
)
inline

Definition at line 15 of file VersionedOrigin.h.

16  : origin_(origin), version_(version) {}
const auto & version() const

◆ VersionedOrigin() [2/2]

knowrob::VersionedOrigin::VersionedOrigin ( std::string_view  origin,
std::string_view  version 
)
inline

Definition at line 15 of file VersionedOrigin.h.

16  : origin_(origin), version_(version) {}

Member Function Documentation

◆ operator<() [1/2]

bool knowrob::VersionedOrigin::operator< ( const VersionedOrigin other) const
inline

Compare two versioned origins.

Parameters
otheranother versioned origin.
Returns
true if this versioned origin is less than the other.

Definition at line 23 of file VersionedOrigin.h.

23  {
24  return origin_ < other.origin_ || (origin_ == other.origin_ && version_ < other.version_);
25  }

◆ operator<() [2/2]

bool knowrob::VersionedOrigin::operator< ( const VersionedOrigin other) const
inline

Compare two versioned origins.

Parameters
otheranother versioned origin.
Returns
true if this versioned origin is less than the other.

Definition at line 23 of file VersionedOrigin.h.

23  {
24  return origin_ < other.origin_ || (origin_ == other.origin_ && version_ < other.version_);
25  }

◆ value() [1/2]

const auto& knowrob::VersionedOrigin::value ( ) const
inline
Returns
the origin of this versioned origin.

Definition at line 30 of file VersionedOrigin.h.

30 { return origin_; }

◆ value() [2/2]

const auto& knowrob::VersionedOrigin::value ( ) const
inline
Returns
the origin of this versioned origin.

Definition at line 30 of file VersionedOrigin.h.

30 { return origin_; }

◆ version() [1/2]

const auto& knowrob::VersionedOrigin::version ( ) const
inline
Returns
the version of this versioned origin.

Definition at line 35 of file VersionedOrigin.h.

35 { return version_; }

◆ version() [2/2]

const auto& knowrob::VersionedOrigin::version ( ) const
inline
Returns
the version of this versioned origin.

Definition at line 35 of file VersionedOrigin.h.

35 { return version_; }

Member Data Documentation

◆ origin_

std::string knowrob::VersionedOrigin::origin_
protected

Definition at line 38 of file VersionedOrigin.h.

◆ version_

std::string knowrob::VersionedOrigin::version_
protected

Definition at line 39 of file VersionedOrigin.h.


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