Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Standard C++ Library Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

fpos

Module:  Standard C++ Library   Library:  Input/output


Does not inherit

Local Index

Members

Summary

Class that maintains position information for the iostream classes

Synopsis

#include <rw/iotraits>

namespace std {
  template<class stateT>
  class fpos;
}

Description

The class template fpos is used by the iostream classes to maintain position information. It maintains the absolute position within the external sequence, and the conversion state at that position. Streams instantiated on narrow characters use streampos as their positioning type, whereas streams instantiated on wide characters use wstreampos.

Interface

Member Types

state_type

Constructors

fpos(streamoff off = 0, state_type st = state_type()); 

Public Member Functions

state_type 
state() const; 
void 
state(state_type st); 
operator streamoff() const;
fpos& operator+=(streamoff off);
fpos& operator-=(streamoff off);
fpos& operator+(streamoff off) const;
fpos& operator-(streamoff off) const;
bool operator==(const fpos&) const;
bool operator!=(const fpos&) const;

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>, char_traits

Standards Conformance

ISO/IEC 14882:1998 -- International Standard for Information Systems --Programming Language C++, Section 27.4.3. See also ISO/IEC 9899/AMD1:1995, Amendment 1 to ISO/IEC 9899:1990 C Integrity.



Previous fileTop of DocumentContentsIndex pageNext file

Copyright (c) 1994-2006 Rogue Wave Software, a Quovadx Division.
Licensed under the Apache License, Version 2.0.
Contact Rogue Wave about documentation or support issues. You can also seek help from other developers through the Apache stdcxx community (see below).

For more information on the Rogue Wave Standard C++ Library under open source, see Section 1.2 of the user's guide.