FRIBParallelanalysis  1.0
FrameworkforMPIParalleldataanalysisatFRIB
TCLResult.h
1 /*
2  This software is Copyright by the Board of Trustees of Michigan
3  State University (c) Copyright 2005.
4 
5  You may use this software under the terms of the GNU public license
6  (GPL). The terms of this license are described at:
7 
8  http://www.gnu.org/licenses/gpl.txt
9 
10  Author:
11  Ron Fox
12  NSCL
13  Michigan State University
14  East Lansing, MI 48824-1321
15 */
16 
17 // CTCLResult.h:
18 //
19 // This file defines the CTCLResult class.
20 //
21 // Author:
22 // Ron Fox
23 // NSCL
24 // Michigan State University
25 // East Lansing, MI 48824-1321
26 // mailto:fox@nscl.msu.edu
27 //
28 // Copyright 1999 NSCL, All Rights Reserved.
29 //
31 
32 #ifndef TCLRESULT_H //Required for current class
33 #define TCLRESULT_H
34  //Required for base classes
35 #ifndef TCLOBJECT_H
36 #include "TCLObject.h"
37 #endif
38 
39 #ifndef TCLSTRING_H
40 #include "TCLString.h"
41 #endif
42 
43 #include <string>
44 
45 
55 class CTCLResult : public CTCLObject
56 {
57 
58 public:
59  // Constructors and other canonicals
60 
61  CTCLResult (CTCLInterpreter* pInterp, bool reset=true );
62  virtual ~CTCLResult ( );
63  CTCLResult (const CTCLResult& aCTCLResult );
64  CTCLResult& operator= (const CTCLResult& aCTCLResult);
65  CTCLResult& operator= (const char* rhs);
66  CTCLResult& operator=(std::string rhs) {
67  return operator=(rhs.c_str());
68  }
69 
70  //Operator== Equality Operator
71 
72  int operator== (const CTCLResult& aCTCLResult) ;
73  int operator!= (const CTCLResult& rhs);
74 
75 
76 
77 
78 
79 
80 public:
81  // These are semantically different than in the base class.
82  // This is >BAD< but we're stuck with it at this time.
83 
84  CTCLResult& operator+= (const char* pString);
85  CTCLResult& operator+= (const std::string& rString) {
86  return operator+=(rString.c_str());
87  }
88 
89 
90  // Named object operations:
91 
92 public:
93  void Clear () ;
94  void AppendElement (const char* pString) ; // Base class +=
95  void AppendElement (const std::string& rString); // Base class +=
96  void commit() const; // Commit this -> Result.
97  std::string getString(); // Commit and return the result.
98 
99 
100 };
101 
102 
103 #endif
int operator==(const CTCLResult &aCTCLResult)
Definition: TCLResult.cpp:127
CTCLResult & operator+=(const char *pString)
Definition: TCLResult.cpp:154
Definition: TCLInterpreter.h:59
std::string getString()
Definition: TCLResult.cpp:204
int operator!=(const CTCLResult &rhs)
Definition: TCLResult.cpp:136
void commit() const
Definition: TCLResult.cpp:193
Definition: TCLResult.h:55
CTCLResult & operator=(const CTCLResult &aCTCLResult)
Definition: TCLResult.cpp:102
void Clear()
Definition: TCLResult.cpp:165
CTCLResult(CTCLInterpreter *pInterp, bool reset=true)
Definition: TCLResult.cpp:62
Definition: TCLObject.h:50
virtual ~CTCLResult()
Definition: TCLResult.cpp:78
void AppendElement(const char *pString)
Definition: TCLResult.cpp:175