All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HistoryObj.cpp
Go to the documentation of this file.
1 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiKernel/src/Lib/HistoryObj.cpp,v 1.1 2004/07/14 18:13:58 leggett Exp $
2 //====================================================================
3 // History.cpp
4 //--------------------------------------------------------------------
5 //
6 // Description: Implementation of HistoryObj base class
7 //
8 // Author : Charles Leggett
9 //====================================================================
10 
11 #define GAUDIKERNEL_HISTORYOBJ_CPP
12 
13 #include "GaudiKernel/HistoryObj.h"
14 #include "GaudiKernel/Property.h"
15 
16 using namespace std;
17 
18 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
19 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
20 
22 {
23 
24 }
25 
26 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
27 
28 std::string
29 HistoryObj::convert_string(const std::string& input_string){
30 
31  //Conversion of special characteres into xml language
32 
33  std::string::const_iterator itr_string;
34  std::string modified_string;
35 
36  for(itr_string=input_string.begin(); itr_string!=input_string.end(); itr_string++) {
37  if (*itr_string == '&') modified_string.append("&");
38  else if (*itr_string == '<') modified_string.append("&lt;");
39  else if (*itr_string == '>') modified_string.append("&gt;");
40  else if (*itr_string == '"') modified_string.append("&quot;");
41  else if (*itr_string == '\'') modified_string.append("&apos;");
42  else if (*itr_string == '\"') modified_string.append("&quot;");
43  else modified_string+=*itr_string;
44  }
45 
46  return modified_string;
47 }
48 
49 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
50 
51 void
52 HistoryObj::indent(std::ostream& ost, int i) const {
53  while (i > 0) {
54  ost << " ";
55  i--;
56  }
57 }
58 
59 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
60 
61 const CLID&
63 
64  static CLID CLID_HistoryObj = 86452397;
65  return CLID_HistoryObj;
66 
67 }
68 
69 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
70 
71 // Output stream.
72 
73 std::ostream& operator<<(std::ostream& lhs, const HistoryObj& rhs) {
74 
75  rhs.dump(lhs,false);
76 
77  return lhs;
78 }
static const CLID & classID()
Definition: HistoryObj.cpp:62
virtual void dump(std::ostream &, const bool isXML=false, int indent=0) const =0
Base class for History Objects.
Definition: HistoryObj.h:24
std::ostream & operator<<(std::ostream &lhs, const HistoryObj &rhs)
Definition: HistoryObj.cpp:73
virtual void indent(std::ostream &, int) const
Definition: HistoryObj.cpp:52
unsigned int CLID
Class ID definition.
Definition: ClassID.h:9
static std::string convert_string(const std::string &)
Definition: HistoryObj.cpp:29
list i
Definition: ana.py:128