All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Radiant Namespace Reference

Radiant library is a collection of C++ utility classes. More...

Namespaces

namespace  PlatformUtils
 Small utility functions to help handle platform-specific functions.
 
namespace  StringUtils
 StringUtils is a collection of string manipulation functions.
 

Classes

class  ArrayMap
 Non-ordered map implementation that uses simple std::vector to store the elements. More...
 
class  ArraySet
 Set implementation that uses simple std::vector to store the elements. More...
 
class  BGThread
 A class used to execute tasks in a separated threads. More...
 
class  BinaryData
 OSC-like binary data storage. More...
 
class  BinaryStream
 Abstract base class for binary streams. More...
 
class  BlockRingBuffer
 Lock-free and thread-safe ring buffer with one producer and one consumer. More...
 
class  CallStack
 Captures the current callstack. More...
 
class  CameraDriver
 Each camera driver should implement this interface in addition to VideoCamera interface. More...
 
class  CameraDriverFactory
 CameraDriverFactory provides high-level access to different drivers. More...
 
class  ChunkT
 A template chunk class. More...
 
class  Color
 Utility class for color management & conversion. More...
 
class  ColorUtils
 ColorUtils contains color conversion utilities. More...
 
class  CommandLineArguments
 Helper class for building argc and argv dynamically. More...
 
class  Condition
 Condition for threads. More...
 
class  CSVDocument
 A simple class for loading CSV documents. More...
 
class  CycleRecord
 CPU cycle record for performance analysis. More...
 
class  DateTime
 Combination of date and time information. More...
 
class  Directory
 Class for reading filenames in a directory. More...
 
class  DropEvent
 This class abstracts drag and drop events. More...
 
class  DropListener
 Interface for DropEvent listeners If a Widget - or any other object - needs to receive operating system drag-and-drop events, it needs to be inherited from the DropEvent class. More...
 
class  FileUtils
 FileUtils contains functions for platform independent file-handing. More...
 
class  FlagsT
 This class implements type-safe flags. More...
 
class  FunctionTask
 This class executes the given function within BGThread. More...
 
class  FutureBool
 This class provides implicit conversion to boolean type. More...
 
class  FutureBoolI
 Interface class for FutureBool backends. More...
 
class  GridMemT
 Grid (aka 2D array) base class with memory management. More...
 
class  GridNoMemT
 Grid base class without memory management This class will simply share the memory pointers with other objects. More...
 
class  GridT
 Access to the grid elements. More...
 
class  Guard
 A guard class. More...
 
class  GuardArray
 A guard class that can handle locking and unlocking of multiple mutexes. More...
 
class  ImageConversion
 VideoImage conversion utilities. More...
 
class  IntrusivePtr
 This class implements an intrusive pointer. More...
 
class  IntrusiveWeakPtr
 This class implements weak pointers for the IntrusivePtr class. More...
 
class  KeyEvent
 This class describes a key event. More...
 
class  LockFile
 Platform independent lockfile. More...
 
class  Log
 Provides logging sevices for the application. More...
 
class  MimeManager
 This class keeps track of matching file extensions to mime types. More...
 
class  MimeType
 See RFC 2046. More...
 
class  MouseEvent
 This class describes a mouse event. More...
 
class  MovingAverage
 This class provides an implementation for calculating a moving average with a fixed window. More...
 
class  Mutex
 Mutual exclusion (or mutex for short) is used to avoid simultaneous use of a shared resource. More...
 
class  RefObj
 Smart object reference. More...
 
class  ReleaseGuard
 A guard class that only releases a locked mutex. More...
 
class  ResourceLocator
 This class provides resource location utilities. More...
 
class  RingBuffer
 Simple ring-buffer template. More...
 
class  RingBufferDelay
 Ring buffer for delays. More...
 
class  Semaphore
 Provides a general counting semaphore. More...
 
class  SerialPort
 A serial port handler. More...
 
