|
Pakman
|
#include <LineString.h>
Public Member Functions | |
| LineString ()=default | |
| LineString (const std::string &raw_string) | |
| LineString (std::string &&raw_string) | |
| LineString (const char raw_string[]) | |
| LineString (const LineString &linestring)=default | |
| LineString (LineString &&linestring)=default | |
| LineString & | operator= (const LineString &linestring)=default |
| LineString & | operator= (LineString &&linestring)=default |
| ~LineString ()=default | |
| const std::string & | str () const |
| size_t | size () const |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const LineString &line_string) |
| std::istream & | operator<< (std::istream &in, LineString &line_string) |
A class for representing single line strings.
LineString is a class that takes a string with any number of trailing newlines, and removes them. If there are any newlines left in the string after this operation, an exception is thrown. Therefore, the only valid strings to construct from are those that have no newlines or newlines only at the end of the string.
The resulting string is accessed by the function str().
Definition at line 17 of file LineString.h.
|
default |
Default constructor does nothing.
| LineString::LineString | ( | const std::string & | raw_string | ) |
Construct from lvalue string.
| raw_string | raw lvalue string. |
Definition at line 6 of file LineString.cc.
| LineString::LineString | ( | std::string && | raw_string | ) |
Construct from rvalue string.
| raw_string | raw rvalue string. |
Definition at line 14 of file LineString.cc.
| LineString::LineString | ( | const char | raw_string[] | ) |
Construct from C-style string.
| raw_string | C-style string. |
Definition at line 22 of file LineString.cc.
|
default |
Default copy constructor.
| linestring | source LineString object. |
|
default |
Default move constructor.
| linestring | source LineString object. |
|
default |
Default destructor does nothing.
|
default |
Default copy-assignment constructor.
| linestring | source LineString object. |
|
default |
Default move-assignment constructor.
| linestring | source LineString object. |
| size_t LineString::size | ( | ) | const |
Definition at line 51 of file LineString.cc.
| const std::string & LineString::str | ( | ) | const |
Definition at line 45 of file LineString.cc.
|
friend |
Overload << operator for LineString
| out | output stream |
| line_string | line string |
Definition at line 43 of file serialisation.cc.