5 #ifndef KNOWROB_SEMWEB_CLASS_H
6 #define KNOWROB_SEMWEB_CLASS_H
26 class Class :
public Resource,
public std::enable_shared_from_this<Class> {
42 void addDirectParent(
const std::shared_ptr<Class> &directParent, std::optional<std::string_view> graph);
48 void removeDirectParent(
const std::shared_ptr<Class> &directParent, std::optional<std::string_view> graph);
66 bool isSubClassOf(
const std::shared_ptr<Class> &parent,
bool includeSelf =
true);
88 bool operator()(
const std::shared_ptr<Class> &lhs,
const std::shared_ptr<Class> &rhs)
const;
91 std::map<std::shared_ptr<Class>,
92 std::set<AtomPtr, AtomComparator>,
97 using ClassPtr = std::shared_ptr<Class>;
std::set< std::shared_ptr< Class >, ClassComparator > directChildren_
Class(const IRIAtomPtr &iri)
bool isDirectSubClassOf(const std::shared_ptr< Class > &directParent)
const auto & directParents() const
void forallParents(const ClassVisitor &visitor, bool includeSelf=true, bool skipDuplicates=true)
bool isSubClassOf(const std::shared_ptr< Class > &parent, bool includeSelf=true)
Class(std::string_view iri)
void forallChildren(const ClassTupleVisitor &visitor, bool skipDuplicates=true)
void addDirectParent(const std::shared_ptr< Class > &directParent, std::optional< std::string_view > graph)
void removeDirectParent(const std::shared_ptr< Class > &directParent, std::optional< std::string_view > graph)
std::map< std::shared_ptr< Class >, std::set< AtomPtr, AtomComparator >, ClassComparator > directParents_
FunctionRule & function()
std::shared_ptr< Class > ClassPtr
std::function< void(Class &)> ClassVisitor
std::function< void(Class &, Class &)> ClassTupleVisitor
std::shared_ptr< IRIAtom > IRIAtomPtr
bool operator()(const std::shared_ptr< Class > &lhs, const std::shared_ptr< Class > &rhs) const