6 #ifndef TERM_METHODS_HPP_
7 #define TERM_METHODS_HPP_
11 namespace owlcpp{
namespace terms{
16 typedef typename T::ns_type ns_t;
17 return ns_t::iri() +
"#" + T::fragment();
23 typedef typename T::ns_type ns_t;
24 return ns_t::prefix() +
":" + T::fragment();
29 template<
class T>
inline bool
30 comparison(
char const* str,
const std::size_t len, T
const&) {
31 typedef typename T::ns_type ns_t;
32 if( len != ns_t::iri().size() + T::fragment().size() + 1 )
return false;
42 if( str[ns_t::iri().size()] !=
'#' )
return false;
43 return T::fragment().compare(
47 ns_t::iri().size() + 1,
52 template<
class T>
inline bool comparison(std::string
const& str, T
const&) {
53 typedef typename T::ns_type ns_t;
54 if( str.size() != ns_t::iri().size() + T::fragment().size() + 1 )
return false;
64 if( str[ns_t::iri().size()] !=
'#' )
return false;
65 return T::fragment().compare(
69 ns_t::iri().size() + 1,
74 template<
class T>
inline bool comparison(
char const* str, T
const&) {