diff -r e1b950c65cb4 -r 837f303aceeb epoc32/include/stdapis/stlportv5/stl/_num_put.h --- a/epoc32/include/stdapis/stlportv5/stl/_num_put.h Wed Mar 31 12:27:01 2010 +0100 +++ b/epoc32/include/stdapis/stlportv5/stl/_num_put.h Wed Mar 31 12:33:34 2010 +0100 @@ -1,22 +1,22 @@ /* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Portions Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. * * Copyright (c) 1999 * Silicon Graphics Computer Systems, Inc. * - * Copyright (c) 1999 + * Copyright (c) 1999 * Boris Fomitchev * * This material is provided "as is", with absolutely no warranty expressed * or implied. Any use is at your own risk. * - * Permission to use or copy this software for any purpose is hereby granted + * Permission to use or copy this software for any purpose is hereby granted * without fee, provided the above notices are retained on all copies. * Permission to modify the code and to distribute modified code is granted, * provided the above notices are retained, and a notice that the code was * modified is included with the above copyright notice. * - */ + */ // WARNING: This is an internal header file, included by other C++ // standard library headers. You should not attempt to use this header // file directly. @@ -28,38 +28,43 @@ #ifndef _STLP_INTERNAL_NUMPUNCT_H # include #endif + #ifndef _STLP_INTERNAL_CTYPE_H # include #endif + #ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H # include #endif +#ifndef _STLP_INTERNAL_IOSTREAM_STRING_H +# include +#endif + _STLP_BEGIN_NAMESPACE //---------------------------------------------------------------------- // num_put facet -# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES -template -# else -template > > -# endif -class num_put: public locale::facet -{ - friend class _Locale; +#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES) +template +#else +template > > +#endif +class num_put: public locale::facet { + friend class _Locale_impl; public: typedef _CharT char_type; typedef _OutputIter iter_type; - explicit num_put(size_t __refs = 0) : _BaseFacet(__refs) {} + explicit num_put(size_t __refs = 0) : locale::facet(__refs) {} -# ifndef _STLP_NO_BOOL +#if !defined (_STLP_NO_BOOL) iter_type put(iter_type __s, ios_base& __f, char_type __fill, bool __val) const { return do_put(__s, __f, __fill, __val); } -# endif +#endif iter_type put(iter_type __s, ios_base& __f, char_type __fill, long __val) const { return do_put(__s, __f, __fill, __val); @@ -70,7 +75,7 @@ return do_put(__s, __f, __fill, __val); } -#ifdef _STLP_LONG_LONG +#if defined (_STLP_LONG_LONG) iter_type put(iter_type __s, ios_base& __f, char_type __fill, _STLP_LONG_LONG __val) const { return do_put(__s, __f, __fill, __val); @@ -87,116 +92,110 @@ return do_put(__s, __f, __fill, (double)__val); } -#ifndef _STLP_NO_LONG_DOUBLE +#if !defined (_STLP_NO_LONG_DOUBLE) iter_type put(iter_type __s, ios_base& __f, char_type __fill, long double __val) const { return do_put(__s, __f, __fill, __val); } -# endif +#endif iter_type put(iter_type __s, ios_base& __f, char_type __fill, const void * __val) const { return do_put(__s, __f, __fill, __val); } -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& - GetFacetLocaleId(ostreambuf_iterator > *); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(char**); - //wchar_t - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& - GetFacetLocaleId(ostreambuf_iterator > *); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(wchar_t**); - //adding for new iterator type - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& - GetFacetLocaleId(back_insert_iterator *); +#if defined(__SYMBIAN32__WSD__) + static _STLP_STATIC_MEMBER_DECLSPEC locale::id& GetFacetLocaleId(); +#elif defined (__SYMBIAN32__NO_STATIC_IMPORTS__) + static _STLP_STATIC_MEMBER_DECLSPEC locale::id& GetFacetLocaleId(); + static locale::id id; #else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; + // NOTE: Symbian doesn't support exporting static data. + // Users of this class should use GetFacetLocaleId() to access the data member id + static _STLP_STATIC_MEMBER_DECLSPEC locale::id id; #endif protected: - ~num_put() {} -# ifndef _STLP_NO_BOOL + ~num_put() {} +#if !defined (_STLP_NO_BOOL) virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, bool __val) const; -# endif +#endif virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, long __val) const; virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, unsigned long __val) const; virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, double __val) const; -#ifndef _STLP_NO_LONG_DOUBLE +#if !defined (_STLP_NO_LONG_DOUBLE) virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, long double __val) const; #endif -#ifdef _STLP_LONG_LONG +#if defined (_STLP_LONG_LONG) virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, _STLP_LONG_LONG __val) const; - virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, + virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, unsigned _STLP_LONG_LONG __val) const ; -#endif /* _STLP_LONG_LONG */ +#endif virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, const void* __val) const; }; -# ifdef _STLP_USE_TEMPLATE_EXPORT +#if defined (_STLP_USE_TEMPLATE_EXPORT) _STLP_EXPORT_TEMPLATE_CLASS num_put > >; // _STLP_EXPORT_TEMPLATE_CLASS num_put; -# ifndef _STLP_NO_WCHAR_T +# if !defined (_STLP_NO_WCHAR_T) _STLP_EXPORT_TEMPLATE_CLASS num_put > >; // _STLP_EXPORT_TEMPLATE_CLASS num_put; -# endif /* _STLP_NO_WCHAR_T */ -# endif +# endif +#endif -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) +#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) + +_STLP_MOVE_TO_PRIV_NAMESPACE template char* _STLP_CALL __write_integer_backward(char* __buf, ios_base::fmtflags __flags, _Integer __x); -extern _STLP_DECLSPEC int _STLP_CALL __string_to_float(const string&, float&); -extern _STLP_DECLSPEC int _STLP_CALL __string_to_float(const string&, double&); -extern _STLP_DECLSPEC void _STLP_CALL __write_float(string&, ios_base::fmtflags, int, double); -# ifndef _STLP_NO_LONG_DOUBLE -int _STLP_CALL __string_to_float(const string&, long double&); -extern _STLP_DECLSPEC void _STLP_CALL __write_float(string&, ios_base::fmtflags, int, long double); -# endif +/* + * Returns the position on the right of the digits that has to be considered + * for the application of the grouping policy. + */ +_STLP_DECLSPEC size_t _STLP_CALL __write_float(__iostring&, ios_base::fmtflags, int, double); //RVCT 3.1 export issue: _STLP_DECLSPEC added. +# if !defined (_STLP_NO_LONG_DOUBLE) +_STLP_DECLSPEC size_t _STLP_CALL __write_float(__iostring&, ios_base::fmtflags, int, long double); +# endif -#ifndef _STLP_NO_WCHAR_T -extern _STLP_DECLSPEC wchar_t* _STLP_CALL __convert_float_buffer(const char*, const char*, wchar_t*, const ctype&, wchar_t); -#endif -extern _STLP_DECLSPEC void _STLP_CALL __adjust_float_buffer(char*, char*, char); +/* + * Gets the digits of the integer part. + */ +_STLP_DECLSPEC void _STLP_CALL __get_floor_digits(__iostring&, _STLP_LONGEST_FLOAT_TYPE); -extern _STLP_DECLSPEC char* _STLP_CALL +template +void _STLP_CALL __get_money_digits(_STLP_BASIC_IOSTRING(_CharT)&, ios_base&, _STLP_LONGEST_FLOAT_TYPE); + +# if !defined (_STLP_NO_WCHAR_T) +_STLP_DECLSPEC void _STLP_CALL __convert_float_buffer(__iostring const&, __iowstring&, const ctype&, wchar_t, bool = true); +# endif +extern void _STLP_CALL __adjust_float_buffer(__iostring&, char); + +extern char* _STLP_CALL __write_integer(char* buf, ios_base::fmtflags flags, long x); -extern _STLP_DECLSPEC ptrdiff_t _STLP_CALL __insert_grouping(char* first, char* last, const string&, char, char, char, int); -# ifndef _STLP_NO_WCHAR_T -extern _STLP_DECLSPEC ptrdiff_t _STLP_CALL __insert_grouping(wchar_t*, wchar_t*, const string&, wchar_t, wchar_t, wchar_t, int); +_STLP_DECLSPEC ptrdiff_t _STLP_CALL __insert_grouping(char* first, char* last, const string&, char, char, char, int); +_STLP_DECLSPEC void _STLP_CALL __insert_grouping(__iostring&, size_t, const string&, char, char, char, int); +# if !defined (_STLP_NO_WCHAR_T) +_STLP_DECLSPEC ptrdiff_t _STLP_CALL __insert_grouping(wchar_t*, wchar_t*, const string&, wchar_t, wchar_t, wchar_t, int); +_STLP_DECLSPEC void _STLP_CALL __insert_grouping(__iowstring&, size_t, const string&, wchar_t, wchar_t, wchar_t, int); # endif -# endif +_STLP_MOVE_TO_STD_NAMESPACE -# if defined (__BORLANDC__) && defined (_RTLDLL) -inline void _Stl_loc_init_num_put() { - - num_put > >::id._M_index = 14; - num_put::id._M_index = 15; - -# ifndef _STLP_NO_WCHAR_T - num_put > > ::id._M_index = 33; - num_put::id._M_index = 34; -# endif - -} - -# endif +#endif /* _STLP_EXPOSE_STREAM_IMPLEMENTATION */ _STLP_END_NAMESPACE -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && ! defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif +#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +#endif #endif /* _STLP_INTERNAL_NUMERIC_FACETS_H */ // Local Variables: // mode:C++ // End: -