Murl::Util Namespace Reference

Utility classes, templates and functions. More...

Namespaces

 DeepCopy
 Object deep copy functions.
 
 Hash
 Basic hash functions.
 

Classes

class  Attributes
 The attributes class, see IAttributes. More...
 
class  AttributesBase
 The attributes base class, see IAttributes. More...
 
class  MD5Checksum
 The MD5 checksum class. More...
 
class  CRC32Checksum
 The CRC32 checksum class. More...
 
class  ClassInfoRegistry
 The class info registration container. More...
 
class  Base64State
 The Base64 state class. More...
 
class  Base64Encoder
 The Base64 encoder class. More...
 
class  Base64Decoder
 The Base64 decoder class. More...
 
class  Environment
 The command arguments parser base class. More...
 
class  Evaluator
 An expression evaluator. More...
 
class  EvictableVideoStream
 The evictable video stream class, see IVideoStream. More...
 
class  EvictableVideoSurface
 The evictable video surface class, see IVideoSurface. More...
 
class  File
 Utility class implementing the IFile interface. More...
 
class  FileInterface
 Utility class implementing a IFileInterface base class. More...
 
class  FileTools
 Utility class to read / write binary files. More...
 
class  Filter
 The filter base class. More...
 
class  BoxFilter
 The box filter class has not interpolation. More...
 
class  BilinearFilter
 The bilinear filter class has linear interpolation. More...
 
class  GaussianFilter
 The gaussian filter class has gaussian function interpolation. More...
 
class  Font
 The font rendering class, see IFont. More...
 
class  FontCollection
 A collection of multiple fonts to render, see IFont. More...
 
class  GeoLocation
 The geo location class. More...
 
interface  IFactory
 The factory used to create utility objects Use the Util::IFactoryRegistry base interface for managing registered classes. More...
 
class  StaticFactory
 The StaticFactory class to create the IFactory object. More...
 
interface  IFactoryRegistry
 The IFactoryRegistry interface provides methods to add, remove and query different utility classes that can be instantiated using the Util::IFactory implementing this interface. More...
 
class  IffHeader
 The Interchange File Format header format structure. More...
 
class  IffChunk
 The Interchange File Format chunk format structure. More...
 
class  IffData
 The Interchange File Format data class. More...
 
class  IffStream
 The Interchange File Format stream class. More...
 
class  MemoryStream
 The memory stream class. More...
 
class  Message
 The message base class. More...
 
class  MessageCallBack
 The message callback base class is used by the MessageDispatch class to deliver received messages by a callback method, see MessageThread. More...
 
class  MessageMethod
 The MessageMethod class delivers a message of a specified type to a class method, see MessageThread. More...
 
class  MessageDispatch
 The message dispatch class is used to deliver messages to a callback method by message identifier, see MessageThread. More...
 
class  MessageQueue
 The message queue class is used to send and wait for Message objects, see MessageThread. More...
 
class  MessageThread
 The MessageThread class implements a thread with a ready to use MessageQueue and MessageDispatch class. More...
 
class  MethodCall0
 The method call object. More...
 
class  MethodCall1
 The method call object with 1 method parameter. More...
 
class  MethodCall2
 The method call object with 2 method parameters. More...
 
class  MethodCall3
 The method call object with 3 method parameters. More...
 
class  MethodCall4
 The method call object with 4 method parameters. More...
 
class  MethodCall5
 The method call object with 5 method parameters. More...
 
class  MethodCall6
 The method call object with 6 method parameters. More...
 
class  MethodCall7
 The method call object with 7 method parameters. More...
 
class  MethodCall8
 The method call object with 8 method parameters. More...
 
class  MethodCall9
 The method call object with 9 method parameters. More...
 
class  MethodCall10
 The method call object with 10 method parameters. More...
 
class  MethodCall11
 The method call object with 11 method parameters. More...
 
class  MethodCall12
 The method call object with 12 method parameters. More...
 
class  MethodCall13
 The method call object with 13 method parameters. More...
 
class  OutlineRasterizer
 A class for rasterizing vector outlines. More...
 
class  PixelConverter
 Pixel format conversion class. More...
 
class  PolygonManipulator
 A class for mainpulating simple polygons. More...
 
class  Rng
 The random number generator base class. More...
 
class  Marsaglia
 The marsaglia random number generator. More...
 
class  TT800
 The TT800 random number generator. More...
 
class  Well1024
 The Well random number generator. More...
 
class  Rsa
 The rsa crypto class. More...
 
class  SampleConverter
 Sample format conversion class. More...
 
class  CompareFunction
 The compare functions. More...
 
class  Timeline
 The timeline base class. More...
 
