#include <stlsoft/util/exception_string.hpp>
Member Types | |
| typedef char | char_type |
| The character type. | |
| typedef stlsoft_char_traits < char_type > | traits_type |
| The traits type. | |
| typedef allocator_selector < char_type >::allocator_type | allocator_type |
| The allocator type. | |
| typedef exception_string | class_type |
| This type. | |
| typedef size_t | size_type |
| The size type. | |
Public Member Functions | |
Construction | |
| exception_string () | |
| Constructs an empty exception. | |
| exception_string (char_type const *message) | |
| Constructs an exception from the given message. | |
| exception_string (char_type const *message, size_type len) | |
| Constructs an exception from the given message, to the given length. | |
| exception_string (class_type const &rhs) | |
| Copies the message from the given instance. | |
| void | operator+= (char_type const *s) |
| Appends the given string to the message. | |
| void | operator+= (class_type const &rhs) |
| Appends the given string to the message. | |
| void | operator+= (char_type ch) |
| Appends the given character to the message. | |
| void | truncate (size_type n) |
| Truncates the string to the given length. | |
Attributes | |
| char_type const * | c_str () const |
| Returns a null-terminated c-style string string representing the message. | |
| char_type const * | data () const |
| Returns a null-terminated c-style string string representing the message. | |
| size_type | length () const |
| Returns the number of characters in the message. | |
| size_type | size () const |
| Returns the number of characters in the message. | |
| bool | empty () const |
| Indicates whether or not the message is blank. | |
| typedef stlsoft_char_traits<char_type> traits_type |
The traits type.
The allocator type.
| typedef exception_string class_type |
This type.
| exception_string | ( | ) | [inline] |
Constructs an empty exception.
| exception_string | ( | char_type const * | message | ) | [inline, explicit] |
| exception_string | ( | char_type const * | message, | |
| size_type | len | |||
| ) | [inline] |
Constructs an exception from the given message, to the given length.
References stlsoft_char_traits::copy().
| exception_string | ( | class_type const & | rhs | ) | [inline] |
Copies the message from the given instance.
References stlsoft_char_traits::copy(), and exception_string::m_message.
| void operator+= | ( | char_type const * | s | ) | [inline] |
Appends the given string to the message.
References stlsoft_char_traits::copy(), exception_string::length(), and stlsoft_char_traits::length().
| void operator+= | ( | class_type const & | rhs | ) | [inline] |
Appends the given string to the message.
References exception_string::c_str(), stlsoft_char_traits::copy(), and exception_string::length().
| void operator+= | ( | char_type | ch | ) | [inline] |
Appends the given character to the message.
References stlsoft_char_traits::copy(), and exception_string::length().
| void truncate | ( | size_type | n | ) | [inline] |
Truncates the string to the given length.
| n | The length to which the string's contents will be truncated |
| char_type const* c_str | ( | ) | const [inline] |
Returns a null-terminated c-style string string representing the message.
References exception_string::data().
Referenced by exception_string::operator+=().
| char_type const* data | ( | ) | const [inline] |
Returns a null-terminated c-style string string representing the message.
Referenced by exception_string::c_str().
| size_type length | ( | ) | const [inline] |
Returns the number of characters in the message.
References exception_string::size().
Referenced by exception_string::empty(), and exception_string::operator+=().
| size_type size | ( | ) | const [inline] |
Returns the number of characters in the message.
References STLSOFT_ASSERT.
Referenced by exception_string::length().
| bool empty | ( | ) | const [inline] |
1.5.6