g4tools  5.4.0
long_out
Go to the documentation of this file.
1 // Copyright (C) 2010, Guy Barrand. All rights reserved.
2 // See the file tools.license for terms.
3 
4 #ifndef tools_long_out
5 #define tools_long_out
6 
7 #include "snpf"
8 #include <string>
9 
10 namespace tools {
11 
12 class long_out : public std::string {
13  typedef std::string parent;
14 public:
15  long_out(long a_value) {
16  char s[512];
17  snpf(s,sizeof(s),"%ld",a_value);
18  parent::operator+=(s);
19  }
20 public:
21  long_out(const long_out& a_from):parent(a_from){}
22  long_out& operator=(const long_out& a_from){parent::operator=(a_from);return *this;}
23 };
24 
25 }
26 
27 #endif
tools::long_out::long_out
long_out(long a_value)
Definition: long_out:15
snpf
tools::long_out::long_out
long_out(const long_out &a_from)
Definition: long_out:21
tools::snpf
int snpf(char *a_s, size_t a_n, const char *a_fmt,...)
Definition: snpf:27
tools::long_out
Definition: long_out:12
tools
inlined C code : ///////////////////////////////////
Definition: aida_ntuple:26
tools::long_out::operator=
long_out & operator=(const long_out &a_from)
Definition: long_out:22