class  ToolsFileInterface
 Utility class implementing the IFileInterface class. More...
 
class  VideoScaler
 The video scaler class. More...
 
class  NearestVideoScaler
 The nearest video scaler class simply samples single points without filtering. More...
 
class  BoxVideoScaler
 The box video scaler class uses the BoxFilter and supports optimized scaling to half of the size. More...
 
class  BilinearVideoScaler
 The bilinear video scaler class uses the BilinearFilter. More...
 
class  GaussianVideoScaler
 The gaussian video scaler class uses the GaussianFilter. More...
 
class  VideoStream
 The video stream class, see IVideoStream. More...
 
class  VideoSurface
 The video surface class, see IVideoSurface. More...
 
class  VideoSurfaceTools
 The video surface tools class. More...
 
class  XmlParser
 The XML parser base class. More...
 

Typedefs

using IffChunkArray = Array< IffChunk * >
 Definition of the IffChunk pointer array.
 
using VideoScalerPtr = SharedPointer< VideoScaler >
 The VideoScaler shared pointer type.
 
using VideoScalerCPtr = SharedPointer< VideoScaler const >
 The VideoScaler const shared pointer type.
 
using VideoSurfacePtr = SharedPointer< VideoSurface >
 The VideoSurface shared pointer type.
 
using VideoSurfaceCPtr = SharedPointer< VideoSurface const >
 The VideoSurface const shared pointer type.
 

Enumerations

enum  MatchOptions {
  MATCH_DEFAULT , MATCH_NOESCAPE , MATCH_PATHNAME , MATCH_PERIOD ,
  MATCH_CASEFOLD , MATCH_LEADING_DIR
}
 Match option flags, can be combined using bitwise OR. More...
 

Functions

template<class DataType >
void Release (DataType &p)
 Release an object. More...
 
template<class DataType >
void ReleaseArray (DataType &p)
 Release an object array. More...
 
template<class DestType , class SrcType >
bool ReleaseType (SrcType &p)
 Release an object of specified type. More...
 
template<class DataType >
void MemClear (DataType &memory)
 Clear the memory of a concrete type. More...
 
template<class DataType >
void MemSet (DataType memory, UInt8 value, UInt64 byteSize)
 Set memory bytes to a given value. More...
 
template<class DestType , class SrcType >
void MemCopy (DestType destination, const SrcType source, UInt64 byteSize)
 Copy memory bytes. More...
 
template<class DataType >
void MemCopyArray (DataType &destination, const DataType &source)
 Copy the memory of a concrete type. More...
 
template<class DestType , class SrcType >
void MemMove (DestType destination, const SrcType source, UInt64 byteSize)
 Move overlapping memory bytes. More...
 
template<class DataType1 , class DataType2 >
SInt32 MemCompare (const DataType1 source1, const DataType2 source2, UInt64 byteSize)
 Compare memory bytes. More...
 
template<class DataType >
void Fill (DataType *dstPtr, const DataType *dstEnd, const DataType &value)
 Fill the memory of a concrete type. More...
 
template<class ArrayType , class DataType >
void FillArray (ArrayType &array, const DataType &value)
 Set all C-array elements to a given value. More...
 
template<class DataType >
UInt32 Find (const DataType *memory, const DataType &item, UInt32 maxElements)
 Find the first appearance of a concrete type in memory. More...
 
template<class ArrayType , class DataType >
UInt32 FindArray (ArrayType &array, const DataType &item)
 Find the first appearance of an item in a C-array. More...
 
template<class DataType >
void Swap (DataType &a, DataType &b)
 Swap two values. More...
 
template<class DataType >
DataType RoundToNextPowerOfTwo (DataType value)
 Round a value to the next power of two. More...
 
template<class DataType >
Bool IsPowerOfTwo (DataType value)
 Check if a given value equals a power of two. More...
 
template<class DataType >
DataType RoundToNextFourByteBoundary (DataType value)
 Round a value to the next 4 byte boundary. More...
 
template<class DataType >
DataType RoundToNextEightByteBoundary (DataType value)
 Round a value to the next 8 byte boundary. More...
 
template<class DataType >
DataType RoundToNextSixteenByteBoundary (DataType value)
 Round a value to the next 16 byte boundary. More...
 
template<class DataType >
DataType RoundToRaster (DataType value, DataType raster, DataType &diff)
 Round a value to the next raster and return the rounded value and the difference to the previous raster before rounding. More...
 
template<class DataType >
DataType RoundToRaster (DataType value, DataType raster)
 Round a value to the next raster. More...
 
template<class DataType >
UInt32 GetNumberOfSetBits (DataType value)
 Compute the number of set bits. More...
 
