Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  master (d98a2936)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
HistoryObj.cpp
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #include <Gaudi/Property.h>
12 #include <GaudiKernel/HistoryObj.h>
13 
14 std::string HistoryObj::convert_string( const std::string& input_string ) {
15  // Conversion of special characteres into xml language
16 
17  std::string modified_string;
18 
19  for ( const auto& itr : input_string ) {
20  if ( itr == '&' )
21  modified_string.append( "&amp;" );
22  else if ( itr == '<' )
23  modified_string.append( "&lt;" );
24  else if ( itr == '>' )
25  modified_string.append( "&gt;" );
26  else if ( itr == '"' )
27  modified_string.append( "&quot;" );
28  else if ( itr == '\'' )
29  modified_string.append( "&apos;" );
30  else
31  modified_string += itr;
32  }
33 
34  return modified_string;
35 }
36 
37 void HistoryObj::indent( std::ostream& ost, int i ) const {
38  while ( i > 0 ) {
39  ost << " ";
40  --i;
41  }
42 }
43 
45  static const CLID CLID_HistoryObj = 86452397;
46  return CLID_HistoryObj;
47 }
HistoryObj::classID
static const CLID & classID()
Definition: HistoryObj.cpp:44
HistoryObj::indent
virtual void indent(std::ostream &, int) const
Definition: HistoryObj.cpp:37
HistoryObj::convert_string
static std::string convert_string(const std::string &)
Definition: HistoryObj.cpp:14
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:16
HistoryObj.h
Property.h