EpcTools
An event based multi-threaded C++ development framework.
Public Member Functions | List of all members
ETbcdString Class Reference

Represents an TBCD String (Telephony Binary Coded Decimal String) as defined by ITU-T Recommendation Q.825. More...

#include <eostring.h>

Inheritance diagram for ETbcdString:
EOctetString

Public Member Functions

 ETbcdString ()
 Default constructor. More...
 
 ETbcdString (size_t len)
 Class constructor. More...
 
 ETbcdString (const ETbcdString &tbcd)
 Copy constructor. More...
 
ETbcdStringoperator= (const ETbcdString &tbcd)
 Assignment operator. More...
 
EString toString () const
 Converts a TBCD string to a printable string. More...
 
size_t length () const
 Returns the length of the TBCD string. More...
 
ETbcdStringclear ()
 Clears the TBCD string setting it's length to zero. More...
 
ETbcdStringfromString (const std::string &str)
 Converts the printable string to a TBCD string. More...
 
ETbcdStringfromString (cpStr str)
 
- Public Member Functions inherited from EOctetString
 EOctetString ()
 Default constructor. More...
 
 EOctetString (size_type n)
 Class constructor. More...
 
 EOctetString (cpStr s)
 Class constructor. More...
 
 EOctetString (cpUChar data, size_type n)
 Class constructor. More...
 
 EOctetString (const EOctetString &ostr)
 Copy constructor. More...
 
 EOctetString (const EOctetString &ostr, size_type pos, size_type len=npos)
 Class constructor. Initializes this EOctetString from a subset of another EOctetString object. More...
 
 ~EOctetString ()
 Class destructor. More...
 
EOctetStringoperator= (const EOctetString &ostr)
 Assignment operator. More...
 
EOctetStringoperator= (cpStr s)
 Assignment operator. More...
 
EOctetStringoperator= (Char c)
 Assignment operator. More...
 
EOctetStringoperator= (UChar c)
 Assignment operator. More...
 
EOctetStringoperator= (EOctetString &&ostr)
 Assignment operator. Performs a move assignment. More...
 
EOctetStringoperator+= (const EOctetString &ostr)
 Append operator. More...
 
EOctetStringoperator+= (cpStr s)
 Append operator. More...
 
EOctetStringoperator+= (Char c)
 Append operator. More...
 
EOctetStringoperator+= (UChar c)
 Append operator. More...
 
bool operator== (const EOctetString &ostr) const
 Equality operator. More...
 
bool operator!= (const EOctetString &ostr) const
 Not equal operator. More...
 
bool operator< (const EOctetString &ostr) const
 Less than operator. More...
 
bool operator> (const EOctetString &ostr) const
 Greater than operator. More...
 
bool operator<= (const EOctetString &ostr) const
 Less than or equal to operator. More...
 
bool operator>= (const EOctetString &ostr) const
 Greater than or equal to operator. More...
 
bool operator== (cpStr str) const
 Equality operator. More...
 
bool operator!= (cpStr str) const
 Not equal operator. More...
 
bool operator< (cpStr str) const
 Less than operator. More...
 
bool operator> (cpStr str) const
 Greater than operator. More...
 
bool operator<= (cpStr str) const
 Less than or equal to operator. More...
 
bool operator>= (cpStr str) const
 Greater than or equal to operator. More...
 
EOctetStringappend (const EOctetString &ostr)
 Appends to this object. More...
 
EOctetStringappend (const EOctetString &ostr, size_type subpos, size_type sublen)
 Appends to this object. More...
 
EOctetStringappend (cpStr s)
 Appends to this object. More...
 
EOctetStringappend (cpStr s, size_type n)
 Appends to this object. More...
 
EOctetStringappend (cUChar c)
 Appends to this object. More...
 
EOctetStringappend (cpUChar data, size_type n)
 Appends to this object. More...
 
EOctetStringappend (size_type n, UChar c)
 Appends to this object. More...
 
EOctetStringassign (const EOctetString &ostr)
 Assigns the specified value to this object. More...
 
EOctetStringassign (const EOctetString &ostr, size_type subpos, size_type sublen)
 Assigns the specified value to this object. More...
 
EOctetStringassign (cpStr s)
 Assigns the specified value to this object. More...
 
EOctetStringassign (cpChar s, size_type n)
 Assigns the specified value to this object. More...
 
EOctetStringassign (cpUChar data, size_type n)
 Assigns the specified value to this object. More...
 
