UT_WorkBuffer Class Reference

#include <UT_WorkBuffer.h>

List of all members.

Public Types

typedef char value_type

Public Member Functions

 UT_WorkBuffer ()
 ~UT_WorkBuffer ()
const char * buffer () const
char * lock (exint offset=0, exint reserve_bytes=0)
void release (int recomputeLength=0)
void releaseSetLength (exint new_length)
exint getAllocatedSize () const
void reserve (exint bytes=0)
char operator() (exint idx) const
int isNullTerminated () const
void strcpy (const char *src)
void strcpy (const UT_WorkBuffer &src)
void strncpy (const char *src, exint maxlen)
exint strlen () const
exint length () const
void strcat (const char *src)
void protectedStrcat (const char *str, bool force_quote=false)
void fullyProtectedStrcat (const char *str, bool force_quote=false)
void fullyProtectedBinaryStrcat (const char *str, exint size, bool force_quote=false)
void strncat (const char *src, exint len)
void strcatFirstWord (const char *src)
int strcmp (const char *src) const
int strncmp (const char *src, exint n) const
char * strdup () const
void clear ()
bool isEmpty () const
bool isstring () const
void write (exint offset, char c)
void write (exint offset, const char *src)
bool getline (istream &is)
bool getline (FILE *fp)
bool cmdGetLine (istream &is, UT_WorkArgs &args, int &line_num, const char *comment_chars="#", const char *separators=" \t\n\r")
bool cmdGetLine (UT_IStream &is, UT_WorkArgs &args, int &line_num, const char *comment_chars="#", const char *separators=" \t\n\r")
bool cmdGetLine (FILE *fp, UT_WorkArgs &args, int &line_num, const char *comment_chars="#", const char *separators=" \t\n\r")
int sprintf (const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
int int appendSprintf (const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
int int int vsprintf (const char *fmt, va_list ap)
void append (char character)
void append (exint n, char character)
void append (const char *data, exint size)
void append (const char *str)
void append (const UT_String &str)
void append (const UT_WorkBuffer &wb)
void prepend (char character)
void prepend (const char *data, exint size)
void prepend (const char *str)
void prepend (const UT_String &str)
void rewind ()
void backup (exint by_length)
void backupTo (char c)
void advance (exint by_length)
const char * findChar (char c, int occurance_number=1) const
exint count (const char *needle) const
 Count the occurrences of the text in the current string.
bool getNextToken (const char *(&string), const UT_String separators=" \t\n")
void copyIntoString (UT_String &str)
void copyIntoString (char *str, exint max_length)
std::string toStdString () const
bool stripComments (char comment_char= '#')
void removeTrailingSpaceLines ()
void lower ()
 Convert string to lower case.
void upper ()
 Convert string to upper case.
void makeIndentString (exint indent, exint tabstop=8)
 Create a string of tabs & spaces which represents the given indent.
void eraseHead (exint n)
 Remove the first n characters.
bool operator== (const char *str) const
bool operator== (const UT_String &str) const
bool operator!= (const char *str) const
bool operator!= (const UT_String &str) const

Friends

UT_API ostream & operator<< (ostream &os, const UT_WorkBuffer &buffer)


Detailed Description

Examples:

COP2/COP2_PixelAdd.C, field3d/f3d_io.C, field3d/GEO_Field3DTranslator.C, GEO/GEO_VoxelTranslator.C, ROP/ROP_Dumper.C, SIM/SNOW_Solver.C, SOP/SOP_CustomBrush.C, SOP/SOP_IKSample.C, standalone/dsmprint.C, standalone/geo2voxel.C, and VOP/VOP_CustomContext.C.

Definition at line 55 of file UT_WorkBuffer.h.


Member Typedef Documentation

Definition at line 58 of file UT_WorkBuffer.h.


Constructor & Destructor Documentation

UT_WorkBuffer::UT_WorkBuffer (  ) 

UT_WorkBuffer::~UT_WorkBuffer (  ) 


Member Function Documentation

void UT_WorkBuffer::advance ( exint  by_length  )  [inline]

Definition at line 414 of file UT_WorkBuffer.h.

void UT_WorkBuffer::append ( const UT_WorkBuffer wb  )  [inline]

Definition at line 355 of file UT_WorkBuffer.h.

void UT_WorkBuffer::append ( const UT_String str  )  [inline]

Definition at line 349 of file UT_WorkBuffer.h.

void UT_WorkBuffer::append ( const char *  str  )  [inline]

Definition at line 343 of file UT_WorkBuffer.h.

void UT_WorkBuffer::append ( const char *  data,
exint  size 
) [inline]

Definition at line 332 of file UT_WorkBuffer.h.

void UT_WorkBuffer::append ( exint  n,
char  character 
) [inline]

Definition at line 321 of file UT_WorkBuffer.h.

void UT_WorkBuffer::append ( char  character  )  [inline]

Definition at line 316 of file UT_WorkBuffer.h.

int int UT_WorkBuffer::appendSprintf ( const char *  fmt,
  ... 
)

void UT_WorkBuffer::backup ( exint  by_length  )  [inline]

Definition at line 393 of file UT_WorkBuffer.h.

void UT_WorkBuffer::backupTo ( char  c  )  [inline]

Definition at line 405 of file UT_WorkBuffer.h.

const char* UT_WorkBuffer::buffer (  )  const [inline]

void UT_WorkBuffer::clear ( void   )  [inline]

Definition at line 240 of file UT_WorkBuffer.h.

bool UT_WorkBuffer::cmdGetLine ( FILE *  fp,
UT_WorkArgs args,
int &  line_num,
const char *  comment_chars = "#",
const char *  separators = " \t\n\r" 
)

bool UT_WorkBuffer::cmdGetLine ( UT_IStream is,
UT_WorkArgs args,
int &  line_num,
const char *  comment_chars = "#",
const char *  separators = " \t\n\r" 
)

bool UT_WorkBuffer::cmdGetLine ( istream &  is,
UT_WorkArgs args,
int &  line_num,
const char *  comment_chars = "#",
const char *  separators = " \t\n\r" 
)

void UT_WorkBuffer::copyIntoString ( char *  str,
exint  max_length 
)

void UT_WorkBuffer::copyIntoString ( UT_String str  ) 

exint UT_WorkBuffer::count ( const char *  needle  )  const

Count the occurrences of the text in the current string.

void UT_WorkBuffer::eraseHead ( exint  n  )  [inline]

Remove the first n characters.

Definition at line 482 of file UT_WorkBuffer.h.

const char* UT_WorkBuffer::findChar ( char  c,
int  occurance_number = 1 
) const [inline]

Definition at line 426 of file UT_WorkBuffer.h.

void UT_WorkBuffer::fullyProtectedBinaryStrcat ( const char *  str,
exint  size,
bool  force_quote = false 
)

void UT_WorkBuffer::fullyProtectedStrcat ( const char *  str,
bool  force_quote = false 
)

exint UT_WorkBuffer::getAllocatedSize (  )  const [inline]

Definition at line 89 of file UT_WorkBuffer.h.

bool UT_WorkBuffer::getline ( FILE *  fp  ) 

bool UT_WorkBuffer::getline ( istream &  is  ) 

bool UT_WorkBuffer::getNextToken ( const char *&  string,
const UT_String  separators = " \t\n" 
)

bool UT_WorkBuffer::isEmpty (  )  const [inline]

Definition at line 247 of file UT_WorkBuffer.h.

int UT_WorkBuffer::isNullTerminated (  )  const

bool UT_WorkBuffer::isstring (  )  const [inline]

Definition at line 251 of file UT_WorkBuffer.h.

exint UT_WorkBuffer::length ( void   )  const [inline]

Examples:
SIM/SNOW_Solver.C.

Definition at line 178 of file UT_WorkBuffer.h.

char* UT_WorkBuffer::lock ( exint  offset = 0,
exint  reserve_bytes = 0 
)

Examples:
SIM/SNOW_Solver.C.

void UT_WorkBuffer::lower (  ) 

Convert string to lower case.

void UT_WorkBuffer::makeIndentString ( exint  indent,
exint  tabstop = 8 
)

Create a string of tabs & spaces which represents the given indent.

bool UT_WorkBuffer::operator!= ( const UT_String str  )  const [inline]

Comparison operator. Null strings are considered as empty strings.

Definition at line 126 of file UT_WorkBuffer.h.

bool UT_WorkBuffer::operator!= ( const char *  str  )  const [inline]

Comparison operator. Null strings are considered as empty strings.

Definition at line 122 of file UT_WorkBuffer.h.

char UT_WorkBuffer::operator() ( exint  idx  )  const [inline]

Definition at line 97 of file UT_WorkBuffer.h.

bool UT_WorkBuffer::operator== ( const UT_String str  )  const [inline]

Comparison operator. Null strings are considered as empty strings.

Definition at line 116 of file UT_WorkBuffer.h.

bool UT_WorkBuffer::operator== ( const char *  str  )  const [inline]

Comparison operator. Null strings are considered as empty strings.

Definition at line 110 of file UT_WorkBuffer.h.

void UT_WorkBuffer::prepend ( const UT_String str  )  [inline]

Definition at line 385 of file UT_WorkBuffer.h.

void UT_WorkBuffer::prepend ( const char *  str  )  [inline]

Definition at line 379 of file UT_WorkBuffer.h.

void UT_WorkBuffer::prepend ( const char *  data,
exint  size 
) [inline]

Definition at line 369 of file UT_WorkBuffer.h.

void UT_WorkBuffer::prepend ( char  character  )  [inline]

Definition at line 360 of file UT_WorkBuffer.h.

void UT_WorkBuffer::protectedStrcat ( const char *  str,
bool  force_quote = false 
)

void UT_WorkBuffer::release ( int  recomputeLength = 0  ) 

Examples:
SIM/SNOW_Solver.C.

void UT_WorkBuffer::releaseSetLength ( exint  new_length  ) 

void UT_WorkBuffer::removeTrailingSpaceLines (  ) 

void UT_WorkBuffer::reserve ( exint  bytes = 0  ) 

void UT_WorkBuffer::rewind (  )  [inline]

Definition at line 391 of file UT_WorkBuffer.h.

int UT_WorkBuffer::sprintf ( const char *  fmt,
  ... 
)

void UT_WorkBuffer::strcat ( const char *  src  )  [inline]

Definition at line 183 of file UT_WorkBuffer.h.

void UT_WorkBuffer::strcatFirstWord ( const char *  src  ) 

int UT_WorkBuffer::strcmp ( const char *  src  )  const [inline]

Definition at line 221 of file UT_WorkBuffer.h.

void UT_WorkBuffer::strcpy ( const UT_WorkBuffer src  )  [inline]

Definition at line 152 of file UT_WorkBuffer.h.

void UT_WorkBuffer::strcpy ( const char *  src  )  [inline]

Examples:
standalone/dsmprint.C, and VOP/VOP_CustomContext.C.

Definition at line 147 of file UT_WorkBuffer.h.

char* UT_WorkBuffer::strdup (  )  const [inline]

Definition at line 233 of file UT_WorkBuffer.h.

bool UT_WorkBuffer::stripComments ( char  comment_char = '#'  ) 

exint UT_WorkBuffer::strlen (  )  const [inline]

Definition at line 172 of file UT_WorkBuffer.h.

void UT_WorkBuffer::strncat ( const char *  src,
exint  len 
) [inline]

Definition at line 205 of file UT_WorkBuffer.h.

int UT_WorkBuffer::strncmp ( const char *  src,
exint  n 
) const [inline]

Definition at line 227 of file UT_WorkBuffer.h.

void UT_WorkBuffer::strncpy ( const char *  src,
exint  maxlen 
) [inline]

Definition at line 158 of file UT_WorkBuffer.h.

std::string UT_WorkBuffer::toStdString (  )  const [inline]

Definition at line 460 of file UT_WorkBuffer.h.

void UT_WorkBuffer::upper (  ) 

Convert string to upper case.

int int int UT_WorkBuffer::vsprintf ( const char *  fmt,
va_list  ap 
)

void UT_WorkBuffer::write ( exint  offset,
const char *  src 
) [inline]

Definition at line 277 of file UT_WorkBuffer.h.

void UT_WorkBuffer::write ( exint  offset,
char  c 
) [inline]

Definition at line 259 of file UT_WorkBuffer.h.


Friends And Related Function Documentation

UT_API ostream& operator<< ( ostream &  os,
const UT_WorkBuffer buffer 
) [friend]


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

Generated on Thu Jan 31 00:34:15 2013 for HDK by  doxygen 1.5.9