Class holding a set of strings, e.g., {"rio", "de", "janeiro"}. More...
#include <opentrep/bom/StringSet.hpp>
Inheritance diagram for OPENTREP::StringSet:Public Types | |
| typedef std::list< std::string > | StringSet_T |
Public Member Functions | |
| void | push_back (const std::string &) |
| void | push_back (const StringSet &) |
| size_t | size () const |
| bool | empty () const |
| void | clear () |
| std::string | getFirstString () const |
| void | toStream (std::ostream &) const |
| void | fromStream (std::istream &) |
| std::string | describeKey () const |
| std::string | describe () const |
| StringSet () | |
| StringSet (const StringSet &) | |
| StringSet (const std::string &) | |
| ~StringSet () | |
Public Attributes | |
| StringSet_T | _set |
Class holding a set of strings, e.g., {"rio", "de", "janeiro"}.
Definition at line 19 of file StringSet.hpp.
| typedef std::list<std::string> OPENTREP::StringSet::StringSet_T |
List of strings.
Definition at line 25 of file StringSet.hpp.
| OPENTREP::StringSet::StringSet | ( | ) |
Default constructor.
Definition at line 14 of file StringSet.cpp.
| OPENTREP::StringSet::StringSet | ( | const StringSet & | iStringSet | ) |
| OPENTREP::StringSet::StringSet | ( | const std::string & | iString | ) |
| OPENTREP::StringSet::~StringSet | ( | ) |
Default destructor.
Definition at line 30 of file StringSet.cpp.
| void OPENTREP::StringSet::push_back | ( | const std::string & | iString | ) |
Add an item (string) into the list.
Definition at line 49 of file StringSet.cpp.
References _set.
Referenced by OPENTREP::StringPartition::calculateUniqueCombinations(), OPENTREP::ResultHolder::getCorrectedStringSet(), and push_back().
| void OPENTREP::StringSet::push_back | ( | const StringSet & | iStringSet | ) |
Add all the items (string) into the list.
Definition at line 54 of file StringSet.cpp.
References _set, and push_back().
| size_t OPENTREP::StringSet::size | ( | ) | const |
| bool OPENTREP::StringSet::empty | ( | ) | const |
Return whether or not the list is empty.
Definition at line 39 of file StringSet.cpp.
References _set.
Referenced by OPENTREP::StringPartition::push_back().
| void OPENTREP::StringSet::clear | ( | ) |
| std::string OPENTREP::StringSet::getFirstString | ( | ) | const |
Get the first string of the underlying list/set.
Definition at line 64 of file StringSet.cpp.
References _set.
| void OPENTREP::StringSet::toStream | ( | std::ostream & | ioOut | ) | const |
Dump the structure into an output stream.
| ostream& | the output stream. |
Definition at line 117 of file StringSet.cpp.
References describe().
|
virtual |
Read a structure from an input stream.
| istream& | the input stream. |
Reimplemented from OPENTREP::StructAbstract.
Definition at line 122 of file StringSet.cpp.
| std::string OPENTREP::StringSet::describeKey | ( | ) | const |
Get a string describing the whole key (differentiating two objects at any level).
Definition at line 81 of file StringSet.cpp.
Referenced by describe().
|
virtual |
Get the serialised version of the structure.
Implements OPENTREP::StructAbstract.
Definition at line 88 of file StringSet.cpp.
References _set, and describeKey().
Referenced by OPENTREP::searchString(), and toStream().
| StringSet_T OPENTREP::StringSet::_set |
String set, i.e., a list of strings
Definition at line 118 of file StringSet.hpp.
Referenced by OPENTREP::StringPartition::calculateUniqueCombinations(), clear(), describe(), empty(), getFirstString(), push_back(), OPENTREP::searchString(), size(), and StringSet().
1.8.6