EOctetStringassign (size_type n, UChar c)
 Assigns the specified value to this object. More...
 
EOctetStringassign (EOctetString &&ostr)
 Assign the specified value to this object using move semantics. More...
 
UChar & at (size_type pos)
 Returns a reference to the data at the specified offset. More...
 
cUChar & at (size_type pos) const
 Returns a constant reference to the data at the specified offset. More...
 
UChar & back ()
 Returns a reference to the element at the end of the buffer. More...
 
cUChar & back () const
 Returns a constant reference to the element at the end of the buffer. More...
 
size_type capacity () const
 Returns the size of the currently allocated internal buffer. More...
 
Void clear ()
 Sets the internal buffer to all NULL's and sets the length to zero. More...
 
Int compare (const EOctetString &ostr) const
 Compares two EOctetString objects. More...
 
Int compare (size_type pos, size_type len, const EOctetString &ostr) const
 Compares a subset of the supplied EOctetString to this object. More...
 
Int compare (size_type pos, size_type len, const EOctetString &ostr, size_type subpos, size_type sublen) const
 Compares a subset of the supplied EOctetString to this object. More...
 
Int compare (cpStr s) const
 Compares the supplied NULL terminated string to this object. More...
 
Int compare (cpUChar data, size_type n) const
 Compares the supplied buffer to this object. More...
 
Int compare (size_type pos, size_type len, cpStr s) const
 Compares a NULL terminated string to this object starting at the supplied offset. More...
 
Int compare (size_type pos, size_type len, cpStr s, size_type n) const
 Compares a NULL terminated string to this object starting at the supplied offset. More...
 
Int compare (size_type pos, size_type len, cpUChar data, size_type n) const
 Compares buffer to this object starting at the supplied offset. More...
 
size_type copy (pUChar dst, size_type len, size_type pos=0) const
 Copies data from this object to the supplied buffer. More...
 
cpUChar data () const
 Returns a pointer to the internal data buffer. More...
 
Bool empty () const
 Returns whether this object is empty. More...
 
EOctetStringerase (size_type pos=0, size_type len=npos)
 Erases the specified number of bytes. Supports erasing bytes from the middle of the octet string. More...
 
Void pop_back ()
 Removes the last byte. More...
 
Void reserve (size_type n=0)
 Sets the internal buffer size to the specified value and reallocates the buffer if necessary. More...
 
void shrink_to_fit ()
 reduces the capacity of the buffer to match it's current length. More...
 
UChar & operator[] (size_type pos)
 Array index operator. Returns a reference to the specified array member. More...
 
cUChar & operator[] (size_type pos) const
 
size_type length () const
 Returns the length of the assigned value of this object. More...
 
size_type size () const
 
Void push_back (Char c)
 Appends the specified value to the end of the octet string. More...
 
Void push_back (UChar c)
 
Void resize (size_type n, Char c)
 Resizes the buffer to the specified and fills the "new" space with the specified value. More...
 
Void resize (size_type n, UChar c=0)
 

Additional Inherited Members

- Public Types inherited from EOctetString
typedef size_t size_type
 
- Static Public Attributes inherited from EOctetString
static const size_type npos { std::string::npos }
 

Detailed Description

Represents an TBCD String (Telephony Binary Coded Decimal String) as defined by ITU-T Recommendation Q.825.

Constructor & Destructor Documentation

ETbcdString::ETbcdString ( )
inline

Default constructor.

ETbcdString::ETbcdString ( size_t  len)
inline

Class constructor.

Parameters
lenthe initial length of the TBCD string.
ETbcdString::ETbcdString ( const ETbcdString tbcd)
inline

Copy constructor.

Parameters
tbcda reference to the ETbcdString object to copy.

Member Function Documentation

ETbcdString& ETbcdString::clear ( )
inline

Clears the TBCD string setting it's length to zero.

Returns
a reference to this object.
ETbcdString& ETbcdString::fromString ( const std::string &  str)
inline

Converts the printable string to a TBCD string.

Parameters
strthe string to convert.
Returns
a reference to this object.
ETbcdString& ETbcdString::fromString ( cpStr  str)
inline
size_t ETbcdString::length ( ) const
inline

Returns the length of the TBCD string.

Returns
the length of the TBCD string.
ETbcdString& ETbcdString::operator= ( const ETbcdString tbcd)
inline

Assignment operator.

Parameters
tbcda reference to the ETbcdString object to copy.
EString ETbcdString::toString ( ) const
inline

Converts a TBCD string to a printable string.

Returns
the printable string.

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