VGM Version 5.3
Loading...
Searching...
No Matches
utilities.h
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The XmlVGM package of the Virtual Geometry Model
5// Copyright (C) 2007, Ivana Hrivnacova
6// All rights reserved.
7//
8// For the licensing terms see vgm/LICENSE.
9// Contact: ivana@ipno.in2p3.fr
10// -----------------------------------------------------------------------
11
13//
19
20#ifndef XML_VGM_UTILITIES_H
21#define XML_VGM_UTILITIES_H
22
24
25#include "XmlVGM/Maps.h"
26
27namespace XmlVGM {
28
29std::string UpdateName(
30 const std::string& name, const std::string& extension = "");
31
32std::string StripName(
33 const std::string& name, const std::string& extension = "");
34
35std::string AppendName(const std::string& name, int size);
36
37std::string IsotopeName(const VGM::IIsotope* isotope);
38
39void CutName(std::string& name);
40void CutName(std::string& name, int size);
41
42std::ostream& SmartPut(std::ostream& out, int size, int precision,
43 double tolerance, double number, const std::string& separator);
44
45std::ostream& SmartPut(std::ostream& out, int size, int precision,
46 double tolerance, const std::string& separator1, double number,
47 const std::string& separator2);
48
49std::string Date();
50
51// date
52const char fgkCharReplacement = '_'; // replacement for ' ' in names
53const std::string fgkNotAllowedChars =
54 " +-*/&<>%^$()"; // not allowed characters in XML
55const std::string fgkNotAllowedChars1 =
56 "0123456789"; // not allowed first characters
57} // namespace XmlVGM
58
59#endif // XML_VGM_UTILITIES_H
The VGM interface to elements.
Definition IIsotope.h:28
XmlVGM utilities.
std::string IsotopeName(const VGM::IIsotope *isotope)
Definition utilities.cxx:86
std::string AppendName(const std::string &name, int size)
Definition utilities.cxx:71
const std::string fgkNotAllowedChars
Definition utilities.h:53
std::string Date()
const std::string fgkNotAllowedChars1
Definition utilities.h:55
std::string StripName(const std::string &name, const std::string &extension="")
Definition utilities.cxx:62
const char fgkCharReplacement
Definition utilities.h:52
void CutName(std::string &name)
std::ostream & SmartPut(std::ostream &out, int size, int precision, double tolerance, double number, const std::string &separator)
std::string UpdateName(const std::string &name, const std::string &extension="")
Definition utilities.cxx:31