class  SingleShotTask
 Same as FunctionTask, but executes the function only once. More...
 
class  Sleep
 Sleeping services. More...
 
class  SleepSync
 Synchronized sleeping. More...
 
class  SynchronizedQueue
 This class provides a thread-safe queue. More...
 
class  TabletEvent
 This class describes a (Wacom) tablet event. More...
 
class  Task
 Task is an interface for tasks that can be executed within BGThread. More...
 
class  TCPServerSocket
 A server TCP socket for accepting incoming connections. More...
 
class  TCPSocket
 A client TCP socket for connecting to remote hosts. More...
 
class  Thread
 Platform-independent threading. More...
 
class  ThreadPool
 Thread pool class that is similar to Thread class, but the childLoop is executed concurrently with many threads. More...
 
class  Timer
 A timer. More...
 
class  TimeStamp
 A high-resolution time-stamp object. More...
 
class  TLS
 Thread Local Storage implementation. More...
 
class  TouchEvent
 Window system touch event. More...
 
class  Trace
 This class provides an output stream for debugging information. More...
 
class  UDPSocket
 UPD socket implementation. More...
 
class  Variant
 A single variant. More...
 
class  VectorStorage
 A container for fast array allocation/deallocation. More...
 
class  VideoCamera
 VideoCamera provides a common interface for different video cameras. More...
 
class  VideoImage
 An image class to be used with video IO. More...
 
class  VideoInput
 Base class for video input classes. More...
 
exception  WatchDog
 A guard that is used to make sure that programs do not get stuck. More...
 

Typedefs

typedef ChunkT< VariantChunk
 A chunk of configuration variables.
 
typedef ChunkT< ChunkConfig
 A chunk of chunks.
 
typedef std::unique_ptr
< FutureBoolI
FutureBoolIPtr
 
typedef GridT< uint16_t,
GridMemT< uint16_t > > 
MemGrid16u
 A grid of 16-bit values with memory management.
 
typedef GridT< float, GridMemT
< float > > 
MemGrid32f
 A grid of floats with memory management.
 
typedef GridT< uint32_t,
GridMemT< uint32_t > > 
MemGrid32u
 A grid of 32-bit values with memory management.
 
typedef GridT< double,
GridMemT< double > > 
MemGrid64f
 A grid of doubles with memory management.
 
typedef GridT< uint8_t,
GridMemT< uint8_t > > 
MemGrid8u
 A grid of bytes with memory management.
 
typedef GridT< Nimble::Vector2,
GridMemT< Nimble::Vector2 > > 
MemGridVector2
 A grid of Vector2s with memory management.
 
typedef GridT< Nimble::Vector3,
GridMemT< Nimble::Vector3 > > 
MemGridVector3
 A grid of Vector3s with memory management.
 
typedef GridT< Nimble::Vector4,
GridMemT< Nimble::Vector4 > > 
MemGridVector4
 A grid of Vector4s with memory management.
 
typedef float Priority
 Priority for the tasks.
 
typedef GridT< uint16_t,
GridNoMemT< uint16_t > > 
PtrGrid16u
 A grid of 16-bit values without memory management.
 
typedef GridT< float,
GridNoMemT< float > > 
PtrGrid32f
 A grid of floats without memory management.
 
typedef GridT< uint32_t,
GridNoMemT< uint32_t > > 
PtrGrid32u
 A grid of 32-bit values without memory management.
 
typedef GridT< double,
GridNoMemT< double > > 
PtrGrid64f
 A grid of doubles without memory management.
 
typedef GridT< uint8_t,
GridNoMemT< uint8_t > > 
PtrGrid8u
 A grid of bytes without memory management.
 
typedef GridT< Nimble::Vector2,
GridNoMemT< Nimble::Vector2 > > 
PtrGridVector2
 A grid of Vector2s without memory management.
 
typedef GridT< Nimble::Vector3,
GridNoMemT< Nimble::Vector3 > > 
PtrGridVector3
 A grid of Vector3s without memory management.
 
