Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

fpos



Summary

Maintains position information fort he iostream classes.

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

Synopsis

#include <rw/iotraits>
template<class stateT = mbstate_t>
class fpos

Description

The template class fpos<stateT> is used by the iostream classes to maintain position information. It maintains three kinds of information: the absolute position, the conversion state and the validity of the stored position. Streams instantiated on tiny characters use streampos as their positioning type, whereas streams instantiated on wide characters use wstreampos, but both are defined as fpos<mbstate_t>.

Interface

Types

state_type

Public Constructors

fpos(long off =0); 
fpos(state_type st); 

Public Member Functions

state_type 
state() const; 
state_type 
state(state_type st); 
bool good();
operator long();
long
offset() const;
long
offset(long off);
long
pos() const;
long
offset(long pos);

Valid Operations

In the following,

Valid operations:

P p( I ); Constructs from int
P p = i; Assigns from int
P( o ) Converts from offset
O( p ) Converts to offset
p == q Tests for equality
p != q Tests for inequality
q = p + o Adds offset
p += o Adds offset
q = p -o Subtracts offset
q -= o Subtracts offset
o = p - q Returns offset

See Also

iosfwd(3C++), char_traits(3C++)

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

Amendment 1 to the C Standard.

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