AURobotServers  4
Public Member Functions | Protected Attributes | List of all members
UDataString Class Reference

#include <udatabase.h>

Inheritance diagram for UDataString:
Inheritance graph

Public Member Functions

virtual const char * getDataType ()
 
char * getStr ()
 
int getStrCnt ()
 
virtual bool isAlsoA (const char *typeString)
 
char * makeString (int length)
 
char * makeString (const char *source)
 
void setStr (char *toStr, const int toStrCnt)
 
virtual void snprint (const char *preString, char *buff, const int buffCnt)
 
 UDataString ()
 
virtual ~UDataString ()
 
- Public Member Functions inherited from UDataBase
bool isA (const char *typeString)
 
 UDataBase ()
 
virtual ~UDataBase ()
 

Protected Attributes

char * str
 
bool strAlloc
 
int strCnt
 

Constructor & Destructor Documentation

UDataString::UDataString ( )

Constructor

UDataString::~UDataString ( )
virtual

Destructor

Member Function Documentation

virtual const char* UDataString::getDataType ( )
inlinevirtual

Get (end) type of this structure

Reimplemented from UDataBase.

References UDataBase::isAlsoA().

Referenced by UFunctionVarPool::initCallReturnStructType(), and isAlsoA().

char* UDataString::getStr ( )
inline

Get string (buffer) - may be NULL.

int UDataString::getStrCnt ( )
inline

Get string (buffer) length

bool UDataString::isAlsoA ( const char *  typeString)
virtual

Function to test if the class or one of its ancestors is of a specific type

Reimplemented from UDataBase.

References getDataType(), and UDataBase::isAlsoA().

char * UDataString::makeString ( int  length)

Allocate string space on heap. Returns pointer to new string. The string will be freed when a new string is allocated or assigned.

Referenced by UResSmrCtl::methodCall().

char * UDataString::makeString ( const char *  source)

Allocate string space on heap and copy the source string data. Returns pointer to new string. The string will be freed when a new string is allocated or assigned.

void UDataString::setStr ( char *  toStr,
const int  toStrCnt 
)
inline

Set string buffer

Referenced by UResSmrCtl::methodCall().

virtual void UDataString::snprint ( const char *  preString,
char *  buff,
const int  buffCnt 
)
inlinevirtual

Print status for this structure

Reimplemented from UDataBase.

Member Data Documentation

char* UDataString::str
protected

Pointer to a string buffer

bool UDataString::strAlloc
protected

Is string allocated - and thus must be freed

int UDataString::strCnt
protected

Length of string buffer


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