template<class DataType >
UInt32 GetNumberOfClearedBits (DataType value)
 Compute the number of cleared bits. More...
 
template<class DataType >
UInt32 GetNumberOfDigits (DataType value, DataType base=10)
 Compute the number of digits. More...
 
const DataStaticEmptyData ()
 Get a constant static empty data object. More...
 
UInt64 SwapBytes (UInt64 value)
 Swap all bytes of a 64 bit value. More...
 
UInt32 SwapBytes (UInt32 value)
 Swap all bytes of a 32 bit value. More...
 
UInt16 SwapBytes (UInt16 value)
 Swap all bytes of a 16 bit value. More...
 
Bool IsDebugBuild ()
 Check if the engine was built using the debug configuration. More...
 
Bool IsReleaseBuild ()
 Check if the engine was built using the release configuration. More...
 
Bool Compress (const ConstData &uncompressedIn, Data &compressedOut)
 Compress a given data object using ZLib with IEnums::COMPRESSION_LEVEL_DEFAULT. More...
 
Bool Compress (const ConstData &uncompressedIn, Data &compressedOut, IEnums::CompressionLevel compressionLevel)
 Compress a given data object using ZLib with a specified compression level. More...
 
Bool Uncompress (const ConstData &compressedIn, Data &uncompressedOut)
 Uncompress a given data object using ZLib. More...
 
String EncodeBase64 (const String &dataIn)
 Encode a string to a Base64 character string. More...
 
String EncodeBase64 (const ConstData &dataIn)
 Encode a data object to a Base64 character string. More...
 
String EncodeBase64 (const void *dataIn, UInt64 byteSizeIn)
 Encode a memory block to a Base64 string. More...
 
Data DecodeBase64 (const String &dataIn)
 Decode a Base64 character string. More...
 
Data DecodeBase64 (const ConstData &dataIn)
 Decode Base64 characters from a data object. More...
 
Data DecodeBase64 (const void *dataIn, UInt64 byteSizeIn)
 Decode Base64 characters from a memory block. More...
 
Bool IsBase64 (const String &dataIn)
 Check if a string is Base64 encoded. More...
 
Bool IsBase64 (const ConstData &dataIn)
 Check if a data object is Base64 encoded. More...
 
Bool IsBase64 (const void *dataIn, UInt64 byteSizeIn)
 Check if a memory block is Base64 encoded. More...
 
String EncodeHex (const String &dataIn)
 Encode a string to a Hex character string. More...
 
String EncodeHex (const ConstData &dataIn)
 Encode a data object to a Hex character string. More...
 
String EncodeHex (const void *dataIn, UInt64 byteSizeIn)
 Encode a memory block to a Hex character string. More...
 
Data DecodeHex (const String &dataIn)
 Decode a Hex character string. More...
 
Data DecodeHex (const ConstData &dataIn)
 Decode Hex characters from a data object. More...
 
Data DecodeHex (const void *dataIn, UInt64 byteSizeIn)
 Decode Hex characters from a memory block. More...
 
UInt64 EncodeHex (const void *dataIn, UInt64 byteSizeIn, void *dataOut, UInt64 byteSizeOut)
 Encode a memory block to Hex characters. More...
 
UInt64 DecodeHex (const void *dataIn, UInt64 byteSizeIn, void *dataOut, UInt64 byteSizeOut)
 Decode Hex characters from a memory block. More...
 
String EncodeUrl (const String &source)
 Encode a string to a url character string (percentage encoding). More...
 
String DecodeUrl (const String &source)
 Decode a url character string (percentage encoding) to a string. More...
 
String EncodeXml (const String &source)
 Encode a string so that it can be used as an XML attribute value. More...
 
UInt32 IffFourCC (UInt32 fourCC)
 Compute an integer value from a FourCC. More...
 
template<class ObjectType >
const IMethodCallCreateMethodCall (ObjectType *obj, Bool(ObjectType::*method)())
 Create a method call object. More...
 
template<class ObjectType , class Par1Type >
const IMethodCallCreateMethodCall (ObjectType *obj, Bool(ObjectType::*method)(Par1Type), Par1Type par1)
 Create a method call object with 1 method parameter. More...
 
template<class ObjectType , class Par1Type , class Par2Type >
const IMethodCallCreateMethodCall (ObjectType *obj, Bool(ObjectType::*method)(Par1Type, Par2Type), Par1Type par1, Par2Type par2)
 Create a method call object with 2 method parameters. More...
 
template<class ObjectType , class Par1Type , class Par2Type , class Par3Type >
const IMethodCallCreateMethodCall (ObjectType *obj, Bool(ObjectType::*method)(Par1Type, Par2Type, Par3Type), Par1Type par1, Par2Type par2, Par3Type par3)
 Create a method call object with 3 method parameters. More...
 
