ell::SPC_Outstream Class Reference
#include <StatePairCollector.hh>
Inheritance diagram for ell::SPC_Outstream:
Detailed Description
This class counts the number of State pairs added to the collector and print each to stream.A pair (s1,s2) is written by "s1->toString()+separator+s2->toString()+toAppend"
Definition at line 209 of file StatePairCollector.hh.
Public Types | |
typedef std::pair< const State *, const State * > | StatePair |
Public Member Functions | |
virtual void | add (const StatePair &s)=0 |
virtual void | add (const State *const s1, const State *const s2) |
virtual void | add (const StatePair &s) |
virtual const StatePair | getLastAdded () const |
virtual size_t | size () const |
SPC_Outstream (std::ostream &out, const std::string &separator, const std::string &toAppend) | |
virtual | ~SPC_Outstream () |
Protected Member Functions | |
void | clearLastAdded () |
void | printToStream () |
Protected Attributes | |
State * | lastAdded_s1 |
State * | lastAdded_s2 |
std::ostream & | out |
size_t | statePairCount |
const std::string | strAppend |
const std::string | strSep |
Member Typedef Documentation
typedef std::pair<const State*,const State*> ell::StatePairCollector::StatePair [inherited] |
Constructor & Destructor Documentation
ell::SPC_Outstream::SPC_Outstream | ( | std::ostream & | out, | |
const std::string & | separator, | |||
const std::string & | toAppend | |||
) |
Construction.
- Parameters:
-
out the stream to write to separator the string to use as separator BETWEEN the states of the pair toAppend the string to write AFTER the pair to stream as a separator between printed pairs
Definition at line 143 of file StatePairCollector.cc.
ell::SPC_Outstream::~SPC_Outstream | ( | ) | [virtual] |
Definition at line 153 of file StatePairCollector.cc.
Member Function Documentation
virtual void ell::StatePairCollector::add | ( | const StatePair & | s | ) | [pure virtual, inherited] |
Increments State pair counter and stores this pair as the last added.
Reimplemented from ell::SPC_Counting.
Definition at line 172 of file StatePairCollector.cc.
void ell::SPC_Outstream::add | ( | const StatePair & | s | ) | [virtual] |
Increments State pair counter and stores a copy this pair as the last added.
- Parameters:
-
s the State pair to add
Reimplemented from ell::SPC_Counting.
Definition at line 162 of file StatePairCollector.cc.
void ell::SPC_Counting::clearLastAdded | ( | ) | [inline, protected, inherited] |
const SPC_Counting::StatePair ell::SPC_Counting::getLastAdded | ( | ) | const [virtual, inherited] |
Returns last added State pair. Note: The pointed States will be deleted when the collector is destroyed. So a cloning is needed in case the pair will be needed later.
- Returns:
- last added State pair
Implements ell::StatePairCollector.
Definition at line 61 of file StatePairCollector.cc.
void ell::SPC_Outstream::printToStream | ( | ) | [inline, protected] |
size_t ell::SPC_Counting::size | ( | ) | const [virtual, inherited] |
Returns number of added State pairs.
- Returns:
- the number of added state pairs
Implements ell::StatePairCollector.
Definition at line 54 of file StatePairCollector.cc.
Field Documentation
State* ell::SPC_Counting::lastAdded_s1 [protected, inherited] |
State* ell::SPC_Counting::lastAdded_s2 [protected, inherited] |
std::ostream& ell::SPC_Outstream::out [protected] |
size_t ell::SPC_Counting::statePairCount [protected, inherited] |
const std::string ell::SPC_Outstream::strAppend [protected] |
additional string written to stream AFTER the state pair
Definition at line 219 of file StatePairCollector.hh.
const std::string ell::SPC_Outstream::strSep [protected] |
additional string written to stream BETWEEN the states of the pair
Definition at line 216 of file StatePairCollector.hh.
The documentation for this class was generated from the following files:
- src/ell/StatePairCollector.hh
- src/ell/StatePairCollector.cc