VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions

This is a collection of functions for the DtString class that includes More conversions from different types of objects WARNING: This function may be used in strange casting ways in order to get around the limitations of C++. More...

+ Inheritance diagram for DtConversionString:
+ Collaboration diagram for DtConversionString:

Public Member Functions

 DtConversionString (DtFloat64 val, int precision)
 
 DtConversionString (DtFloat32 val, int precision)
 
 DtConversionString (DtU8 val)
 
 DtConversionString (DtInt64 val)
 
 DtConversionString (DtU64 val)
 
void setString (DtFloat64 val, int precision)
 
void setString (DtFloat32 val, int precision)
 
- Public Member Functions inherited from DtString
 DtString ()
 Default CTOR. More...
 
 DtString (const char *str)
 CTOR. More...
 
 DtString (const char *str, int length)
 CTOR (fixed length). More...
 
 DtString (const std::string &str)
 CTOR (std::string). More...
 
 DtString (const DtString &orig)
 Copy CTOR. More...
 
virtual ~DtString ()
 Virtual DTOR. More...
 
virtual operator const char * () const
 Cast operator. More...
 
virtual DtStringclone () const
 Clone operator. More...
 
virtual void tokenize (const char delimiter, std::vector< DtString > &tokens) const
 Tokenize the string baseed on the input character. More...
 
virtual int toInt (bool *ok=0) const
 Conversion to integer, if ok is provided ok is set if conversion succeeds. More...
 
virtual unsigned int toUInt (bool *ok=0) const
 Conversion to unsigned integer, if ok is provided ok is set if conversion succeeds. More...
 
virtual float toFloat (bool *ok=0) const
 Convert to floating point. More...
 
virtual double toDouble (bool *ok=0) const
 Convert to double precision floating point. More...
 
virtual bool toBoolean (bool *ok=0) const
 Convert to double precision floating point. More...
 
virtual void toUpper ()
 Convert this string's alphabetic characters to uppercase. More...
 
virtual void toLower ()
 Convert this string's alphabetic characters to lowercase. More...
 
virtual int findChar (const char ch)
 Search the string for first occurrence of a character and return its index. More...
 
virtual int findLastChar (const char ch)
 Search the string for the last occurrence of a character and return its index. More...
 
virtual int findString (const DtString &string) const
 Search the string for the first occurrence of another string and return the starting index. More...
 
virtual int findLastString (const DtString &string)
 Search the string for the last occurrence of another string and return the starting index. More...
 
bool snipFrontToLast (const char ch)
 
bool snipBackToFirst (const char ch)
 
virtual int count (const char ch) const
 Returns the number of occurrences of the character. More...
 
virtual int length () const
 length() - Exactly the same as size(): More...
 
virtual int size () const
 size() - returns the length of the string not including the terminating '\0' More...
 
virtual std::string stdString () const
 stdString() - returns a standard string representation of the DtString More...
 
virtual const char * string () const
 string() - Returns a char * representation of the DtString: deprecated More...
 
virtual const char * c_str () const
 Returns a char* representation of the DtString;. More...
 
virtual bool isEmpty () const
 returns true if the string is empty, where empty is size() == 0 More...
 
virtual DtString section (const char sep, int start, int end=-1) const
 returns a section of the string based on the separator. More...
 
 DtString (double val)
 Constructors for creating DtString representations of numbers. More...
 
 DtString (int val)
 Constructors for creating DtString representations of numbers. More...
 
 DtString (long val)
 Constructors for creating DtString representations of numbers. More...
 
 DtString (char val)
 Constructors for creating DtString representations of numbers. More...
 
 DtString (unsigned int val)
 Constructors for creating DtString representations of numbers. More...
 
 DtString (unsigned long val)
 Constructors for creating DtString representations of numbers. More...
 
virtual DtStringoperator= (const char *orig)
 
virtual DtStringoperator= (const DtString &orig)
 
virtual bool caseCompare (const char *str) const
 Case-insensitive string compare. More...
 
virtual bool caseCompare (const DtString &str) const
 Case-insensitive string compare. More...
 
virtual char & operator[] (int index)
 
virtual const char & operator[] (int index) const
 
virtual bool snipFront (const char ch, bool toLastCh=false)
 Truncates everything before or after the character, including the character, respectively. More...
 
virtual bool snipBack (const char ch, bool fromFirstCh=false)
 Truncates everything before or after the character, including the character, respectively. More...
 
virtual bool chompFront ()
 Remove all whitespace at front or back of a string. More...
 
virtual bool chompBack ()
 Remove all whitespace at front or back of a string. More...
 
virtual bool operator< (const char *str) const
 
virtual bool operator> (const char *str) const
 
virtual bool operator== (const char *str) const
 
virtual bool operator!= (const char *str) const
 
virtual bool operator<= (const char *str) const
 
virtual bool operator>= (const char *str) const
 
virtual DtString operator+ (const char *str) const
 
virtual DtStringoperator+= (const char *str)
 
virtual DtStringoperator+= (const DtString &str)
 

Additional Inherited Members

- Static Public Member Functions inherited from DtString
static const DtStringnullString ()
 a Null representation of a string, which is the same as an empty string More...
 
static const DtStringnullId ()
 a Null representation of a string, which is the same as an empty string This is the same as nullString, but allows for a cross protocol DtGlobalObjectDesignator More...
 
- Protected Types inherited from DtString
enum  { theDefaultBufferSize = 64 }
 
- Protected Member Functions inherited from DtString
void clear ()
 Deletes the string, and sets the myString pointer to NULL. More...
 
void setString (const char *str)
 Set/Get for myString - char pointer that holds the string. More...
 
- Protected Attributes inherited from DtString
char myDefaultBuffer [theDefaultBufferSize]
 
char * myString
 Use this buffer if possible. More...
 
bool myStringAlloced
 &myDefaultBuffer[0], or a ptr to heap memory if needed More...
 
unsigned int myBufSize
 Does myString need to be deleted when done? More...
 
- Static Protected Attributes inherited from DtString
static const int theMaxInsertionStringSize
 current buffer size More...
 

Detailed Description

This is a collection of functions for the DtString class that includes More conversions from different types of objects WARNING: This function may be used in strange casting ways in order to get around the limitations of C++.

For this reason, no Virtual functions or variables can be included

Constructor & Destructor Documentation

DtConversionString::DtConversionString ( DtFloat64  val,
int  precision 
)
DtConversionString::DtConversionString ( DtFloat32  val,
int  precision 
)
DtConversionString::DtConversionString ( DtU8  val)
DtConversionString::DtConversionString ( DtInt64  val)
DtConversionString::DtConversionString ( DtU64  val)

Member Function Documentation

void DtConversionString::setString ( DtFloat64  val,
int  precision 
)
void DtConversionString::setString ( DtFloat32  val,
int  precision 
)

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)