template<class ObjectType , class Par1Type , class Par2Type , class Par3Type , class Par4Type >
const IMethodCallCreateMethodCall (ObjectType *obj, Bool(ObjectType::*method)(Par1Type, Par2Type, Par3Type, Par4Type), Par1Type par1, Par2Type par2, Par3Type par3, Par4Type par4)
 Create a method call object with 4 method parameters. More...
 
template<class ObjectType , class Par1Type , class Par2Type , class Par3Type , class Par4Type , class Par5Type >
const IMethodCallCreateMethodCall (ObjectType *obj, Bool(ObjectType::*method)(Par1Type, Par2Type, Par3Type, Par4Type, Par5Type), Par1Type par1, Par2Type par2, Par3Type par3, Par4Type par4, Par5Type par5)
 Create a method call object with 5 method parameters. More...
 
template<class ObjectType , class Par1Type , class Par2Type , class Par3Type , class Par4Type , class Par5Type , class Par6Type >
const IMethodCallCreateMethodCall (ObjectType *obj, Bool(ObjectType::*method)(Par1Type, Par2Type, Par3Type, Par4Type, Par5Type, Par6Type), Par1Type par1, Par2Type par2, Par3Type par3, Par4Type par4, Par5Type par5, Par6Type par6)
 Create a method call object with 6 method parameters. More...
 
template<class ObjectType , class Par1Type , class Par2Type , class Par3Type , class Par4Type , class Par5Type , class Par6Type , class Par7Type >
const IMethodCallCreateMethodCall (ObjectType *obj, Bool(ObjectType::*method)(Par1Type, Par2Type, Par3Type, Par4Type, Par5Type, Par6Type, Par7Type), Par1Type par1, Par2Type par2, Par3Type par3, Par4Type par4, Par5Type par5, Par6Type par6, Par7Type par7)
 Create a method call object with 7 method parameters. More...
 
template<class ObjectType , class Par1Type , class Par2Type , class Par3Type , class Par4Type , class Par5Type , class Par6Type , class Par7Type , class Par8Type >
const IMethodCallCreateMethodCall (ObjectType *obj, Bool(ObjectType::*method)(Par1Type, Par2Type, Par3Type, Par4Type, Par5Type, Par6Type, Par7Type, Par8Type), Par1Type par1, Par2Type par2, Par3Type par3, Par4Type par4, Par5Type par5, Par6Type par6, Par7Type par7, Par8Type par8)
 Create a method call object with 8 method parameters. More...
 
template<class ObjectType , class Par1Type , class Par2Type , class Par3Type , class Par4Type , class Par5Type , class Par6Type , class Par7Type , class Par8Type , class Par9Type >
const IMethodCallCreateMethodCall (ObjectType *obj, Bool(ObjectType::*method)(Par1Type, Par2Type, Par3Type, Par4Type, Par5Type, Par6Type, Par7Type, Par8Type, Par9Type), Par1Type par1, Par2Type par2, Par3Type par3, Par4Type par4, Par5Type par5, Par6Type par6, Par7Type par7, Par8Type par8, Par9Type par9)
 Create a method call object with 9 method parameters. More...
 
template<class ObjectType , class Par1Type , class Par2Type , class Par3Type , class Par4Type , class Par5Type , class Par6Type , class Par7Type , class Par8Type , class Par9Type , class Par10Type >
const IMethodCallCreateMethodCall (ObjectType *obj, Bool(ObjectType::*method)(Par1Type, Par2Type, Par3Type, Par4Type, Par5Type, Par6Type, Par7Type, Par8Type, Par9Type, Par10Type), Par1Type par1, Par2Type par2, Par3Type par3, Par4Type par4, Par5Type par5, Par6Type par6, Par7Type par7, Par8Type par8, Par9Type par9, Par10Type par10)
 Create a method call object with 10 method parameters. More...
 
template<class ObjectType , class Par1Type , class Par2Type , class Par3Type , class Par4Type , class Par5Type , class Par6Type , class Par7Type , class Par8Type , class Par9Type , class Par10Type , class Par11Type >
const IMethodCallCreateMethodCall (ObjectType *obj, Bool(ObjectType::*method)(Par1Type, Par2Type, Par3Type, Par4Type, Par5Type, Par6Type, Par7Type, Par8Type, Par9Type, Par10Type, Par11Type), Par1Type par1, Par2Type par2, Par3Type par3, Par4Type par4, Par5Type par5, Par6Type par6, Par7Type par7, Par8Type par8, Par9Type par9, Par10Type par10, Par11Type par11)
 Create a method call object with 11 method parameters. More...
 
