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

#include <CurrentGraph.h>

Public Member Functions

 CurrentGraph (const std::string_view &name)
 
bool operator== (const CurrentGraph &other) const
 
const auto & name () const
 
const auto & directImports () const
 
const auto & imports () const
 
 CurrentGraph (const std::string_view &name)
 
bool operator== (const CurrentGraph &other) const
 
const auto & name () const
 
const auto & directImports () const
 
const auto & imports () const
 

Protected Attributes

const std::string name_
 
std::set< CurrentGraph * > directImports_
 
std::set< CurrentGraph * > imports_
 

Friends

class ImportHierarchy
 

Detailed Description

A named graph currently defined in a knowledge graph.

Definition at line 17 of file CurrentGraph.h.

Constructor & Destructor Documentation

◆ CurrentGraph() [1/2]

knowrob::CurrentGraph::CurrentGraph ( const std::string_view &  name)
inlineexplicit

Definition at line 19 of file CurrentGraph.h.

20  : name_(name) {}
const auto & name() const
Definition: CurrentGraph.h:33
const std::string name_
Definition: CurrentGraph.h:46

◆ CurrentGraph() [2/2]

knowrob::CurrentGraph::CurrentGraph ( const std::string_view &  name)
inlineexplicit

Definition at line 19 of file CurrentGraph.h.

20  : name_(name) {}

Member Function Documentation

◆ directImports() [1/2]

const auto& knowrob::CurrentGraph::directImports ( ) const
inline
Returns
list of direct imports of this graph.

Definition at line 38 of file CurrentGraph.h.

38 { return directImports_; }
std::set< CurrentGraph * > directImports_
Definition: CurrentGraph.h:47

◆ directImports() [2/2]

const auto& knowrob::CurrentGraph::directImports ( ) const
inline
Returns
list of direct imports of this graph.

Definition at line 38 of file CurrentGraph.h.

38 { return directImports_; }

◆ imports() [1/2]

const auto& knowrob::CurrentGraph::imports ( ) const
inline
Returns
transitive closure of imports relation starting from this graph.

Definition at line 43 of file CurrentGraph.h.

43 { return imports_; }
std::set< CurrentGraph * > imports_
Definition: CurrentGraph.h:48

◆ imports() [2/2]

const auto& knowrob::CurrentGraph::imports ( ) const
inline
Returns
transitive closure of imports relation starting from this graph.

Definition at line 43 of file CurrentGraph.h.

43 { return imports_; }

◆ name() [1/2]

const auto& knowrob::CurrentGraph::name ( ) const
inline
Returns
the name of the graph.

Definition at line 33 of file CurrentGraph.h.

33 { return name_; }

◆ name() [2/2]

const auto& knowrob::CurrentGraph::name ( ) const
inline
Returns
the name of the graph.

Definition at line 33 of file CurrentGraph.h.

33 { return name_; }

◆ operator==() [1/2]

bool knowrob::CurrentGraph::operator== ( const CurrentGraph other) const
inline
Parameters
otheranother graph
Returns
true if the graphs have the same name

Definition at line 26 of file CurrentGraph.h.

26  {
27  return name_ == other.name_;
28  }

◆ operator==() [2/2]

bool knowrob::CurrentGraph::operator== ( const CurrentGraph other) const
inline
Parameters
otheranother graph
Returns
true if the graphs have the same name

Definition at line 26 of file CurrentGraph.h.

26  {
27  return name_ == other.name_;
28  }

Friends And Related Function Documentation

◆ ImportHierarchy

Definition at line 50 of file CurrentGraph.h.

Member Data Documentation

◆ directImports_

std::set< CurrentGraph * > knowrob::CurrentGraph::directImports_
protected

Definition at line 47 of file CurrentGraph.h.

◆ imports_

std::set< CurrentGraph * > knowrob::CurrentGraph::imports_
protected

Definition at line 48 of file CurrentGraph.h.

◆ name_

const std::string knowrob::CurrentGraph::name_
protected

Definition at line 46 of file CurrentGraph.h.


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