knowL: Knowledge Libraries
Loading...
Searching...
No Matches
knowCore::Range< _T_ > Class Template Reference

#include <Range.h>

Public Member Functions

 Range (RangeBoundType _lower_type, const _T_ &_lower, const _T_ &_upper, RangeBoundType _upper_type)
 
bool operator== (const Range &_rhs) const
 
_T_ lower () const
 
RangeBoundType lowerBoundType () const
 
_T_ upper () const
 
RangeBoundType upperBoundType () const
 
details::RangeComparator< _T_ >::ReturnType contains (const _T_ &_v) const
 
details::RangeComparator< _T_ >::ReturnType contains (const _T_ &_v) const
 
cres_qresult< QByteArray > md5 () const
 
cres_qresult< QJsonValue > toJsonValue (const SerialisationContexts &_contexts=defaultSerialisationContext()) const
 
cres_qresult< QCborValue > toCborValue (const SerialisationContexts &_contexts=defaultSerialisationContext()) const
 
cres_qresult< QString > toRdfLiteral (const SerialisationContexts &_contexts=defaultSerialisationContext()) const
 
cres_qresult< QString > printable () const
 

Static Public Member Functions

static cres_qresult< RangefromJsonValue (const QJsonValue &_value, const DeserialisationContexts &_context=defaultDeserialisationContext())
 
static cres_qresult< RangefromCborValue (const QCborValue &_value, const DeserialisationContexts &_context=defaultDeserialisationContext())
 
static cres_qresult< RangefromRdfLiteral (const QString &_value, const DeserialisationContexts &_context=defaultDeserialisationContext())
 

Detailed Description

template<typename _T_>
class knowCore::Range< _T_ >

Allow to define a range

Member Function Documentation

◆ contains() [1/2]

template<typename _T_ >
requires (std::is_same_v<typename details::RangeComparator<_T_>::ReturnType, bool>)
details::RangeComparator< _T_ >::ReturnType knowCore::Range< _T_ >::contains ( const _T_ & _v) const
Returns
true if the value _v is contained in the bound.

◆ contains() [2/2]

template<typename _T_ >
details::RangeComparator< _T_ >::ReturnType knowCore::Range< _T_ >::contains ( const _T_ & _v) const
Returns
true if the value _v is contained in the bound.

◆ fromCborValue()

template<typename _T_ >
cres_qresult< Range< _T_ > > knowCore::Range< _T_ >::fromCborValue ( const QCborValue & _value,
const DeserialisationContexts & _context = defaultDeserialisationContext() )
inlinestatic

Convert from cbor

◆ fromJsonValue()

template<typename _T_ >
cres_qresult< Range< _T_ > > knowCore::Range< _T_ >::fromJsonValue ( const QJsonValue & _value,
const DeserialisationContexts & _context = defaultDeserialisationContext() )
inlinestatic

Convert from json

◆ fromRdfLiteral()

template<typename _T_ >
cres_qresult< Range< _T_ > > knowCore::Range< _T_ >::fromRdfLiteral ( const QString & _value,
const DeserialisationContexts & _context = defaultDeserialisationContext() )
inlinestatic

Convert from a rdf literal (something like "12.0 m/s")

◆ md5()

template<typename _T_ >
cres_qresult< QByteArray > knowCore::Range< _T_ >::md5 ( ) const
inline
Returns
a md5 hash of the value

◆ printable()

template<typename _T_ >
cres_qresult< QString > knowCore::Range< _T_ >::printable ( ) const
inline

Return a printable value

◆ toCborValue()

template<typename _T_ >
cres_qresult< QCborValue > knowCore::Range< _T_ >::toCborValue ( const SerialisationContexts & _contexts = defaultSerialisationContext()) const
inline

Convert to cbor

◆ toJsonValue()

template<typename _T_ >
cres_qresult< QJsonValue > knowCore::Range< _T_ >::toJsonValue ( const SerialisationContexts & _contexts = defaultSerialisationContext()) const
inline

Convert to json

◆ toRdfLiteral()

template<typename _T_ >
cres_qresult< QString > knowCore::Range< _T_ >::toRdfLiteral ( const SerialisationContexts & _contexts = defaultSerialisationContext()) const
inline

Convert to a rdf literal (something like "12.0 m/s")


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