template<class ObjectType , class Par1Type , class Par2Type , class Par3Type , class Par4Type , class Par5Type , class Par6Type , class Par7Type , class Par8Type , class Par9Type , class Par10Type , class Par11Type , class Par12Type >
const IMethodCallCreateMethodCall (ObjectType *obj, Bool(ObjectType::*method)(Par1Type, Par2Type, Par3Type, Par4Type, Par5Type, Par6Type, Par7Type, Par8Type, Par9Type, Par10Type, Par11Type, Par12Type), Par1Type par1, Par2Type par2, Par3Type par3, Par4Type par4, Par5Type par5, Par6Type par6, Par7Type par7, Par8Type par8, Par9Type par9, Par10Type par10, Par11Type par11, Par12Type par12)
 Create a method call object with 12 method parameters. More...
 
template<class ObjectType , class Par1Type , class Par2Type , class Par3Type , class Par4Type , class Par5Type , class Par6Type , class Par7Type , class Par8Type , class Par9Type , class Par10Type , class Par11Type , class Par12Type , class Par13Type >
const IMethodCallCreateMethodCall (ObjectType *obj, Bool(ObjectType::*method)(Par1Type, Par2Type, Par3Type, Par4Type, Par5Type, Par6Type, Par7Type, Par8Type, Par9Type, Par10Type, Par11Type, Par12Type, Par13Type), Par1Type par1, Par2Type par2, Par3Type par3, Par4Type par4, Par5Type par5, Par6Type par6, Par7Type par7, Par8Type par8, Par9Type par9, Par10Type par10, Par11Type par11, Par12Type par12, Par13Type par13)
 Create a method call object with 13 method parameters. More...
 
template<class DataType >
void QuickSort (DataType *items, UInt32 numberOfItems, SInt32(*compareFunction)(const DataType *, const DataType *))
 Quick sort items of specified type. More...
 
template<class DataType >
DataType * BinarySearch (const DataType *key, DataType *items, UInt32 numberOfItems, SInt32(*compareFunction)(const DataType *, const DataType *))
 Binary search an item of specified type. More...
 
template<class DataType >
void BubbleSort (DataType *items, UInt32 numberOfItems, SInt32(*compareFunction)(const DataType *, const DataType *))
 Bubble sort items of specified type. More...
 
template<class DataType >
void SortArray (Array< DataType > &array, SInt32(*compareFunction)(const DataType *, const DataType *))
 Sort an array of specified type. More...
 
template<class DataType >
void SortArray (Array< DataType > &array, Bool ascending)
 Sort an array of specified type. More...
 
void SortUInt64Array (UInt64Array &array, Bool ascending)
 Sort a UInt64 array. More...
 
void SortSInt64Array (SInt64Array &array, Bool ascending)
 Sort a SInt64 array. More...
 
void SortUInt32Array (UInt32Array &array, Bool ascending)
 Sort a UInt32 array. More...
 
void SortSInt32Array (SInt32Array &array, Bool ascending)
 Sort a SInt32 array. More...
 
void SortRealArray (RealArray &array, Bool ascending)
 Sort a Real array. More...
 
void SortDoubleArray (DoubleArray &array, Bool ascending)
 Sort a Double array. More...
 
void SortStringArray (StringArray &array, Bool ascending)
 Sort a String array. More...
 
const StringStaticEmptyString ()
 Get the reference to a static empty string. More...
 
const StringStaticWhitespaceString ()
 Get the reference to a static whitespace string. More...
 
const StringArrayStaticEmptyStringArray ()
 Get the reference to a static empty string array. More...
 
String PrintToString (const Char *format,...)
 Print formatted variadic arguments into string. More...
 
UInt32 SplitString (const String &inputString, Char delimiter, StringArray &pieces, Bool acceptEmpty=false)
 Split a string into pieces using a given delimiter, the pieces are stored in a string array. More...
 
UInt32 SplitString (const String &inputString, Char delimiter, StringIndex &pieces, Bool acceptEmpty=false)
 Split a string into pieces using a given delimiter, the pieces are stored in a string index. More...
 
UInt32 SplitString (const String &inputString, const String &delimiters, StringArray &pieces, Bool acceptEmpty=false)
 Split a string into pieces using a given set of delimiters, the pieces are stored in a string array. More...
 
UInt32 SplitString (const String &inputString, const String &delimiters, StringIndex &pieces, Bool acceptEmpty=false)
 Split a string into pieces using a given set of delimiters, the pieces are stored in a string index. More...
 
String JoinStringArray (const StringArray &inputStrings, const String &separator, Bool joinEmpty=false)
 Join all strings from a string array. More...
 
