owlcpp  v0.3.3~
C++ library for working with OWL ontologies
 All Classes Namespaces Files Functions Macros Pages
Public Types | Public Member Functions | List of all members
owlcpp::Map_doc_crtpb< Super > Class Template Reference

#include <map_doc_crtpb.hpp>

Inheritance diagram for owlcpp::Map_doc_crtpb< Super >:

Public Types

typedef map_doc_type::iri_range doc_iri_range
typedef map_doc_type::version_range doc_version_range

Public Member Functions

doc_type const & operator[] (const Doc_id did) const
doc_type const & at (const Doc_id did) const
doc_type const * find (const Doc_id did) const
std::pair< Doc_id, bool > insert_doc (const Node_id iri_id, std::string const &path="", const Node_id vers_id=terms::empty_::id())
 Add document info: location, ontologyIRI, and versionIRI.
std::pair< Doc_id, bool > insert_doc (std::string const &iri, std::string const &path="", std::string const &vers="")
doc_iri_range find_doc_iri (std::string const &iri) const
doc_version_range find_doc_version (std::string const &version) const

Detailed Description

template<class Super>
class owlcpp::Map_doc_crtpb< Super >

Enable interaction between a map of ontology documents and

a map of IRI nodes. Base for CRTP (Curiously Recurring Template Pattern).

Member Function Documentation

template<class Super>
std::pair<Doc_id,bool> owlcpp::Map_doc_crtpb< Super >::insert_doc ( const Node_id  iri_id,
std::string const &  path = "",
const Node_id  vers_id = terms::empty_::id() 

Add document info: location, ontologyIRI, and versionIRI.

pathdocument location
document ID and whether new document info was actually added
Errif an entry with the same non-empty path and different iri or version is already present.

Duplicate document info entries are not allowed.

If document info with same path, iri, and version already present, new info is not inserted and the ID of the existing document is returned.

Since documents with same ontologyIRI and versionIRI may be found at different paths, multiple entries with different path and same iri or version can be added.

Sometimes, document path is not known. Therefore multiple entries with empty path and different iri or version are allowed.

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