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

#include <RedlandURI.h>

Public Member Functions

 RedlandURI ()
 
 ~RedlandURI ()
 
 RedlandURI (const RedlandURI &)=delete
 
auto operator() () const
 
void set (librdf_world *world, std::string_view uri)
 
 RedlandURI ()
 
 ~RedlandURI ()
 
 RedlandURI (const RedlandURI &)=delete
 
auto operator() () const
 
void set (librdf_world *world, std::string_view uri)
 

Protected Attributes

librdf_uri * uri_
 

Detailed Description

A wrapper for librdf_uri. Note that the URI is a null pointer after construction and must be set with set().

Definition at line 17 of file RedlandURI.h.

Constructor & Destructor Documentation

◆ RedlandURI() [1/4]

knowrob::RedlandURI::RedlandURI ( )
inline

Definition at line 19 of file RedlandURI.h.

19 : uri_(nullptr) {}
librdf_uri * uri_
Definition: RedlandURI.h:41

◆ ~RedlandURI() [1/2]

knowrob::RedlandURI::~RedlandURI ( )
inline

Definition at line 21 of file RedlandURI.h.

21 { if (uri_) librdf_free_uri(uri_); }

◆ RedlandURI() [2/4]

knowrob::RedlandURI::RedlandURI ( const RedlandURI )
delete

◆ RedlandURI() [3/4]

knowrob::RedlandURI::RedlandURI ( )
inline

Definition at line 19 of file RedlandURI.h.

19 : uri_(nullptr) {}

◆ ~RedlandURI() [2/2]

knowrob::RedlandURI::~RedlandURI ( )
inline

Definition at line 21 of file RedlandURI.h.

21 { if (uri_) librdf_free_uri(uri_); }

◆ RedlandURI() [4/4]

knowrob::RedlandURI::RedlandURI ( const RedlandURI )
delete

Member Function Documentation

◆ operator()() [1/2]

auto knowrob::RedlandURI::operator() ( ) const
inline
Returns
the librdf uri

Definition at line 28 of file RedlandURI.h.

28 { return uri_; }

◆ operator()() [2/2]

auto knowrob::RedlandURI::operator() ( ) const
inline
Returns
the librdf uri

Definition at line 28 of file RedlandURI.h.

28 { return uri_; }

◆ set() [1/2]

void knowrob::RedlandURI::set ( librdf_world *  world,
std::string_view  uri 
)
inline
Parameters
worlda librdf world
uria URI string

Definition at line 34 of file RedlandURI.h.

34  {
35  if (uri_) librdf_free_uri(uri_);
36  if (world) uri_ = librdf_new_uri(world, (const unsigned char *) uri.data());
37  else uri_ = nullptr;
38  }

◆ set() [2/2]

void knowrob::RedlandURI::set ( librdf_world *  world,
std::string_view  uri 
)
inline
Parameters
worlda librdf world
uria URI string

Definition at line 34 of file RedlandURI.h.

34  {
35  if (uri_) librdf_free_uri(uri_);
36  if (world) uri_ = librdf_new_uri(world, (const unsigned char *) uri.data());
37  else uri_ = nullptr;
38  }

Member Data Documentation

◆ uri_

librdf_uri * knowrob::RedlandURI::uri_
protected

Definition at line 41 of file RedlandURI.h.


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