typedef GridT< Nimble::Vector4,
GridNoMemT< Nimble::Vector4 > > 
PtrGridVector4
 A grid of Vector4s without memory management.
 
typedef std::shared_ptr< TaskTaskPtr
 Shared pointer to a Task.
 

Enumerations

enum  AudioSampleFormat {
  ASF_INT16, ASF_INT24, ASF_INT32, ASF_FLOAT32,
  ASF_FLOAT64
}
 Audio sample types. More...
 
enum  FrameRate {
  FPS_IGNORE, FPS_5, FPS_10, FPS_15,
  FPS_30, FPS_60, FPS_120, FPS_COUNT
}
 Different video frame-rates.
 
enum  ImageFormat {
  IMAGE_UNKNOWN, IMAGE_GRAYSCALE, IMAGE_YUV_411 = 10, IMAGE_YUV_411P,
  IMAGE_YUV_420, IMAGE_YUV_420P, IMAGE_YUV_422, IMAGE_YUV_422P,
  IMAGE_RGB_24 = 128, IMAGE_RGBA_32, IMAGE_RGB = IMAGE_RGB_24, IMAGE_RGBA = IMAGE_RGBA_32,
  IMAGE_BGR, IMAGE_BGRA, IMAGE_RAWBAYER = 256
}
 Enumeration of different video image formats. More...
 
enum  IoMode { IO_NONE = 0x0, IO_INPUT = 0x1, IO_OUTPUT = 0x2, IO_INPUT_OUTPUT = 0x3 }
 Input/output modes. More...
 
enum  PlaneType {
  PLANE_UNKNOWN, PLANE_GRAYSCALE, PLANE_Y = 10, PLANE_U,
  PLANE_V, PLANE_YUV, PLANE_RED = 128, PLANE_GREEN,
  PLANE_BLUE, PLANE_RGB, PLANE_BGR, PLANE_RGBA,
  PLANE_BGRA, PLANE_RAWBAYER = 256
}
 Enumeration of different video image plane types. More...
 
enum  Severity {
  DEBUG, INFO, WARNING, FAILURE,
  FATAL
}
 Error severity levels. More...
 
enum  VideoInputFlags {
  DONT_CARE = -1, WITH_VIDEO = (1 << 0), WITH_AUDIO = (1 << 1), DO_LOOP = (1 << 2),
  MONOPHONIZE_AUDIO = (1 << 3), PREVIEW_ON_PAUSE = (1 << 4), PREVIEW_ON_START = (1 << 5)
}
 Flags for video input stream. More...
 

Functions

template<typename T >
T * addressOf (T &rhs)
 Returns a memory aligned block of memory. More...
 
float asFloat (FrameRate fr)
 Convert enumerated frame rate into floating point. More...
 
FrameRate closestFrameRate (float fps)
 Return the closest enumerated frame rate given a floating point value. More...
 
template<typename T >
int compare (const T &a, const T &b)
 
template<>
int compare< QByteArray > (const QByteArray &a, const QByteArray &b)
 
template<typename Y >
std::enable_if
< std::is_arithmetic< Y >
::value, Y >::type 
createNull ()
 Creates a null object for aritchmetic types. More...
 
template<typename Y >
std::enable_if
<!std::is_arithmetic< Y >
::value, Y >::type 
createNull ()
 Create a null object for non-arithmetic types. More...
 
void debug (const char *msg,...)
 Display debug output. More...
 
Trace debug ()
 Obtain debug stream instance. More...
 
bool enabledDuplicateFilter ()
 Returns true if the duplicate filter is enabled. More...
 
bool enabledThreadId ()
 Returns true if the thread id printing is enabled. More...
 
void enableDuplicateFilter (bool enable)
 Toggle duplicate filter If enabled, duplicate messages will be ignored. More...
 
bool enabledVerboseOutput ()
 Returns true if the debug function output is displayed.
 
