CuteHMI - CuteHMI (CuteHMI.2)
cutehmi Namespace Reference

Namespaces

 internal
 

Classes

struct  Error
 Standarized error. More...
 
class  ErrorException
 Error exception. More...
 
struct  ErrorInfo
 Error info. More...
 
class  Exception
 Exception. More...
 
class  ExceptionMixin
 Exception mixin. More...
 
class  Init
 Init. More...
 
class  Initializer
 Initializer template. More...
 
struct  InplaceError
 In-place error. More...
 
class  Message
 Message. More...
 
class  Messenger
 Messenger. More...
 
class  MPtr
 Members pointer. More...
 
class  NonCopyable
 Non-copyable object. More...
 
class  NonMovable
 Non-movable object. More...
 
class  Notification
 Notification. More...
 
class  NotificationListModel
 Notification list model. More...
 
class  Notifier
 Notifier. More...
 
class  Singleton
 Singleton template. More...
 
class  Worker
 Worker. More...
 

Functions

template<typename ERR >
ErrorInfo errorInfo (ERR err)
 Get error info. More...
 
bool ape (qreal r1, qreal r2, qreal eps=EPS)
 Approximately equal. More...
 
bool ale (qreal r1, qreal r2, qreal eps=EPS)
 Almost equal. More...
 
bool clt (qreal r1, qreal r2, qreal eps=EPS)
 Considerably less than. More...
 
bool cgt (qreal r1, qreal r2, qreal eps=EPS)
 Considerably greater than. More...
 
const QLoggingCategoryloggingCategory ()
 Logging category of the extension. More...
 
CUTEHMI_API void destroySingletonInstances ()
 Destroy singleton instances. More...
 
template<class INPUT_IT , class SIZE , class OUTPUT_IT >
OUTPUT_IT copy_n (INPUT_IT first, SIZE count, OUTPUT_IT result)
 
template<class INPUT_IT1 , class INPUT_IT2 >
bool equal (INPUT_IT1 first1, INPUT_IT1 last1, INPUT_IT2 first2)
 

Variables

constexpr qreal EPS = std::numeric_limits<qreal>::epsilon() * 0.5 * 0x10000
 CuteHMI epsilon. More...
 

Function Documentation

◆ ale()

bool cutehmi::ale ( qreal  r1,
qreal  r2,
qreal  eps = EPS 
)
inline

Almost equal.

Compares real numbers r1, r2. Function similar to ape(), however ale() is slightly stronger than ape() (r1 and r2 must be slightly closer to each other to manifest equality). This function can be problematic, when one of the values is exactly zero, because in such case it returns true only if second argument is also exactly zero.

Parameters
r1first number to compare.
r2second number to compare.
epsepsilon tolerance parameter used in comparison.
Returns
true when r1 and r2 are almost equal, false otherwise.
See also
ape().

◆ ape()

bool cutehmi::ape ( qreal  r1,
qreal  r2,
qreal  eps = EPS 
)
inline

Approximately equal.

Compares real numbers r1, r2.

Parameters
r1first number to compare.
r2second number to compare.
epsepsilon tolerance parameter used in comparison.
Returns
true when r1 and r2 are approximately equal, false otherwise.
See also
ale().

◆ cgt()

bool cutehmi::cgt ( qreal  r1,
qreal  r2,
qreal  eps = EPS 
)
inline

Considerably greater than.

Parameters
r1first number to compare.
r2second number to compare.
epsepsilon tolerance parameter used in comparison.
Returns
true when r1 is considerably greater than r2, false otherwise.

◆ clt()

bool cutehmi::clt ( qreal  r1,
qreal  r2,
qreal  eps = EPS 
)
inline

Considerably less than.

Parameters
r1first number to compare.
r2second number to compare.
epsepsilon tolerance parameter used in comparison.
Returns
true when r1 is considerably less than r2, false otherwise.

◆ copy_n()

template<class INPUT_IT , class SIZE , class OUTPUT_IT >
OUTPUT_IT cutehmi::copy_n ( INPUT_IT  first,
SIZE  count,
OUTPUT_IT  result 
)

◆ destroySingletonInstances()

void cutehmi::destroySingletonInstances ( )

Destroy singleton instances.

This function is provided to satisfy the requirement that QApplication has to be first created and last destroyed QObject. It destroys all singletons that inherit after Singleton class template. Once this function is called singletons become unusable.

Note
Only frontend applications, which instantiate QApplication should take care about this function.
Principle:
cutehmi::destroySingletonInstances-determined_destruction_order
Singleton instances will be destroyed in reverse order as they were instantiated, that is singletons for which Singleton::Instance() function has been called first will be destroyed last.

◆ equal()

template<class INPUT_IT1 , class INPUT_IT2 >
bool cutehmi::equal ( INPUT_IT1  first1,
INPUT_IT1  last1,
INPUT_IT2  first2 
)

◆ errorInfo()

template<typename ERR >
ErrorInfo cutehmi::errorInfo ( ERR  err)

Get error info.

Produces ErrorInfo from instance of Error or its subclass.

Parameters
errinstance of Error class or its subclass.
Returns
error info structure.

◆ loggingCategory()

const QLoggingCategory& cutehmi::loggingCategory ( )
inline

Logging category of the extension.

Returns
logging category.

Variable Documentation

◆ EPS

constexpr qreal cutehmi::EPS = std::numeric_limits<qreal>::epsilon() * 0.5 * 0x10000
constexpr

CuteHMI epsilon.

This constant is used in fuzzy comparison functions.