sipxportlib  Version 3.3
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
OsPathBase Class Reference

#include <OsPathBase.h>

Inheritance diagram for OsPathBase:
Inheritance graph
[legend]
Collaboration diagram for OsPathBase:
Collaboration graph
[legend]

Public Member Functions

 OsPathBase ()
 
 OsPathBase (const OsPathBase &rOsPath)
 
virtual ~OsPathBase ()
 
 OsPathBase (const UtlString &rPath)
 
 OsPathBase (const char *pPath)
 
 OsPathBase (const UtlString &rVolume, const UtlString &rDirName, const UtlString &rFileName, const UtlString &rExtension)
 
OsPathBaseoperator= (const OsPathBase &rhs)
 
OsPathBaseoperator+= (const OsPathBase &rhs)
 
void Split ()
 
UtlString getVolume () const
 
UtlString getDirName () const
 
UtlString getFilename () const
 
UtlString getExt () const
 
OsStatus getNativePath (OsPathBase &rFullPath) const
 
UtlBoolean isValid ()
 
- Public Member Functions inherited from UtlString
 UtlString ()
 Default Constructor. More...
 
 UtlString (const char *szSource)
 Constructor accepting a null terminated source string. More...
 
 UtlString (const char *szSource, size_t length)
 Constructor accepting a source string with an explicit length. More...
 
 UtlString (const UtlString &source)
 Copy the source UtlString. More...
 
 UtlString (const UtlString &source, size_t length)
 Copy an initial substring. More...
 
virtual UtlCopyableContainableclone () const
 Clone method for UtlCopyableContainable requirements. More...
 
UtlStringoperator= (const char *szStr)
 Replace the contents of this string with a null terminated string. More...
 
UtlStringoperator= (const UtlString &str)
 Replace the contents of this string with contents of a UtlString. More...
 
size_t length () const
 The current length of the string value. More...
 
const char * data () const
 Return a read-only pointer to the stored string value.. More...
 
 operator const char * () const
 Cast to a const char* - identical to the data() method. More...
 
size_t capacity () const
 Return the current capacity allocated for this string. More...
 
UtlString operator() (size_t start, size_t len) const
 Allows references of the form stringVar(start,length) - also see append. More...
 
char operator() (size_t N)
 Get the character at position N. More...
 
UtlBoolean isNull () const
 Return true if this is an empty string. More...
 
virtual int compareTo (const char *) const
 Compare this string to a null terminated string (case sensitive). More...
 
int compareTo (const char *, CompareCase type) const
 Compare this string to a null terminated string, with case sensitivity control. More...
 
int compareTo (UtlString const *, CompareCase type) const
 Compare this object to another string, with case sensitivity control. More...
 
UtlBoolean contains (const char *) const
 Check for a null terminated value in this string. More...
 
UtlBoolean operator== (const char *) const
 
UtlBoolean operator!= (const char *) const
 
UtlBoolean operator== (const UtlString &) const
 
UtlBoolean operator!= (const UtlString &) const
 
size_t index (char c) const
 Find the first instance of a single character. More...
 
size_t index (char c, size_t offset) const
 Find the first instance of a single character starting at a specified offset. More...
 
size_t first (char c) const
 Find the first instance of a single character. More...
 
size_t index (const char *) const
 Find the first instance of a null terminated string. More...
 
size_t index (const char *, size_t) const
 Find the first instance of a specified length string. More...
 
size_t index (const char *, size_t, CompareCase) const
 Find the first instance of a specified length string, with case control. More...
 
size_t index (const UtlString &) const
 Find the first match for the specified string (which may contain null characters) More...
 
size_t index (const UtlString &match, size_t offset) const
 Find a match for the specified string starting at offset. More...
 
size_t index (const UtlString &, size_t, CompareCase) const
 Find a match for the specified string starting at offset, with case sensitivity control. More...
 
size_t first (const char *) const
 Find the first instance of a null terminated string. More...
 
size_t last (char s) const
 Find the last instance of a character. More...
 
UtlStringoperator+= (const char *)
 Append a null terminated string to the end of the lvalue. More...
 
UtlStringappend (const char *szStr)
 Append a null terminated string to the end of this string. More...
 
UtlStringoperator+= (const UtlString &s)
 Append a UtlString to this string. More...
 
UtlStringappend (const UtlString &str)
 Append a UtlString to this string. More...
 
UtlStringappend (const UtlString &str, size_t position, size_t length)
 Append a substring of a UtlString to this string. More...
 
UtlStringappend (const char *szStr, size_t N)
 Append up to N bytes of the designated string to the end of this string. More...
 
UtlStringoperator+= (const char c)
 Append a single character to the end of this string. More...
 
UtlStringappend (const char c)
 Append a single character to the end of this string. More...
 
UtlStringappendFormat (const char *format,...)
 Append format string like pritnf. More...
 
UtlStringappendBinaryToString (const void *binaryData, int numBytes, int valuesPerRow=16)
 Append binary data in human readable string format. More...
 
UtlStringinsert (size_t position, const UtlString &src)
 Insert a UtlString. More...
 
UtlStringinsert (size_t position, const char newChar)
 Insert a single character. More...
 
