|
The Vish Visualization Shell 0.3
Vish
|
#include <elementary/memcore/simplestring.hpp>
Public Member Functions | |
| char * | allocate_buffer (size_t howmany_bytes) noexcept |
| Allocate internal storage space, but don't initialize it. | |
| char * | buffer () noexcept |
| Get pointer to internal storage space. | |
| const char * | data () const noexcept |
| Get const pointer to internal storage space. | |
| operator std::string () const | |
| Convert to std::string. This could throw an exception... | |
| std::string | operator* () const |
| Convert to std::string. This could throw an exception... | |
| simplestring & | operator= (const simplestring &ss) noexcept |
| Assignment operator (copies!) | |
| simplestring (const char *s=0, size_t length=0) noexcept | |
| Constructor. | |
| simplestring (const simplestring &ss) noexcept | |
| Copy constructor (copies!) | |
| simplestring (const std::string &s) noexcept | |
| Construct from std::string. | |
| ~simplestring () noexcept | |
| Destructor. | |
A simple, slow but exception-free class to store a string within exceptions. The standard std::string class must not be used in exception classes because it might throw exceptions itself, leading to program termination. This class should not be used in normal code, only within template classes. It is convertible to std::strings.
This class does NOT do reference counting. All strings are copied.
|
noexcept |
Allocate internal storage space, but don't initialize it.
Removes anything stored here so far.