williamr@2: /* williamr@4: * Portions Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. williamr@2: * williamr@2: * Copyright (c) 1999 williamr@2: * Silicon Graphics Computer Systems, Inc. williamr@2: * williamr@4: * Copyright (c) 1999 williamr@2: * Boris Fomitchev williamr@2: * williamr@2: * This material is provided "as is", with absolutely no warranty expressed williamr@2: * or implied. Any use is at your own risk. williamr@2: * williamr@4: * Permission to use or copy this software for any purpose is hereby granted williamr@2: * without fee, provided the above notices are retained on all copies. williamr@2: * Permission to modify the code and to distribute modified code is granted, williamr@2: * provided the above notices are retained, and a notice that the code was williamr@2: * modified is included with the above copyright notice. williamr@2: * williamr@4: */ williamr@2: // WARNING: This is an internal header file, included by other C++ williamr@2: // standard library headers. You should not attempt to use this header williamr@2: // file directly. williamr@2: williamr@2: williamr@2: #ifndef _STLP_INTERNAL_NUM_PUT_H williamr@2: #define _STLP_INTERNAL_NUM_PUT_H williamr@2: williamr@2: #ifndef _STLP_INTERNAL_NUMPUNCT_H williamr@2: # include williamr@2: #endif williamr@4: williamr@2: #ifndef _STLP_INTERNAL_CTYPE_H williamr@2: # include williamr@2: #endif williamr@4: williamr@2: #ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H williamr@2: # include williamr@2: #endif williamr@2: williamr@4: #ifndef _STLP_INTERNAL_IOSTREAM_STRING_H williamr@4: # include williamr@4: #endif williamr@4: williamr@2: _STLP_BEGIN_NAMESPACE williamr@2: williamr@2: //---------------------------------------------------------------------- williamr@2: // num_put facet williamr@2: williamr@4: #if defined (_STLP_LIMITED_DEFAULT_TEMPLATES) williamr@4: template williamr@4: #else williamr@4: template > > williamr@4: #endif williamr@4: class num_put: public locale::facet { williamr@4: friend class _Locale_impl; williamr@2: public: williamr@2: typedef _CharT char_type; williamr@2: typedef _OutputIter iter_type; williamr@2: williamr@4: explicit num_put(size_t __refs = 0) : locale::facet(__refs) {} williamr@2: williamr@4: #if !defined (_STLP_NO_BOOL) williamr@2: iter_type put(iter_type __s, ios_base& __f, char_type __fill, williamr@2: bool __val) const { williamr@2: return do_put(__s, __f, __fill, __val); williamr@2: } williamr@4: #endif williamr@2: iter_type put(iter_type __s, ios_base& __f, char_type __fill, williamr@2: long __val) const { williamr@2: return do_put(__s, __f, __fill, __val); williamr@2: } williamr@2: williamr@2: iter_type put(iter_type __s, ios_base& __f, char_type __fill, williamr@2: unsigned long __val) const { williamr@2: return do_put(__s, __f, __fill, __val); williamr@2: } williamr@2: williamr@4: #if defined (_STLP_LONG_LONG) williamr@2: iter_type put(iter_type __s, ios_base& __f, char_type __fill, williamr@2: _STLP_LONG_LONG __val) const { williamr@2: return do_put(__s, __f, __fill, __val); williamr@2: } williamr@2: williamr@2: iter_type put(iter_type __s, ios_base& __f, char_type __fill, williamr@2: unsigned _STLP_LONG_LONG __val) const { williamr@2: return do_put(__s, __f, __fill, __val); williamr@2: } williamr@2: #endif williamr@2: williamr@2: iter_type put(iter_type __s, ios_base& __f, char_type __fill, williamr@2: double __val) const { williamr@2: return do_put(__s, __f, __fill, (double)__val); williamr@2: } williamr@2: williamr@4: #if !defined (_STLP_NO_LONG_DOUBLE) williamr@2: iter_type put(iter_type __s, ios_base& __f, char_type __fill, williamr@2: long double __val) const { williamr@2: return do_put(__s, __f, __fill, __val); williamr@2: } williamr@4: #endif williamr@2: williamr@2: iter_type put(iter_type __s, ios_base& __f, char_type __fill, williamr@2: const void * __val) const { williamr@2: return do_put(__s, __f, __fill, __val); williamr@2: } williamr@2: williamr@4: #if defined(__SYMBIAN32__WSD__) williamr@4: static _STLP_STATIC_MEMBER_DECLSPEC locale::id& GetFacetLocaleId(); williamr@4: #elif defined (__SYMBIAN32__NO_STATIC_IMPORTS__) williamr@4: static _STLP_STATIC_MEMBER_DECLSPEC locale::id& GetFacetLocaleId(); williamr@4: static locale::id id; williamr@2: #else williamr@4: // NOTE: Symbian doesn't support exporting static data. williamr@4: // Users of this class should use GetFacetLocaleId() to access the data member id williamr@4: static _STLP_STATIC_MEMBER_DECLSPEC locale::id id; williamr@2: #endif williamr@2: williamr@2: protected: williamr@4: ~num_put() {} williamr@4: #if !defined (_STLP_NO_BOOL) williamr@2: virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, bool __val) const; williamr@4: #endif williamr@2: virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, long __val) const; williamr@2: virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, unsigned long __val) const; williamr@2: virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, double __val) const; williamr@4: #if !defined (_STLP_NO_LONG_DOUBLE) williamr@2: virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, long double __val) const; williamr@2: #endif williamr@2: williamr@4: #if defined (_STLP_LONG_LONG) williamr@2: virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, _STLP_LONG_LONG __val) const; williamr@4: virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, williamr@2: unsigned _STLP_LONG_LONG __val) const ; williamr@4: #endif williamr@2: virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, const void* __val) const; williamr@2: }; williamr@2: williamr@4: #if defined (_STLP_USE_TEMPLATE_EXPORT) williamr@2: _STLP_EXPORT_TEMPLATE_CLASS num_put > >; williamr@2: // _STLP_EXPORT_TEMPLATE_CLASS num_put; williamr@4: # if !defined (_STLP_NO_WCHAR_T) williamr@2: _STLP_EXPORT_TEMPLATE_CLASS num_put > >; williamr@2: // _STLP_EXPORT_TEMPLATE_CLASS num_put; williamr@4: # endif williamr@4: #endif williamr@2: williamr@4: #if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) williamr@4: williamr@4: _STLP_MOVE_TO_PRIV_NAMESPACE williamr@2: williamr@2: template williamr@2: char* _STLP_CALL williamr@2: __write_integer_backward(char* __buf, ios_base::fmtflags __flags, _Integer __x); williamr@2: williamr@4: /* williamr@4: * Returns the position on the right of the digits that has to be considered williamr@4: * for the application of the grouping policy. williamr@4: */ williamr@4: _STLP_DECLSPEC size_t _STLP_CALL __write_float(__iostring&, ios_base::fmtflags, int, double); //RVCT 3.1 export issue: _STLP_DECLSPEC added. williamr@4: # if !defined (_STLP_NO_LONG_DOUBLE) williamr@4: _STLP_DECLSPEC size_t _STLP_CALL __write_float(__iostring&, ios_base::fmtflags, int, long double); williamr@4: # endif williamr@2: williamr@4: /* williamr@4: * Gets the digits of the integer part. williamr@4: */ williamr@4: _STLP_DECLSPEC void _STLP_CALL __get_floor_digits(__iostring&, _STLP_LONGEST_FLOAT_TYPE); williamr@2: williamr@4: template williamr@4: void _STLP_CALL __get_money_digits(_STLP_BASIC_IOSTRING(_CharT)&, ios_base&, _STLP_LONGEST_FLOAT_TYPE); williamr@4: williamr@4: # if !defined (_STLP_NO_WCHAR_T) williamr@4: _STLP_DECLSPEC void _STLP_CALL __convert_float_buffer(__iostring const&, __iowstring&, const ctype&, wchar_t, bool = true); williamr@4: # endif williamr@4: extern void _STLP_CALL __adjust_float_buffer(__iostring&, char); williamr@4: williamr@4: extern char* _STLP_CALL williamr@2: __write_integer(char* buf, ios_base::fmtflags flags, long x); williamr@2: williamr@4: _STLP_DECLSPEC ptrdiff_t _STLP_CALL __insert_grouping(char* first, char* last, const string&, char, char, char, int); williamr@4: _STLP_DECLSPEC void _STLP_CALL __insert_grouping(__iostring&, size_t, const string&, char, char, char, int); williamr@4: # if !defined (_STLP_NO_WCHAR_T) williamr@4: _STLP_DECLSPEC ptrdiff_t _STLP_CALL __insert_grouping(wchar_t*, wchar_t*, const string&, wchar_t, wchar_t, wchar_t, int); williamr@4: _STLP_DECLSPEC void _STLP_CALL __insert_grouping(__iowstring&, size_t, const string&, wchar_t, wchar_t, wchar_t, int); williamr@2: # endif williamr@2: williamr@4: _STLP_MOVE_TO_STD_NAMESPACE williamr@2: williamr@4: #endif /* _STLP_EXPOSE_STREAM_IMPLEMENTATION */ williamr@2: williamr@2: _STLP_END_NAMESPACE williamr@2: williamr@4: #if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) williamr@4: # include williamr@4: #endif williamr@2: williamr@2: #endif /* _STLP_INTERNAL_NUMERIC_FACETS_H */ williamr@2: williamr@2: // Local Variables: williamr@2: // mode:C++ williamr@2: // End: