Torc  0.1
Functions
TorcCoreUtils Namespace Reference

Functions

QDateTime DateTimeFromString (const QString &String)
 Parse a QDateTime from the given QString. More...
 
quint64 GetMicrosecondCount (void)
 Get the current system clock time in microseconds. More...
 
void QtMessage (QtMsgType Type, const QMessageLogContext &Context, const QString &Message)
 A handler routine for Qt messages. More...
 
bool HasZlib (void)
 Return true if zlib support is available. More...
 
QByteArray GZipCompress (QByteArray &Source)
 Compress the supplied data using GZip. More...
 
QByteArray GZipCompressFile (QFile &Source)
 Compress the given file using GZip. More...
 
template<typename T >
QString EnumToLowerString (T Value)
 
template<typename T >
QString EnumToString (T Value)
 
template<typename T >
int StringToEnum (const QString &Value, bool CaseSensitive=false)
 
template<typename T >
QStringList EnumList ()
 

Function Documentation

QDateTime TorcCoreUtils::DateTimeFromString ( const QString &  String)

Parse a QDateTime from the given QString.

Definition at line 42 of file torccoreutils.cpp.

template<typename T >
QStringList TorcCoreUtils::EnumList ( )

Definition at line 40 of file torccoreutils.h.

template<typename T >
QString TorcCoreUtils::EnumToLowerString ( Value)

Definition at line 18 of file torccoreutils.h.

template<typename T >
QString TorcCoreUtils::EnumToString ( Value)

Definition at line 23 of file torccoreutils.h.

quint64 TorcCoreUtils::GetMicrosecondCount ( void  )

Get the current system clock time in microseconds.

If microsecond clock accuracy is not available, it is inferred from the best resolution available.

Definition at line 61 of file torccoreutils.cpp.

QByteArray TorcCoreUtils::GZipCompress ( QByteArray &  Source)

Compress the supplied data using GZip.

The returned data is suitable for sending as part of an HTTP response when the requestor accepts gzip compression.

Definition at line 130 of file torccoreutils.cpp.

QByteArray TorcCoreUtils::GZipCompressFile ( QFile &  Source)

Compress the given file using GZip.

The returned data is suitable for sending as part of an HTTP response when the requestor accepts gzip compression.

Definition at line 186 of file torccoreutils.cpp.

bool TorcCoreUtils::HasZlib ( void  )

Return true if zlib support is available.

Definition at line 116 of file torccoreutils.cpp.

void TorcCoreUtils::QtMessage ( QtMsgType  Type,
const QMessageLogContext &  Context,
const QString &  Message 
)

A handler routine for Qt messages.

This ensures Qt warnings are included in non-console logs.

Definition at line 87 of file torccoreutils.cpp.

template<typename T >
int TorcCoreUtils::StringToEnum ( const QString &  Value,
bool  CaseSensitive = false 
)

Definition at line 28 of file torccoreutils.h.