Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

vuString Class Reference

A string class for the volume tree that's lightweight and doesn't conflict with wxWindows or the standard library. More...

#include <vuString.h>

Collaboration diagram for vuString:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuString ()
 Creates an empty vuString.
 vuString (char c)
 Creates a one character vuString.
 vuString (const char *s)
 Creates a vuString holding the given c string.
 vuString (int i)
 Creates a vuString representing the integer.
 vuString (long l)
 Creates a vuString representing the long.
 vuString (unsigned long ul)
 Creates a vuString represeting the unsinged long.
 vuString (const vuString &s)
 The copy constructor.
 ~vuString ()
 The destructor.
dword getLength (void) const
 Returns the length of the vuString.
bool isEmpty () const
 Returns true if the string is empty.
bool hasPrefix (const vuString &prefix) const
 Returns true if the string has the prefix. -ms-.
bool hasSuffix (const vuString &suffix) const
 Returns true if the string has the suffix. -ms-.
vuStringempty (void)
 Empties the string and sets it to zero length.
vuString getLastPathComponent () const
 returns the last path component, e.g.
vuString getPathExtension () const
 returns the path extension, e.g.
int compare (const vuString &s) const
 The equivalent of the strcmp() c function for the vuStrings class.
vuString substr (dword start, dword end) const
 Returns a substring of the instance.
vuStringoperator= (const vuString &rhs)
 Assignment operator.
vuString operator+ (const vuString &rhs) const
 Returns a new vuString with the two strings concatenated.
vuStringoperator+= (const vuString &rhs)
 Appends the right hand side to the vuString instance.
vuStringoperator<< (const vuString &rhs)
 Appends the right hand side to the vuString instance.
char & operator[] (dword index)
 Returns a reference to the chosen character in the string.
char operator[] (dword index) const
 Returns the chosen character in the string.
bool operator== (const vuString &rhs) const
 equivalence operator,
bool operator!= (const vuString &rhs) const
 inequality operator,
bool operator< (const vuString &rhs) const
 Less than operator,.
bool operator> (const vuString &rhs) const
 greater than operator,
bool operator<= (const vuString &rhs) const
 less than or equivalent operator,
bool operator>= (const vuString &rhs) const
 greater than or equivalent operator,
vuStringoperator= (const char *rhs)
 Assignment operator for c strings.
vuString operator+ (const char *rhs) const
 Returns a new vuString with the c string concatenated to the end of the instance.
vuStringoperator+= (const char *rhs)
 Appends the cstring to the instance.
vuStringoperator<< (const char *rhs)
 Appends the cstring to the instance.
bool operator== (const char *rhs) const
 Equivalence operator,.
bool operator!= (const char *rhs) const
 Inequivalence operator,.
bool operator< (const char *rhs) const
 Less than operator,.
bool operator> (const char *rhs) const
 Greater than operator,.
bool operator<= (const char *rhs) const
 Less than equivalence,.
bool operator>= (const char *rhs) const
 Greater than or equal to operator,.
 operator const char * () const
 implicit conversion to C string
const char * c_str () const
 explicit conversion to C string (use this with printf()!)

Private Attributes

char * m_Data
 This is the buffer that stores the string.

Friends

ostream & operator<< (ostream &in, const vuString &rhs)
 This extract the data in this and puts it into the returned stream.
vuString operator+ (const char *str, const vuString &rhs)
 Addition Operator,.

Detailed Description

A string class for the volume tree that's lightweight and doesn't conflict with wxWindows or the standard library.

Definition at line 12 of file vuString.h.


Constructor & Destructor Documentation

vuString::vuString  ) 
 

Creates an empty vuString.

Definition at line 7 of file vuString.cpp.

References m_Data.

vuString::vuString char  c  ) 
 

Creates a one character vuString.

Definition at line 13 of file vuString.cpp.

References m_Data.

vuString::vuString const char *  s  ) 
 

Creates a vuString holding the given c string.

Definition at line 20 of file vuString.cpp.

References m_Data.

vuString::vuString int  i  ) 
 

Creates a vuString representing the integer.

Definition at line 34 of file vuString.cpp.

References m_Data.

vuString::vuString long  l  ) 
 

Creates a vuString representing the long.

Definition at line 43 of file vuString.cpp.

References m_Data.

vuString::vuString unsigned long  ul  ) 
 

Creates a vuString represeting the unsinged long.

Definition at line 52 of file vuString.cpp.

References m_Data.

vuString::vuString const vuString s  ) 
 

The copy constructor.

Definition at line 61 of file vuString.cpp.

References m_Data.

vuString::~vuString  ) 
 

The destructor.

Definition at line 67 of file vuString.cpp.


Member Function Documentation

const char* vuString::c_str  )  const [inline]
 

explicit conversion to C string (use this with printf()!)

Definition at line 155 of file vuString.h.