String JoinStringIndex (const StringIndex &inputStrings, const String &separator, Bool joinEmpty=false)
 Join all strings from a string index. More...
 
String IndentString (const String &inputString, SInt32 indent, Bool indentEmpty=false)
 Indent a (multi-line) string by a given number of white spaces. More...
 
String FillInParameters (const String &inputString, const StringArray &parameters)
 Fill in a set of given parameters into a placeholder string. More...
 
void TrimStringArray (StringArray &inputString)
 Trim all strings in a string array. More...
 
String GetLine (const String &inputString, SInt32 &startPos)
 Get a line from a string. More...
 
String GetWord (const String &inputString, SInt32 &startPos)
 Get the next word from a string. More...
 
Bool HasCppScope (const String &className)
 Check if a class name has a "::" part. More...
 
String GetCppScope (const String &className)
 Get the class name substring before the "::" part. More...
 
String StripCppScope (const String &className)
 Get the class name substring behind the "::" part. More...
 
Bool HasScope (const String &name)
 Check if a name has a dot character. More...
 
String GetScope (const String &name)
 Get the substring before the dot character. More...
 
String StripScope (const String &name)
 Get the substring behind the dot character. More...
 
Bool StripIndex (String &name, UInt32 &index, Bool trimOutput=true)
 Strip the index part from a name and get the index value. More...
 
Bool StripCount (String &name, UInt32 &count, Bool trimOutput=true)
 Strip the count part from a name and get its value. More...
 
Bool IsIdValid (const String &identifier)
 Check if an identifier string is valid. More...
 
Bool IsNumeric (const String &str)
 Check if a string has numeric characters only. More...
 
Bool IsAlphaNumeric (const String &str)
 Check if a string has alphanumeric characters only. More...
 
Bool IsDigit (const Char chr)
 Check if a character is a digit character. More...
 
Bool IsAlpha (const Char chr)
 Check if a character is an alphabetic character. More...
 
Bool IsAlphaNumeric (const Char chr)
 Check if a character is an alphanumeric character. More...
 
Bool IsPunctuation (const Char chr)
 Check if a character is a punctuation character. More...
 
Bool IsSpace (const Char chr)
 Check if a character is a spacing character. More...
 
Bool IsHexDigit (const Char chr)
 Check if a character is a hexadecimal character. More...
 
Bool IsControl (const Char chr)
 Check if a character is a control character. More...
 
Bool StringToBool (const String &inputString, Bool &value)
 Convert a decimal string to a bool value. More...
 
Bool StringToUInt64 (const String &inputString, UInt64 &value)
 Convert a decimal string to a UInt64 value. More...
 
Bool StringToSInt64 (const String &inputString, SInt64 &value)
 Convert a decimal string to a SInt64 value. More...
 
Bool StringToUInt32 (const String &inputString, UInt32 &value)
 Convert a decimal string to a UInt32 value. More...
 
Bool StringToSInt32 (const String &inputString, SInt32 &value)
 Convert a decimal string to a SInt32 value. More...
 
Bool StringToDouble (const String &inputString, Double &value)
 Convert a string to a Double value. More...
 
Bool StringToFloat (const String &inputString, Float &value)
 Convert a string to a Float value. More...
 
Bool StringToColor (const String &inputString, Color &value, ColorStringFormat &format)
 Convert a string to a color object. More...
 
Bool StringToColor (const String &inputString, Color &value, Bool &hasType)
 Convert a string to a color object. More...
 
Bool StringToColor (const String &inputString, Color &value)
 Convert a string to a color object. More...
 
Bool StringToColorComponent (const String &inputString, Float &value, ColorStringFormat &format)
 Convert a string to a Float color component. More...
 
Bool StringToColorComponent (const String &inputString, Float &value, Bool &hasType)
 Convert a string to a Float color component. More...
 
Bool StringToColorComponent (const String &inputString, Float &value)
 Convert a string to a Float color component. More...
 
Bool HexStringToUInt64 (const String &inputString, UInt64 &value)
 Convert a hexadecimal string to a UInt64 value. More...
 
Bool HexStringToUInt32 (const String &inputString, UInt32 &value)
 Convert a hexadecimal string to a UInt32 value. More...
 
Bool AngleStringToDouble (const String &inputString, Double &value, Bool &hasUnit)
 Convert an angle string to a Double value. More...
 
Bool StringToBoolArray (const String &inputString, Char delimiter, BoolArray &values)
 Convert a string to a Bool array using a given delimiter. More...
 
Bool StringToUInt64Array (const String &inputString, Char delimiter, UInt64Array &values)
 Convert a string to a UInt64 array using a given delimiter. More...
 