UtlStringinsert (size_t position, const char *src)
 Insert a null terminated string. More...
 
UtlStringprepend (const char *szStr)
 Prepend a null terminated string at the beginning of this string. More...
 
UtlStringinsert (size_t position, const char *src, size_t sourceLenth)
 Insert arbitrary length value. More...
 
void replaceAt (size_t pos, char newChar)
 Replace a single character at the designated position. More...
 
UtlStringreplace (const char src, const char tgt)
 Replace all instances of character src with character tgt. More...
 
UtlStringreplace (size_t pos, size_t N, const char *replaceStr)
 Replace N characters from a char*. More...
 
UtlStringreplace (size_t pos, size_t N, const char *replaceStr, size_t L)
 Replace N characters from a char*, with specified length string. More...
 
UtlStringreplace (size_t pos, size_t N, const UtlString &replaceStr)
 Replace N characters from another UtlString. More...
 
UtlStringremove (size_t pos)
 Remove all characters after the specified position. More...
 
UtlStringremove (size_t pos, size_t N)
 Remove N characters from this string starting at designated position. More...
 
UtlString strip ()
 Removes whitespace (space, tab, Cr, Lf) from the end of the string. More...
 
UtlString strip (StripType whichEnd)
 Removes whitespace (space, tab, Cr, Lf) from either or both ends of the string. More...
 
UtlString strip (StripType whichEnd, char charToStrip)
 Removes all instances of the specified character from either or both ends of the string. More...
 
void toLower ()
 
void toUpper ()
 
size_t capacity (size_t N)
 Set the minimum capacity a string can hold without reallocation. More...
 
void resize (size_t N, UtlBoolean clearTail=TRUE)
 Set a new size for the string. More...
 
virtual unsigned hash () const
 Calculate a hash over the string contents. More...
 
virtual UtlContainableType getContainableType () const
 Determine whether or not the values in a containable are comparable. More...
 
virtual int compareTo (UtlContainable const *other) const
 Compare to any other UtlContainable. More...
 
virtual UtlBoolean isEqual (UtlContainable const *) const
 
virtual UtlBoolean isInstanceOf (const UtlContainableType type) const
 Determine if this object is a derivative of the specified UtlContainableType. More...
 
virtual ~UtlString ()
 Destructor. More...
 
- Public Member Functions inherited from UtlCopyableContainable
 UtlCopyableContainable ()
 
virtual ~UtlCopyableContainable ()
 
- Public Member Functions inherited from UtlContainable
virtual ~UtlContainable ()
 
unsigned directHash () const
 Provides a hash function that uses the object pointer as the hash value. More...
 

Static Public Member Functions

static void setSeparator (UtlString &rSeparator)
 
static UtlString getSeparator ()
 
- Static Public Member Functions inherited from UtlContainable
static unsigned stringHash (char const *value)
 Provides a hash function appropriate for null-terminated string values. More...
 
static UtlBoolean areSameTypes (const UtlContainableType type1, const UtlContainableType type2)
 Are UtlContainable types the same. More...
 

Static Public Attributes

static UtlString separator = "/"
 
- Static Public Attributes inherited from UtlString
static const UtlContainableType TYPE = "UtlString"
 
static const char * ssNull = ""
 
static const size_t UTLSTRING_NOT_FOUND = (size_t) (-1)
 Returned from a search that failed. More...
 
static const size_t UTLSTRING_TO_END = (size_t) (-1)
 
- Static Public Attributes inherited from UtlCopyableContainable
static const UtlContainableType TYPE = "UtlCopyableContainable"
 
- Static Public Attributes inherited from UtlContainable
static const UtlContainableType TYPE = "UtlContainable"
 

Protected Attributes

UtlString mDirName
 
UtlString mVolume
 
UtlString mFilename
 
UtlString mExtension
 

Additional Inherited Members

- Public Types inherited from UtlString
enum  StripType { leading =1, trailing, both }
 
enum  CompareCase { matchCase, ignoreCase }
 
typedef enum UtlString::StripType StripType
 
typedef enum UtlString::CompareCase CompareCase
 

Constructor & Destructor Documentation

OsPathBase ( const OsPathBase rOsPath)
~OsPathBase ( )
virtual
OsPathBase ( const UtlString rPath)
OsPathBase ( const char *  pPath)
OsPathBase ( const UtlString rVolume,
const UtlString rDirName,
const UtlString rFileName,
const UtlString rExtension 
)

Member Function Documentation

OsPathBase & operator= ( const OsPathBase rhs)
OsPathBase & operator+= ( const OsPathBase rhs)
void setSeparator ( UtlString rSeparator)
static
void Split ( )
UtlString getVolume ( ) const
UtlString getDirName ( ) const
UtlString getFilename ( ) const
UtlString getExt ( ) const
OsStatus getNativePath ( OsPathBase rFullPath) const
UtlString getSeparator ( )
static
UtlBoolean isValid ( )

Member Data Documentation

UtlString separator = "/"
static
UtlString mDirName
protected
UtlString mVolume
protected
UtlString mFilename
protected
UtlString mExtension
protected