void enableThreadId (bool enable)
 Toggle thread id printing If enabled, each log line will include a unique thread id. More...
 
void enableVerboseOutput (bool enable, const QString &module=QString())
 Toggle verbose output. More...
 
void error (const char *msg,...)
 Display error output. More...
 
Trace error ()
 Obtain error stream instance. More...
 
void fatal (const char *msg,...)
 Display error output, with a fatal message. More...
 
void forceColors (bool enable=true)
 Forces ANSI colors to the output even if the output isn't ANSI-capable terminal. More...
 
void info (const char *msg,...)
 Display information output. More...
 
Trace info ()
 Obtain info stream instance. More...
 
bool isVerbose (const char *module)
 
template<typename T , typename Y >
bool operator!= (const Y *lhs, const IntrusivePtr< T > &rhs)
 Check if a raw pointer and an intrusive pointer are inequal. More...
 
template<typename T >
bool operator!= (nullptr_t, const IntrusivePtr< T > &rhs)
 Check if nullptr is inequal to intrusive pointer. More...
 
template<typename T , typename Y >
bool operator!= (const IntrusiveWeakPtr< T > &lhs, const IntrusivePtr< Y > &rhs)
 Check if two different type intrusive pointers are inequal. More...
 
template<typename T , typename Y >
bool operator< (const T *lhs, const IntrusivePtr< Y > &rhs)
 Compare operator for a raw pointer and an instrusive pointer. More...
 
std::ostream & operator<< (std::ostream &os, const TimeStamp &ts)
 Output a timestamp to a stream. More...
 
std::ostream & operator<< (std::ostream &os, const Variant &v)
 Output operator for Radiant::Variant. More...
 
template<typename T , typename Y >
bool operator== (const Y *lhs, const IntrusivePtr< T > &rhs)
 Check if a raw pointer and an intrusive pointer are equal. More...
 
template<typename T >
bool operator== (nullptr_t, const IntrusivePtr< T > &rhs)
 Check if nullptr is equal to intrusive pointer. More...
 
template<typename T , typename Y >
bool operator== (const IntrusiveWeakPtr< T > &lhs, const IntrusivePtr< Y > &rhs)
 Check if two different type intrusive pointers are equal. More...
 
std::istream & operator>> (std::istream &is, TimeStamp &ts)
 Read a timestamp from a stream. More...
 
template<typename T >
uint qHash (const IntrusivePtr< T > &k)
 
template<typename T >
uint qHash (const IntrusiveWeakPtr< T > &k)
 
bool readConfig (Config *c, const char *filename)
 Read a configuration from a file. More...
 
bool readConfig (Config *c, const char *buf, int n, const QString &sourceName)
 Read the configuration from a string. More...
 
int sampleWidth (AudioSampleFormat format)
 Returns the number of bytes a particular sample type uses. More...
 
void setApplicationName (const char *appname)
 Sets the application name to be used in debug output. More...
 
void setTraceFile (const char *filename)
 Uses the given file as the output target for all debug/error output. More...
 
template<typename Key , typename T , typename Allocator >
void swap (ArrayMap< Key, T, Allocator > &a, ArrayMap< Key, T, Allocator > &b)
 
template<typename Key , typename Allocator >
void swap (ArraySet< Key, Allocator > &a, ArraySet< Key, Allocator > &b)
 
void trace (Severity s, const char *msg,...)
 Display useful output. More...
 
void trace (const char *module, Severity s, const char *msg,...)
 Display useful output. More...
 
void traceMsg (Severity s, const char *msg)
 Display useful output. More...
 
void warning (const char *msg,...)
 Display error output, with a warning message. More...
 
Trace warning ()
 Obtain warning stream instance. More...
 
bool writeConfig (const Config *c, const char *filename)
 Write the given configuration into a file. More...
 

Variables

