sx Namespace Reference

Global namespace. More...


Enumerations

enum  DataType {
  TypeInvalid = 0x00, TypeBool = 0x01, TypeChar = 0x02, TypeShort = 0x04,
  TypeInt = 0x08, TypeFloat = 0x10, TypeDouble = 0x20, TypeSxInt = 0x40,
  TypeInt64 = 0x80, TypeUChar = 0x100, TypeUShort = 0x200, TypeUInt = 0x400,
  TypeUInt64 = 0x800
}
enum  Position { Front = 1, Back }
enum  RunMode { RunOnce = 1, RunCounted, RunTimed, RunForever }
enum  MessageType {
  RegularMessage = -1, InfoMessage, WarningMessage, ErrorMessage,
  CriticalMessage
}
enum  { DecimalPrecission = 30 }

Functions

int version ()
 sdk version
bool isInMainThread ()
 check wheter we are in main thread or not
size_t nextPower2 (size_t sz)
 get nearest power 2 size (equal or greater than sz).
QString rectfToString (const QRectF &r)
 qrectf to string
QRectF stringToRectf (const QString &str)
 string to rectf
QString pointfToString (const QPointF &pt)
 pointf to string
QPointF stringToPointf (const QString &str)
 string to pointf
static char * formatDouble (char *fmt, double v)
QString doubleToString (const double *db, int n, int precission=DecimalPrecission)
 convert double array to string, value separated with white space
QVector< double > stringToDouble (const QString &str)
 convert string to double values
QStringList dataTypes ()
 return available data types
QString dataTypeToString (DataType tid)
 data type to string
DataType dataTypeFromString (const QString &tstr)
 string to data type
template<typename Tx >
QDomElement appendSettingText (QDomElement &pn, const QString &cap, const Tx &val)
 Helper function to append setting to given xml element.
template<typename Tx >
QDomElement appendSettingCDATA (QDomElement &pn, const QString &cap, const Tx &val)
template<typename Tx >
QDomElement appendSettingAttribute (QDomElement &pn, const QString &cap, const QString &attr, const Tx &val)
 Helper function to append setting to given xml element.

Variables

size_t MaxBufferMemory = 1024 * 1024
 Maximum memory for each data buffer (default 1 MB).
size_t InitialBufferSize = 1024 * 16
 Initial buffer size for each data buffer (default 16 KB).
unsigned long MaxTimeout = 10000
 Maximum time out.
quintptr MainThreadId = 0
 main thread id


Detailed Description

Global namespace.

Here located function(s), variable(s), constant(s) that not belongs to specific namespace.


Function Documentation

template<typename Tx >
QDomElement sx::appendSettingAttribute ( QDomElement &  pn,
const QString &  cap,
const QString &  attr,
const Tx &  val 
) [inline]

Helper function to append setting to given xml element.

The setting value will be created as attribute value. Xml structure to be created:

  parent-element (pn element)
      <cap attr=val />
Parameters:
pn parent element
cap name of the element
attr name of the attribute
val attribute's value
Returns:
Newly created element
See also:
appendSettingText()

template<typename Tx >
QDomElement sx::appendSettingText ( QDomElement &  pn,
const QString &  cap,
const Tx &  val 
) [inline]

Helper function to append setting to given xml element.

Xml structure to be created:

  parent element (pn element)
      <cap>val</cap>
Parameters:
pn parent element where to append setting
cap name of the element to be created
val setting values
Returns:
Newly created element
See also:
appendSettingAttribute()

QStringList SX_SDKEXPORT sx::dataTypes (  ) 

return available data types

data type list

size_t SX_SDKEXPORT sx::nextPower2 ( size_t  sz  ) 

get nearest power 2 size (equal or greater than sz).

Parameters:
sz minimum size

QVector< double > SX_SDKEXPORT sx::stringToDouble ( const QString &  str  ) 

convert string to double values

Parameters:
str white space separated value(s)


Generated on Wed Dec 17 19:30:48 2008 for xBCI API by  doxygen 1.5.7.1