Referenced by vuSimpleFBR< SIZE, TYPE >::_updateSliceFilter(), vuCommandLineTool::fileExists(), vuCommandLineTool::floatForParameter(), vu111::getDataName(), vu161::getDataName(), vu171::getDataName(), vu151::getDataName(), vu1::getErrorMessage(), vuLightfieldFile::getFileName(), vu1::getFileName(), vu1::getHeader(), vuStandardFVR< SIZE >::init(), vuSphericRevolver< SIZE, TYPE >::init(), vuSphericIBR< SIZE, TYPE >::init(), vuSimpleFBR< SIZE, TYPE >::init(), init(), vuCommandLineTool::intForParameter(), vuSimpleFVRDialog::OnButtonLoadFile(), vuLightfieldFile::open(), vuFVR::setTitle(), vu1::write(), vu1611< SIZE, TYPE >::write(), vu11122::write(), vu11121::write(), vu15121::write(), vuGuiParser::WriteData(), vuFourierVolume< S >::writeFourierToFile(), and vu1712< SIZE >::writeHeader().

int vuString::compare const vuString s  )  const
 

The equivalent of the strcmp() c function for the vuStrings class.

Definition at line 89 of file vuString.cpp.

References m_Data.

Referenced by vuVHImage::loadSlice().

vuString & vuString::empty void   ) 
 

Empties the string and sets it to zero length.

Returns:
A reference to the current instance.

Definition at line 82 of file vuString.cpp.

Referenced by vu1::close().

vuString vuString::getLastPathComponent  )  const
 

returns the last path component, e.g.

'/etc/host.conf' -> 'host.conf' -ms-

Definition at line 299 of file vuString.cpp.

References dword, getLength(), m_Data, and substr().

Referenced by FourierSlicer< SIZE >::FourierSlicer(), vuSimpleFVRDialog::OnButtonLoadFile(), vuCommandLineTool::toolName(), and vuFourierVolume< S >::writeFourierToFile().

Here is the call graph for this function:

dword vuString::getLength void   )  const
 

Returns the length of the vuString.

Definition at line 72 of file vuString.cpp.

References dword, and m_Data.

Referenced by _isConverterAvailable(), vuFileHelper::getFileType(), getLastPathComponent(), getPathExtension(), hasPrefix(), hasSuffix(), vuVHImage::loadSlice(), vu1::read(), vuCommandLineTool::stringForParameter(), stripExt(), substr(), vuFourierClusterN< SIZE, TYPE >::writeFourierToFile(), and vuFourierClusterN< SIZE, TYPE >::writeSpatialVolume().

vuString vuString::getPathExtension  )  const
 

returns the path extension, e.g.

'/etc/host.conf' -> 'conf' '/etc/fstab' -> '' (empty string) -ms-

Definition at line 312 of file vuString.cpp.

References dword, getLength(), m_Data, and substr().

Here is the call graph for this function:

bool vuString::hasPrefix const vuString prefix  )  const
 

Returns true if the string has the prefix. -ms-.

Definition at line 275 of file vuString.cpp.

References dword, getLength(), and m_Data.

Referenced by _isConverterAvailable(), vuStandardFVR< SIZE >::addBottom(), vuSimpleFBR< SIZE, TYPE >::addRight(), vuCommandLineTool::indexForParamter(), vuCommandLineTool::numberOfNonParameters(), and vuCommandLineTool::stringForParameter().

Here is the call graph for this function:

bool vuString::hasSuffix const vuString suffix  )  const
 

Returns true if the string has the suffix. -ms-.

Definition at line 286 of file vuString.cpp.

References dword, getLength(), and m_Data.

Referenced by vuFourierClusterN< SIZE, TYPE >::writeFourierToFile(), and vuFourierClusterN< SIZE, TYPE >::writeSpatialVolume().

Here is the call graph for this function:

bool vuString::isEmpty  )  const
 

Returns true if the string is empty.

Definition at line 77 of file vuString.cpp.

References m_Data.

Referenced by _parseParameters(), FourierSlicer< SIZE >::FourierSlicer(), vuFourierVolume_IO< S >::getSpatialDataFromVUF(), vuCommandLineTool::indexForParamter(), init(), loadTFuncFromFile(), main(), vuLightfieldFile::open(), vu1712_1< SIZE >::read(), vu1611< SIZE, TYPE >::read(), vu11122::read(), vu11121::read(), vu15121::read(), vuSphericLightfieldFile< SIZE, TYPE >::readHeader(), substr(), vu1::write(), vu1712_1< SIZE >::write(), vu1611< SIZE, TYPE >::write(), vu11122::write(), vu11121::write(), vu15121::write(), vuLightfieldFile::writeHeader(), and vu1712< SIZE >::writeHeader().

vuString::operator const char *  )  const [inline]
 

implicit conversion to C string

Definition at line 153 of file vuString.h.

bool vuString::operator!= const char *  rhs  )  const
 

Inequivalence operator,.

This returns true if the two strings are not equivalent otherwise.

Definition at line 236 of file vuString.cpp.

References m_Data.

bool vuString::operator!= const vuString rhs  )  const
 

inequality operator,

this returns true if the two strings are equivalent. otherwise, it returns false.

Definition at line 170 of file vuString.cpp.

References m_Data.

vuString vuString::operator+ const char *  rhs  )  const
 

Returns a new vuString with the c string concatenated to the end of the instance.