decltype(nullptr) typedef nullptr_t
 This is also declared in <cstddef> in std-namespace, but if you / any other library (Xlib!) happen to include <stddef.h>, then it isn't found anymore. More...
 
Mutex s_onceMutex
 Shared mutex for all the MULTI_ONCE macros.
 
Radiant::Mutex s_singletonMutex
 Shared mutex for all the singleton macros.
 

Detailed Description

Radiant library is a collection of C++ utility classes.

Radiant is a collection of C++ classes geared at wrapping platform-dependent programming features (threads, mutexes, sockets, etc.). Radiant also includes a collection of utilities for handling some vary basic string/file manipulation that is missing from C/C++ standard libraries.

Copyright: The Radiant library has been developed by Helsinki Institute for Information Technology (HIIT, 2006-2008) and MultiTouch Oy (2007-2011).

Radiant is released under the GNU Lesser General Public License (LGPL), version 2.1.

Author
Tommi Ilmonen, Esa Nuuros, Jarmo Hiipakka, Juha Laitinen, Jari Kleimola, George Whale

Enumeration Type Documentation

Audio sample types.

Enumerator
ASF_INT16 

16 bit two's complement audio samples.

ASF_INT24 

24 bit two's complement audio samples.

ASF_INT32 

32 bit two's complement audio samples.

If this format is used for 24 bit samples, the samples must be MSB aligned.

ASF_FLOAT32 

32 bit floating point audio samples in the range [-1.0,1.0].

ASF_FLOAT64 

64 bit floating point audio samples in the range [-1.0,1.0].

Enumeration of different video image formats.

Enumerator
IMAGE_UNKNOWN 

Unknown format.

IMAGE_GRAYSCALE 

Grayscale.

IMAGE_YUV_411 

yuv411

IMAGE_YUV_411P 

yuv411p

IMAGE_YUV_420 

yuv420

IMAGE_YUV_420P 

yuv420p

IMAGE_YUV_422 

yuv422

IMAGE_YUV_422P 

yuv 422p

IMAGE_RGB_24 

RGB, 8 bytes for each channel.

IMAGE_RGBA_32 

RGBA, 8 bytes for each channel.

IMAGE_RGB 

Default RGB-format.

IMAGE_RGBA 

Default RGBA-format.

IMAGE_BGR 

BGR.

IMAGE_BGRA 

BGRA.

IMAGE_RAWBAYER 

Raw Bayer format.

Input/output modes.

Enumerator
IO_NONE 

All bits zero.

IO_INPUT 

First bit set.

IO_OUTPUT 

Second bit set.

IO_INPUT_OUTPUT 

Both first and second bit set.

Enumeration of different video image plane types.

Enumerator
PLANE_UNKNOWN 

Unknown plane type.

PLANE_GRAYSCALE 

Grayscale.

PLANE_Y 

Y-plane in YUV.

PLANE_U 

U-plane in YUV.

PLANE_V 

V-plane in YUV.

PLANE_YUV 

YUV-plane.

PLANE_RED 

Red-plane in RGB(A)

PLANE_GREEN 

Green-plane in RGB(A)

PLANE_BLUE 

Blue-plane in RGB(A)

PLANE_RGB 

RGB-plane.

PLANE_BGR 

BGR-plane.

PLANE_RGBA 

RGBA-plane.

PLANE_BGRA 

BGRA-plane.

Error severity levels.

Enumerator
DEBUG 

Debug information, that is usually not useful for the end user.

Debug mesages are printed out only if verbose output is enabled.

INFO 

Useful information to all users.

Info messages are printed out always.

WARNING 

Something bad may or may not had happened.

FAILURE 

An error occurred.

FATAL 

Fatal error, causes application shutdown.

Flags for video input stream.

Enumerator
WITH_VIDEO 

Try to decode the video data from the data stream.

WITH_AUDIO 

Try to decode the PCM audio from the data stream.

DO_LOOP 

Loop the video source, when it reaches the end.

MONOPHONIZE_AUDIO 

