Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

smanip, smanip_fill



Summary

Helper classes used to implement parameterized manipulators.

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <iomanip> 
template<class T> class smanip;
template<class T, class traits> class smanip_fill; 

Description

The template classes smanip and smanip_fill are helper classes used to implement parameterized manipulators. The class smanip is used as the return type for manipulators that do not need to carry information about the character type of the stream they are applied to. This is the case for resetiosflags, setiosflags, setbase, setprecision, and setw. The class smanip_fill is used as the return type for manipulators that do need to carry information about the character type of the streamto which they are applied. This is the case for setfill.

smanip_fill is not described in the C++ standard, and is included as an extension.

Interface

Class smanip Constructor

smanip(ios_base& (*pf) (ios_base&, T), T manarg); 

Class smanip_fill Constructor

smanip_fill(basic_ios<T, traits>& (*pf) (basic_ios<T, traits>&, T), T manarg); 

Manipulators

smanip<ios_base::fmtflags> 
resetiosflag(ios_base::fmtflags mask); 
smanip<int> 
setbase(int base); 
template <class charT>
smanip_fill<charT, char_traits<charT> > 
setfill(charT c); 
smanip<ios_base::fmtflags> 
setiosflag(ios_base::fmtflags mask); 
smanip<int> 
setprecision(int n); 
smanip<int> 
setw(int n); 

Extractors

template <class charT, class traits, class T>
basic_istream<charT,traits>&
operator>>(basic_istream<charT,traits>& is, const smanip<T>& a); 
template <class charT, class traits>
basic_istream<charT,traits>&
operator>>(basic_istream<charT,traits>& is,
         const smanip_fill<charT,char_traits<charT> >& a); 

Inserters

template <class charT, class traits, class T>
basic_ostream<charT,traits>&
operator<<(basic_ostream<charT,traits>& os, 
           const smanip<T>& a); 
template <class charT, class traits>
basic_ostream<charT,traits>&
operator<<(basic_ostream<charT,traits>& os,
           const smanip_fill<charT,char_traits<charT> >& a); 

See Also

ios_base(3C++), basic_ios(3C++), basic_istream(3C++), basic_ostream(3C++)

Working Paper for Draft Proposed International Standard for Information Systems--Programming Language C++, Section 27.6.3

Standards Conformance

ANSI X3J16/ISO WG21 Joint C++ Committee



Previous fileTop of documentContentsIndexNext file
©Copyright 1998, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.
OEM Release, June 1998