Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
String.h File Reference
#include <string>
#include <iostream>
#include <sstream>

Go to the source code of this file.

Macros

#define USE_STLSTRING
 

Typedefs

typedef std::string String
 

Functions

String long_to_String (long n)
 
String double_to_String (double d)
 
void put_one_n (std::ostringstream &ost)
 

Macro Definition Documentation

◆ USE_STLSTRING

#define USE_STLSTRING

Definition at line 63 of file String.h.

Typedef Documentation

◆ String

typedef std::string String

Definition at line 75 of file String.h.

Function Documentation

◆ double_to_String()

String double_to_String ( double  d)
inline

Definition at line 113 of file String.h.

117 {
118 std::ostringstream s;
119 s << d;
120 return String(s.str());
121}
std::string String
Definition: String.h:75

◆ long_to_String()

String long_to_String ( long  n)
inline

Definition at line 102 of file String.h.

106 {
107 std::ostringstream s;
108 s << n;
109 return String(s.str());
110}

Referenced by Heed::ExAtomPhotoAbsCS::ExAtomPhotoAbsCS(), Heed::ElElasticScat::fill_hist(), and Heed::ElElasticScat::fill_hist_low_scat().

◆ put_one_n()

void put_one_n ( std::ostringstream &  ost)
inline

Definition at line 127 of file String.h.

127 {
128 long qost = ost.str().length();
129 if (qost > 0) {
130 if (ost.str()[qost - 1] == '\n') { // nothing
131 } else {
132 ost << '\n';
133 }
134 } else
135 ost << '\n';
136}

Referenced by operator<<(), print_adr_DynLinArr(), print_DynArr(), and print_DynLinArr().