Bool StringToSInt64Array (const String &inputString, Char delimiter, SInt64Array &values)
 Convert a string to a SInt64 array using a given delimiter. More...
 
Bool StringToUInt32Array (const String &inputString, Char delimiter, UInt32Array &values)
 Convert a string to a UInt32 array using a given delimiter. More...
 
Bool StringToSInt32Array (const String &inputString, Char delimiter, SInt32Array &values)
 Convert a string to a SInt32 array using a given delimiter. More...
 
Bool StringToDoubleArray (const String &inputString, Char delimiter, DoubleArray &values)
 Convert a string to a Double array using a given delimiter. More...
 
Bool StringToFloatArray (const String &inputString, Char delimiter, FloatArray &values)
 Convert a string to a Float array using a given delimiter. More...
 
UInt32 StringToBoolArray (const String &inputString, Char delimiter, Bool *values, UInt32 numValues)
 Convert a string to a Bool array using a given delimiter. More...
 
UInt32 StringToUInt64Array (const String &inputString, Char delimiter, UInt64 *values, UInt32 numValues)
 Convert a string to a UInt64 array using a given delimiter. More...
 
UInt32 StringToSInt64Array (const String &inputString, Char delimiter, SInt64 *values, UInt32 numValues)
 Convert a string to a SInt64 array using a given delimiter. More...
 
UInt32 StringToUInt32Array (const String &inputString, Char delimiter, UInt32 *values, UInt32 numValues)
 Convert a string to a UInt32 array using a given delimiter. More...
 
UInt32 StringToSInt32Array (const String &inputString, Char delimiter, SInt32 *values, UInt32 numValues)
 Convert a string to a SInt32 array using a given delimiter. More...
 
UInt32 StringToDoubleArray (const String &inputString, Char delimiter, Double *values, UInt32 numValues)
 Convert a string to a Double array using a given delimiter. More...
 
UInt32 StringToFloatArray (const String &inputString, Char delimiter, Float *values, UInt32 numValues)
 Convert a string to a Float array using a given delimiter. More...
 
String UInt64ToString (UInt64 inputValue)
 Convert a UInt64 value to a string. More...
 
String SInt64ToString (SInt64 inputValue)
 Convert a SInt64 value to a string. More...
 
String UInt32ToString (UInt32 inputValue)
 Convert a UInt32 value to a string. More...
 
String SInt32ToString (SInt32 inputValue)
 Convert a SInt32 value to a string. More...
 
String DoubleToString (Double inputValue)
 Convert a Double value to a string. More...
 
String ColorToString (const Color &inputValue)
 Convert a Color object to a string in float representation. More...
 
String ColorToString (const Color &inputValue, ColorStringFormat colorStringFormat)
 Convert a Color object to a string using a given color string format. More...
 
String UInt64ToString (UInt64 inputValue, const String &format)
 Convert a UInt64 value to a string using a format string. More...
 
String SInt64ToString (SInt64 inputValue, const String &format)
 Convert a SInt64 value to a string using a format string. More...
 
String UInt32ToString (UInt32 inputValue, const String &format)
 Convert a UInt32 value to a string using a format string. More...
 
String SInt32ToString (SInt32 inputValue, const String &format)
 Convert a SInt32 value to a string using a format string. More...
 
String DoubleToString (Double inputValue, const String &format)
 Convert a Double value to a string using a format string. More...
 
String ColorToString (const Color &inputValue, const String &format)
 Convert a Color object to a string in float representation. More...
 
String ColorToString (const Color &inputValue, ColorStringFormat colorStringFormat, const String &format)
 Convert a Color object to a string using a given color string format. More...
 
String BoolToString (Bool inputValue)
 Convert a Bool value to a string. More...
 
String TimeToString (const System::Time &inputValue)
 Convert a time value to a string. More...
 
String TimeToString (const System::Time &inputValue, const String &separator)
 Convert a time value to a string using a separator. More...
 
Bool Utf8ToWChar (const Char *inputBytes, UInt32 &numToSkip, WChar *outputValues, UInt32 &numValues)
 Convert an UTF8 character sequence to a wide-character. More...
 
Bool WCharToUtf8 (const WChar *inputValues, UInt32 &numToSkip, Char *outputBytes, UInt32 &numBytes)
 Convert a wide-character to an UTF8 character sequence. More...
 
Bool Utf8ToUtf16 (const Char *inputBytes, UInt32 &numToSkip, UInt16 *outputValues, UInt32 &numValues)
 Convert an UTF8 character sequence to an UTF16 character. More...
 
