FRIBParallelanalysis
1.0
FrameworkforMPIParalleldataanalysisatFRIB
|
#include <TCLResult.h>
Public Member Functions | |
CTCLResult (CTCLInterpreter *pInterp, bool reset=true) | |
virtual | ~CTCLResult () |
CTCLResult (const CTCLResult &aCTCLResult) | |
CTCLResult & | operator= (const CTCLResult &aCTCLResult) |
CTCLResult & | operator= (const char *rhs) |
CTCLResult & | operator= (std::string rhs) |
int | operator== (const CTCLResult &aCTCLResult) |
int | operator!= (const CTCLResult &rhs) |
CTCLResult & | operator+= (const char *pString) |
CTCLResult & | operator+= (const std::string &rString) |
void | Clear () |
void | AppendElement (const char *pString) |
void | AppendElement (const std::string &rString) |
void | commit () const |
std::string | getString () |
![]() | |
CTCLObject (Tcl_Obj *am_pObject) | |
CTCLObject (const CTCLObject &aCTCLObject) | |
CTCLObject & | operator= (const CTCLObject &aCTCLObject) |
int | operator== (const CTCLObject &aCTCLObject) const |
Tcl_Obj * | getObject () |
const Tcl_Obj * | getObject () const |
CTCLObject & | operator= (const std::string &rSource) |
CTCLObject & | operator= (const char *pSource) |
CTCLObject & | operator= (int nSource) |
CTCLObject & | operator= (const CTCLList &rList) |
CTCLObject & | operator= (double dSource) |
CTCLObject & | operator= (Tcl_Obj *rhs) |
CTCLObject & | operator= (Tcl_WideInt rhs) |
operator std::string () | |
operator int () | |
operator CTCLList () | |
operator double () | |
CTCLObject & | operator+= (const CTCLObject &rObject) |
CTCLObject & | operator+= (int nItem) |
CTCLObject & | operator+= (const std::string &rItem) |
CTCLObject & | operator+= (const char *pItem) |
CTCLObject & | operator+= (double Item) |
CTCLObject & | operator+= (Tcl_Obj *pObj) |
CTCLObject | clone () |
CTCLObject | operator() () |
CTCLObject | getRange (int first, int last) |
CTCLObject & | concat (CTCLObject &rhs) |
std::vector< CTCLObject > | getListElements () |
CTCLObject & | setList (std::vector< CTCLObject > elements) |
int | llength () |
CTCLObject | lindex (int index) |
CTCLObject & | lreplace (int first, int count, std::vector< CTCLObject > newElements) |
![]() | |
CTCLInterpreterObject (CTCLInterpreter *pInterp) | |
CTCLInterpreterObject (const CTCLInterpreterObject &aCTCLInterpreterObject) | |
CTCLInterpreterObject & | operator= (const CTCLInterpreterObject &aCTCLInterpreterObject) |
int | operator== (const CTCLInterpreterObject &aCTCLInterpreterObject) const |
CTCLInterpreter * | getInterpreter () const |
CTCLInterpreter * | Bind (CTCLInterpreter &rBinding) |
CTCLInterpreter * | Bind (CTCLInterpreter *pBinding) |
Additional Inherited Members | |
![]() | |
void | setObject (Tcl_Obj *am_pObject) |
void | DupIfMust () |
void | NewIfMust () |
![]() | |
CTCLInterpreter * | AssertIfNotBound () |
Encapsulates an interpreter result. We derive this from a CTCLObject in order to have the full expressive power of that class when building up the result string. The idea is that at construction the interpreter result will be reset or optionally our object loaded with its current value. Command processors will produce their result string here and then either at destruction time or explicitly, we will commit our contents to the result.
CTCLResult::CTCLResult | ( | CTCLInterpreter * | pInterp, |
bool | reset = true |
||
) |
Constructs a CTCLResult... Results are always bound to an interpreter...therefore our constructor requires an interpreter.
pInterp | : CTCLInterpreter* The interpreter to which we will be bound. |
reset | : bool (true) If true, the interpreter's result is reset, otherwise our contents are loaded from the interpreter's current result value. |
|
virtual |
Destruction of a result implies commiting the contents of that result to the interpreter:
CTCLResult::CTCLResult | ( | const CTCLResult & | rhs | ) |
Copy construction: we just need to bind ourselves to the same interpreter as the rhs... commit the rhs and load ourselves with the result string.
void CTCLResult::AppendElement | ( | const char * | pString | ) |
Append a string as an element. This is the base class +=
void CTCLResult::Clear | ( | ) |
Clear the result string and the interprter result too.
void CTCLResult::commit | ( | ) | const |
Commit this to the result string:
string CTCLResult::getString | ( | ) |
Commit and returnn the string.
int CTCLResult::operator!= | ( | const CTCLResult & | rhs | ) |
inequality is just the logical negation of equality:
CTCLResult & CTCLResult::operator+= | ( | const char * | pString | ) |
+= unfortunately has already been documented to have different semantics than that of the base class.. and we really can't do anything about that without breaking a bunch-o-code. Therefore we just live with it. here += implies string append. For element append, see AppendElement.
pString | : const char* the string to add. |
*this |
CTCLResult & CTCLResult::operator= | ( | const CTCLResult & | rhs | ) |
Assign to *this from another result:
CTCLResult & CTCLResult::operator= | ( | const char * | rhs | ) |
Assign to self from const char* this is just base class function.
int CTCLResult::operator== | ( | const CTCLResult & | rhs | ) |
equality - comparisons are always true if the interpreters are the sam as there should only be a single underlying result string.