If the audio has multiple channels, force the audio to mono.

PREVIEW_ON_PAUSE 

Display preview image when video is paused.

PREVIEW_ON_START 

Display preview image when video is in beginning.

Function Documentation

template<typename T >
T* Radiant::addressOf ( T &  rhs)
inline

Returns a memory aligned block of memory.

Parameters
sizeAmount of bytes to allocate
alignmentAlignment boundary size (Must be power of 2) Returns the address of the reference
rhsObject whose address is queried
Template Parameters
TType of the object that is being handled
float Radiant::asFloat ( FrameRate  fr)

Convert enumerated frame rate into floating point.

Parameters
frFrame rate to convert
Returns
Frame rate as float
FrameRate Radiant::closestFrameRate ( float  fps)

Return the closest enumerated frame rate given a floating point value.

Parameters
fpsFrame rate to round
Returns
Frame rate as an enumeration
template<typename Y >
std::enable_if<std::is_arithmetic<Y>::value, Y>::type Radiant::createNull ( )

Creates a null object for aritchmetic types.

Returns
zero cast to proper type
Template Parameters
YType of object whose null value is created
template<typename Y >
std::enable_if<!std::is_arithmetic<Y>::value, Y>::type Radiant::createNull ( )

Create a null object for non-arithmetic types.

Returns
the return value of the static null() method of the type
Template Parameters
YType of object whose null value is created
void Radiant::debug ( const char *  msg,
  ... 
)

Display debug output.

This function calls trace to do the final work and it is effectively the same as calling trace(DEBUG, ...).

Parameters
msgmessage
See Also
trace
Trace Radiant::debug ( )
inline

Obtain debug stream instance.

Returns
debug stream
bool Radiant::enabledDuplicateFilter ( )

Returns true if the duplicate filter is enabled.

Returns
true if filtering is enabled
bool Radiant::enabledThreadId ( )

Returns true if the thread id printing is enabled.

Returns
true if thread id printing is enabled
void Radiant::enableDuplicateFilter ( bool  enable)

Toggle duplicate filter If enabled, duplicate messages will be ignored.

Parameters
enabletoggle filtering
void Radiant::enableThreadId ( bool  enable)

Toggle thread id printing If enabled, each log line will include a unique thread id.

Parameters
enabletoggle id printing
void Radiant::enableVerboseOutput ( bool  enable,
const QString &  module = QString() 
)

Toggle verbose output.

If enabled, messages sent with the debug function are displayed to the user. Otherwise they are silently ignored

Parameters
enableenable or disable messages
moduleif given, enables or disables verbose output only for given module.
void Radiant::error ( const char *  msg,
  ... 
)

Display error output.

This function calls trace to do the final work and it is effectively the same as calling trace(FAILURE, ...).

Parameters
msgmessage
See Also
trace
Examples:
AdvancedRenderingExample.cpp, BookExample.cpp, HelloImagesExample.cpp, PositionalSoundsExample.cpp, PostProcessingExample.cpp, and SamplePlayerExample.cpp.
Trace Radiant::error ( )
inline

Obtain error stream instance.

Returns
error stream
void Radiant::fatal ( const char *  msg,
  ... 
)

Display error output, with a fatal message.

This function calls trace to do the final work and it is effectively the same as calling trace(FATAL, ...).

Parameters
msgmessage
See Also
trace
void Radiant::forceColors ( bool  enable = true)

Forces ANSI colors to the output even if the output isn't ANSI-capable terminal.

Parameters
enableAre the colors forced.
void Radiant::info ( const char *  msg,
  ... 
)

Display information output.

This function calls trace to do the final work and it is effectively the same as calling trace(INFO, ...).

Parameters
msgmessage
See Also
trace
Examples:
DropHandlerExample.cpp, and PositionalSoundsExample.cpp.
Trace Radiant::info ( )
inline

Obtain info stream instance.