Bool Utf16ToUtf8 (const UInt16 *inputValues, UInt32 &numToSkip, Char *outputBytes, UInt32 &numBytes)
 Convert an UTF16 character to an UTF8 character sequence. More...
 
Bool Utf8ToUtf32 (const Char *inputBytes, UInt32 &outputValue, UInt32 &numToSkip)
 Convert an UTF8 character sequence to an UTF32 character. More...
 
Bool Utf32ToUtf8 (UInt32 inputValue, Char *outputBytes, UInt32 &numBytes)
 Convert an UTF32 character to an UTF8 character sequence. More...
 
String ValueToString (UInt64 inputValue)
 ValueToString overload for UInt64ToString() method. More...
 
String ValueToString (SInt64 inputValue)
 ValueToString overload for SInt64ToString() method. More...
 
String ValueToString (UInt32 inputValue)
 ValueToString overload for UInt32ToString() method. More...
 
String ValueToString (SInt32 inputValue)
 ValueToString overload for SInt32ToString() method. More...
 
String ValueToString (Double inputValue)
 ValueToString overload for DoubleToString() method. More...
 
String ValueToString (const Color &inputValue)
 ValueToString overload for ColorToString() method. More...
 
String ValueToString (Bool inputValue)
 ValueToString overload for BoolToString() method. More...
 
String ValueToString (const System::Time &inputValue)
 ValueToString overload for TimeToString() method. More...
 
String GetFilePath (const String &filePathAndName)
 Get the file path substring of a file path and name. More...
 
String GetFileName (const String &filePathAndName)
 Get the file name substring of a file path and name. More...
 
String GetFileExtension (const String &fileName)
 Get the file extension substring of a file name. More...
 
String StripExtension (const String &fileName)
 Strip the file extension from a file name. More...
 
String StripPathAndExtension (const String &filePathAndName)
 Strip the file path and extension from a file path and name. More...
 
String JoinPaths (const String &leftPath, const String &rightPath)
 Join two path strings. More...
 
String GetUnixPath (const String &windowsPath)
 Exchange all '\' with '/' characters. More...
 
String GetWindowsPath (const String &unixPath)
 Exchange all '/' with '\' characters. More...
 
String GetNormalizedPath (const String &path)
 Get a normalized path. More...
 
String GetRelativePath (const String &absolutePath, const String &absoluteBasePath)
 Get a relative path from an absolute one. More...
 
String GetAbsolutePath (const String &relativePath, const String &absoluteBasePath)
 Get an absolute path from a relative one. More...
 
Bool HasMatchPattern (const String &name, UInt32 matchOption=MATCH_DEFAULT)
 Check if a name contains pattern matching statements. More...
 
Bool IsNameMatching (const String &pattern, const String &name, UInt32 matchOptions=MATCH_DEFAULT)
 Check if a name matches a specified pattern. More...
 

Detailed Description

Utility classes, templates and functions.

Following is a short overview of how the print/conversion functions are layered (from low to high level):

1) String System::CLib::PrintToStringArg(const Char* format, void* vaListPtr): This is the lowest-level function that can be used to print any list of variables to a Murl::String. It takes an UTF8 format string, and a pointer to a std::va_list (as void*) that carries the variables. Internally, it uses the vsnprintf function for printing, which accepts the standard format specifiers.

2) String System::CLib::PrintToString(const Char* format, ...); For convenience, this function can be used to print to a string without having to build a va_list. This function builds a va_list internally and calls System::CLib::PrintToStringArg().

3) String Util::PrintToString(const Char* format, ...) This function is pretty much identical to 2), provided as a convenience in the Util namespace.

4) String Util::UInt64ToString(UInt64 inputValue, const String& format) This function (and the respective functions for the other data types described below) directly calls Util::PrintToString() with the given format and the inputValue as a single value parameter. Care must be taken that the given format is acceptable for the given data type, e.g. providing a format string of "%f" with a Murl::UInt32 variable will produce incorrect results. No check or conversion is done internally to ensure correct behavior.

5) String Util::UInt64ToString(UInt64 inputValue) This function (and the respective functions for the other data types described below) directly call Util::PrintToString() with a default format for the respective data type and the inputValue as a single value parameter. See also below for these default format strings. Calling these methods is preferable when the actual input variable has a different data type than the one desired in the output string, e.g. when a Murl::Float variable should be implicit converted to a Murl::SInt64 variable upon conversion.

6) String Util::ValueToString(UInt64 inputValue) This inline function and the respective overloads for the other data types directly call Util::UInt64ToString() and the respective counterparts. Using these methods is preferable when the input variable of a given data type should be printed with the actual default format for that data type.

Following is a list of number data types and their default format strings used in 5) and 6):


Copyright © 2011-2024 Spraylight GmbH.