Definition at line 205 of file vuString.cpp.

vuString vuString::operator+ const vuString rhs  )  const
 

Returns a new vuString with the two strings concatenated.

Definition at line 139 of file vuString.cpp.

vuString & vuString::operator+= const char *  rhs  ) 
 

Appends the cstring to the instance.

Definition at line 213 of file vuString.cpp.

References m_Data.

vuString & vuString::operator+= const vuString rhs  ) 
 

Appends the right hand side to the vuString instance.

Definition at line 147 of file vuString.cpp.

References m_Data.

bool vuString::operator< const char *  rhs  )  const
 

Less than operator,.

This returns true if this string is less than rhs (in the ASCII sense, and false otherwise.

Definition at line 241 of file vuString.cpp.

References m_Data.

bool vuString::operator< const vuString rhs  )  const
 

Less than operator,.

This returns true if rhs is greater than this, alphabetically speaking in ASCII, and false otherwise.

Definition at line 175 of file vuString.cpp.

References m_Data.

vuString & vuString::operator<< const char *  rhs  ) 
 

Appends the cstring to the instance.

Definition at line 225 of file vuString.cpp.

vuString & vuString::operator<< const vuString rhs  ) 
 

Appends the right hand side to the vuString instance.

Definition at line 159 of file vuString.cpp.

bool vuString::operator<= const char *  rhs  )  const
 

Less than equivalence,.

This returns true if this string is less than rhs or equal to, in the ASCII sense.

Definition at line 251 of file vuString.cpp.

References m_Data.

bool vuString::operator<= const vuString rhs  )  const
 

less than or equivalent operator,

This returns true if rhs is greater than or equal to this, alphabetically speaking, in ASCII, and false otherwise.

Definition at line 185 of file vuString.cpp.

References m_Data.

vuString & vuString::operator= const char *  rhs  ) 
 

Assignment operator for c strings.

Definition at line 195 of file vuString.cpp.

References m_Data.

vuString & vuString::operator= const vuString rhs  ) 
 

Assignment operator.

Definition at line 116 of file vuString.cpp.

References m_Data.

bool vuString::operator== const char *  rhs  )  const
 

Equivalence operator,.

This returns true if the two strings are equivalent otherwise.

Definition at line 231 of file vuString.cpp.

References m_Data.

bool vuString::operator== const vuString rhs  )  const
 

equivalence operator,

this returns true if the two strings are equivalent. otherwise it returns false.

Definition at line 165 of file vuString.cpp.

References m_Data.

bool vuString::operator> const char *  rhs  )  const
 

Greater than operator,.

This returns true if this string is greater than rhs, in the ASCII comparison sense.

Definition at line 246 of file vuString.cpp.

References m_Data.

bool vuString::operator> const vuString rhs  )  const
 

greater than operator,

This returns true if rhs is less than this, alphabetically speaking in ASCII, and false otherwise.

Definition at line 180 of file vuString.cpp.

References m_Data.

bool vuString::operator>= const char *  rhs  )  const
 

Greater than or equal to operator,.

This returns true if this string is greater than or equal to int the ASCII sense.

Definition at line 256 of file vuString.cpp.

References m_Data.

bool vuString::operator>= const vuString rhs  )  const
 

greater than or equivalent operator,

This returns true is the rhs is less than or equal to this, alphabetically speaking, in ASCII, and false otherwise.

Definition at line 190 of file vuString.cpp.

References m_Data.

char vuString::operator[] dword  index  )  const
 

Returns the chosen character in the string.

Definition at line 134 of file vuString.cpp.

References dword, and m_Data.

char & vuString::operator[] dword  index  ) 
 

Returns a reference to the chosen character in the string.

Definition at line 129 of file vuString.cpp.

References dword, and m_Data.

vuString vuString::substr dword  start,
dword  end
const
 

Returns a substring of the instance.

Definition at line 94 of file vuString.cpp.

References dword, getLength(), isEmpty(), and m_Data.

Referenced by getLastPathComponent(), getPathExtension(), vuVHImage::loadSlice(), vuCommandLineTool::stringForParameter(), stripExt(), vuFourierClusterN< SIZE, TYPE >::writeFourierToFile(), and vuFourierClusterN< SIZE, TYPE >::writeSpatialVolume().

Here is the call graph for this function:


Friends And Related Function Documentation

vuString operator+ const char *  str,
const vuString rhs
[friend]
 

Addition Operator,.

This concatenates the two strings together and returns the concatentated string.

Definition at line 267 of file vuString.cpp.

ostream& operator<< ostream &  in,
const vuString rhs
[friend]
 

This extract the data in this and puts it into the returned stream.

Definition at line 261 of file vuString.cpp.


Member Data Documentation

char* vuString::m_Data [private]
 

This is the buffer that stores the string.

Definition at line 165 of file vuString.h.

Referenced by compare(), getLastPathComponent(), getLength(), getPathExtension(), hasPrefix(), hasSuffix(), isEmpty(), operator!=(), operator+=(), operator<(), operator<<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), operator[](), substr(), and vuString().


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:22:06 2004 for vuVolume by  doxygen 1.3.9.1