28 lines
553 B
Plaintext
28 lines
553 B
Plaintext
// Copyright (C) 2010, Guy Barrand. All rights reserved.
|
|
// See the file tools.license for terms.
|
|
|
|
#ifndef tools_long_out
|
|
#define tools_long_out
|
|
|
|
#include "snpf"
|
|
#include <string>
|
|
|
|
namespace tools {
|
|
|
|
class long_out : public std::string {
|
|
typedef std::string parent;
|
|
public:
|
|
long_out(long a_value) {
|
|
char _s[512];
|
|
snpf(_s,sizeof(_s),"%ld",a_value);
|
|
parent::operator+=(_s);
|
|
}
|
|
public:
|
|
long_out(const long_out& a_from):parent(a_from){}
|
|
long_out& operator=(const long_out& a_from){parent::operator=(a_from);return *this;}
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|