30 lines
603 B
C++
30 lines
603 B
C++
|
//
|
||
|
// integer_locale.h
|
||
|
// locales
|
||
|
//
|
||
|
// Created by Thalictrum on 13-05-2012.
|
||
|
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#ifndef locales_integer_locale_h
|
||
|
#define locales_integer_locale_h
|
||
|
|
||
|
namespace sc {
|
||
|
|
||
|
class integer_locale : public std::numpunct<char> {
|
||
|
public:
|
||
|
typedef char char_type;
|
||
|
typedef std::string string_type;
|
||
|
|
||
|
explicit integer_locale(size_t r = 0) : std::numpunct<char>(r) {}
|
||
|
|
||
|
protected:
|
||
|
char do_decimal_point() const { return ','; }
|
||
|
char do_thousands_sep() const { return '.'; }
|
||
|
std::string do_grouping() const { return "\003"; }
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|