Returns
info stream
bool Radiant::isVerbose ( const char *  module)
Returns
true if verbose mode is on globally or at least for the given module
template<typename T , typename Y >
bool Radiant::operator!= ( const Y *  lhs,
const IntrusivePtr< T > &  rhs 
)
inline

Check if a raw pointer and an intrusive pointer are inequal.

Parameters
lhsLeft side operand
rhsRight side operand
Returns
True if pointers are inequal, false otherwise
Template Parameters
TType of the object pointed by intrusive pointer
YType of the object pointed by raw pointer
template<typename T >
bool Radiant::operator!= ( nullptr_t  ,
const IntrusivePtr< T > &  rhs 
)
inline

Check if nullptr is inequal to intrusive pointer.

Parameters
rhsRight side operand
Returns
True if rhs is not pointing to nullptr, false otherwise
Template Parameters
TType of the object pointed by intrusive pointer
template<typename T , typename Y >
bool Radiant::operator!= ( const IntrusiveWeakPtr< T > &  lhs,
const IntrusivePtr< Y > &  rhs 
)
inline

Check if two different type intrusive pointers are inequal.

Parameters
lhsLeft side operand
rhsRight side operand
Returns
True if pointers are not pointing to same object
Template Parameters
TType of the object pointed by lhs
YType of the object pointed by rhs
template<typename T , typename Y >
bool Radiant::operator< ( const T *  lhs,
const IntrusivePtr< Y > &  rhs 
)
inline

Compare operator for a raw pointer and an instrusive pointer.

Parameters
lhsLeft side operand
rhsRight side operand
Returns
True if raw pointer is lesser, false otherwise
Template Parameters
TType of the object pointed by raw pointer
YType of the object pointed by intrusive pointer
std::ostream& Radiant::operator<< ( std::ostream &  os,
const TimeStamp &  ts 
)

Output a timestamp to a stream.

Parameters
osstream to write to
tstimestamp to write
Returns
reference to the output stream
std::ostream& Radiant::operator<< ( std::ostream &  os,
const Variant &  v 
)
inline

Output operator for Radiant::Variant.

Parameters
osTarget stream for output
vVariant to output
Returns
Reference to stream
template<typename T , typename Y >
bool Radiant::operator== ( const Y *  lhs,
const IntrusivePtr< T > &  rhs 
)
inline

Check if a raw pointer and an intrusive pointer are equal.

Parameters
lhsLeft side operand
rhsRight side operand
Returns
True if pointers are equal, false otherwise
Template Parameters
TType of the object pointed by intrusive pointer
YType of the object pointed by raw pointer
template<typename T >
bool Radiant::operator== ( nullptr_t  ,
const IntrusivePtr< T > &  rhs 
)
inline

Check if nullptr is equal to intrusive pointer.

Parameters
rhsRight side operand
Returns
True if rhs is pointing to nullptr, false otherwise
Template Parameters
TType of the object pointed by intrusive pointer
template<typename T , typename Y >
bool Radiant::operator== ( const IntrusiveWeakPtr< T > &  lhs,
const IntrusivePtr< Y > &  rhs 
)
inline

Check if two different type intrusive pointers are equal.

Parameters
lhsLeft side operand
rhsRight side operand
Returns
True if both pointers are pointing to same object
Template Parameters
TType of the object pointed by lhs
YType of the object pointed by rhs
std::istream& Radiant::operator>> ( std::istream &  is,
TimeStamp &  ts 
)

Read a timestamp from a stream.

Parameters
isstream to read from
tstimestamp to read
Returns
reference to the input stream
bool Radiant::readConfig ( Config *  c,
const char *  filename 
)

Read a configuration from a file.

Parameters
cThe configuration object to fill
filenameName of the file where the config is read
Returns
False if nothing was read, otherwise true
bool Radiant::readConfig ( Config *  c,
const char *  buf,
int  n,
const QString &  sourceName 
)

Read the configuration from a string.

