|
DUECA/DUSIME
|
This is yet another string class, this time for strings of a fixed maximum size, and therefore a fixed storage requirement. More...
#include <Dstring.hxx>


Public Member Functions | |
| Dstring () | |
| Constructor, makes empty string. | |
| Dstring (const char *s) | |
| Constructor, copies the data from a string. | |
| Dstring (const std::string &s) | |
| Constructor from an std::string. | |
| template<int osize> | |
| Dstring (const Dstring< osize > &o) | |
| Copy constructor. | |
| Dstring (AmorphReStore &s) | |
| Construct the string from amorphous storage. | |
| Dstring & | operator= (const char *s) |
| Assignment operator. | |
| Dstring & | operator= (const std::string &o) |
| Assignment operator with string. | |
| template<int osize> | |
| Dstring & | operator= (const Dstring< osize > &o) |
| Assignment operator with a Dstring of the same or some other size. | |
| template<int osize> | |
| Dstring | operator+ (const Dstring< osize > &s) |
| Append a string to this one. | |
| Dstring | operator+ (const char *s) |
| Append a c-style string to this one. | |
| bool | operator== (const Dstring< mxsize > &o) const |
| Returns true if two strings are equal. | |
| bool | operator!= (const Dstring< mxsize > &o) const |
| Returns false if two strings are equal. | |
| bool | operator< (const Dstring< mxsize > &o) const |
| Returns true if lexically smaller than second string. | |
| bool | operator> (const Dstring< mxsize > &o) const |
| Returns true if lexically greater than second string. | |
| const char * | c_str () const |
| Get the c-string style data out. | |
| void | assign (const char *d, size_t size) |
| grab from a buffer | |
| size_t | size () const |
| Get the length of the string. | |
| constexpr size_t | max_size () const |
| Maximum size. | |
| void | resize (size_t s) |
| Resize. | |
| const char * | getData () const |
| Get direct access to the underlying data. | |
| const char * | data () const |
| Get direct access to the underlying data. | |
| const char * | begin () const |
| Pointer to the start. | |
| char * | begin () |
| Pointer to the start. | |
| const char * | end () const |
| Pointer to the end. | |
| char * | end () |
| Pointer to the end. | |
| char * | data () |
| Get direct access to the underlying data. | |
| void | packData (AmorphStore &s) const |
| Pack the string into a net-transportable format. | |
| void | unPackData (AmorphReStore &s) |
| Unpack the string from a net-transportable format. | |
| std::ostream & | print (std::ostream &os) const |
| Print to a stream. | |
| std::istream & | read (std::istream &is) |
| Read from a stream. | |
Public Attributes | |
| char | _data [mxsize] |
| The actual data, as a c-type string. | |
Additional Inherited Members | |
Protected Member Functions inherited from dueca::dstring | |
| dstring () | |
| Constructor. | |
This is yet another string class, this time for strings of a fixed maximum size, and therefore a fixed storage requirement.
|
inline |
Copy constructor.
Should be used for a brother/sister dstring of different size.
|
inline |
Append a string to this one.
Note that truncation may result.
| Dstring dueca::Dstring< mxsize >::operator+ | ( | const char * | s | ) |
Append a c-style string to this one.
Note that truncation may result.
| std::istream & dueca::Dstring< mxsize >::read | ( | std::istream & | is | ) |
Read from a stream.