Parameters
cThe configuration object to fill.
bufThe configuration string.
nThe length of the configuration string
sourceNamefilename or other source identification that is used with error messages
Returns
false if nothing was read, otherwise true
int Radiant::sampleWidth ( AudioSampleFormat  format)
inline

Returns the number of bytes a particular sample type uses.

Parameters
formataudio format to query
Returns
number of bytes per sample
void Radiant::setApplicationName ( const char *  appname)

Sets the application name to be used in debug output.

By default the info/debug/error functions will print out the error message, without further information. You can set the application name with this function, and once this is done each output line will begin with the application name. This is handy if there are several applications throwing output to the same terminal window, and you want to know which application is responsible for which output.

Parameters
appnameapplication name
void Radiant::setTraceFile ( const char *  filename)

Uses the given file as the output target for all debug/error output.

Parameters
filenameoutput filename
void Radiant::trace ( Severity  s,
const char *  msg,
  ... 
)

Display useful output.

This function prints out given message, based on current verbosity level.

Radiant includes a series of functions to write debug output on the terminal.

The functions info, debug, error and fatal print output to the sceen in standardized format. The debug function only writes data to the screen if verbose reporting is enabled with enableVerboseOutput (see also MultiWidgets::Application::verbose). These functions are basically wrappers around printf.

The terminal output is protected by mutex lock so that multiple threads can write to the same terminal without producing corrupted output. This was also the reason why the output is done with functions, rather than std::cout etc. With the std streams one cannot organize a mutex lock around the text output, which easily results in corrupted (and rather useless) output.

Parameters
sseverity of the message
msgmessage format string
void Radiant::trace ( const char *  module,
Severity  s,
const char *  msg,
  ... 
)

Display useful output.

This function prints out given message, based on current verbosity level.

Radiant includes a series of functions to write debug output on the terminal.

The functions info, debug, error and fatal print output to the sceen in standardized format. The debug function only writes data to the screen if verbose reporting is enabled with enableVerboseOutput (see also MultiWidgets::Application::verbose). These functions are basically wrappers around printf.

The terminal output is protected by mutex lock so that multiple threads can write to the same terminal without producing corrupted output. This was also the reason why the output is done with functions, rather than std::cout etc. With the std streams one cannot organize a mutex lock around the text output, which easily results in corrupted (and rather useless) output.

Parameters
sseverity of the message
msgmessage format string
void Radiant::traceMsg ( Severity  s,
const char *  msg 
)

Display useful output.

This function prints out given message, based on current verbosity level.

Radiant includes a series of functions to write debug output on the terminal.

The functions info, debug, error and fatal print output to the sceen in standardized format. The debug function only writes data to the screen if verbose reporting is enabled with enableVerboseOutput (see also MultiWidgets::Application::verbose). These functions are basically wrappers around printf.

The terminal output is protected by mutex lock so that multiple threads can write to the same terminal without producing corrupted output. This was also the reason why the output is done with functions, rather than std::cout etc. With the std streams one cannot organize a mutex lock around the text output, which easily results in corrupted (and rather useless) output.

Parameters
sseverity of the message
msgmessage format string
void Radiant::warning ( const char *  msg,
  ... 
)

Display error output, with a warning message.

This function calls trace to do the final work and it is effectively the same as calling trace(WARNING, ...).

Parameters
msgmessage
See Also
trace
Trace Radiant::warning ( )
inline

Obtain warning stream instance.

Returns
warning stream
bool Radiant::writeConfig ( const Config *  c,
const char *  filename 
)

Write the given configuration into a file.

Parameters
cConfiguration object to write
filenameName of the file to write
Returns
True if the operation was succesful, false otherwise.

Variable Documentation

decltype(nullptr) typedef Radiant::nullptr_t

This is also declared in <cstddef> in std-namespace, but if you / any other library (Xlib!) happen to include <stddef.h>, then it isn't found anymore.

Use this to be safe.