std::fpos< _StateT > Class Template Reference

Class representing stream positions. More...

#include <postypes.h>

List of all members.

Public Member Functions

 fpos ()
 fpos (streamoff __off)
 Construct position from offset.

 operator streamoff () const
 Convert to streamoff.

void state (_StateT __st)
 Remember the value of st.

_StateT state () const
 Return the last set value of st.

bool operator== (const fpos &__other) const
 Test if equivalent to another position.

bool operator!= (const fpos &__other) const
 Test if not equivalent to another position.

fposoperator+= (streamoff __off)
 Add offset to this position.

fposoperator-= (streamoff __off)
 Subtract offset from this position.

fpos operator+ (streamoff __off) const
 Add position and offset.

fpos operator- (streamoff __off) const
 Subtract offset from position.

streamoff operator- (const fpos &__other) const
 Subtract position to return offset.


Private Attributes

streamoff _M_off
_StateT _M_state


Detailed Description

template<typename _StateT>
class std::fpos< _StateT >

Class representing stream positions.

The standard places no requirements upon the template parameter StateT. In this implementation StateT must be DefaultConstructible, CopyConstructible and Assignable. The standard only requires that fpos should contain a member of type StateT. In this implementation it also contains an offset stored as a signed integer.

Parameters:
StateT Type passed to and returned from state().

Definition at line 95 of file postypes.h.


Constructor & Destructor Documentation

template<typename _StateT>
std::fpos< _StateT >::fpos  )  [inline]
 

Definition at line 106 of file postypes.h.

References std::fpos< _StateT >::_M_off, and std::fpos< _StateT >::_M_state.

template<typename _StateT>
std::fpos< _StateT >::fpos streamoff  __off  )  [inline]
 

Construct position from offset.

Definition at line 116 of file postypes.h.

References std::fpos< _StateT >::_M_off, std::fpos< _StateT >::_M_state, and std::streamoff.


Member Function Documentation

template<typename _StateT>
std::fpos< _StateT >::operator streamoff  )  const [inline]
 

Convert to streamoff.

Definition at line 120 of file postypes.h.

References std::fpos< _StateT >::_M_off.

template<typename _StateT>
bool std::fpos< _StateT >::operator!= const fpos< _StateT > &  __other  )  const [inline]
 

Test if not equivalent to another position.

Definition at line 143 of file postypes.h.

References std::fpos< _StateT >::_M_off.

template<typename _StateT>
fpos std::fpos< _StateT >::operator+ streamoff  __off  )  const [inline]
 

Add position and offset.

Definition at line 175 of file postypes.h.

References std::streamoff.

template<typename _StateT>
fpos& std::fpos< _StateT >::operator+= streamoff  __off  )  [inline]
 

Add offset to this position.

Definition at line 151 of file postypes.h.

References std::fpos< _StateT >::_M_off, and std::streamoff.

template<typename _StateT>
streamoff std::fpos< _StateT >::operator- const fpos< _StateT > &  __other  )  const [inline]
 

Subtract position to return offset.

Definition at line 202 of file postypes.h.

References std::fpos< _StateT >::_M_off.

template<typename _StateT>
fpos std::fpos< _StateT >::operator- streamoff  __off  )  const [inline]
 

Subtract offset from position.

Definition at line 189 of file postypes.h.

References std::streamoff.

template<typename _StateT>
fpos& std::fpos< _StateT >::operator-= streamoff  __off  )  [inline]
 

Subtract offset from this position.

Definition at line 162 of file postypes.h.

References std::fpos< _StateT >::_M_off, and std::streamoff.

template<typename _StateT>
bool std::fpos< _StateT >::operator== const fpos< _StateT > &  __other  )  const [inline]
 

Test if equivalent to another position.

Definition at line 138 of file postypes.h.

References std::fpos< _StateT >::_M_off.

template<typename _StateT>
_StateT std::fpos< _StateT >::state  )  const [inline]
 

Return the last set value of st.

Definition at line 129 of file postypes.h.

References std::fpos< _StateT >::_M_state.

template<typename _StateT>
void std::fpos< _StateT >::state _StateT  __st  )  [inline]
 

Remember the value of st.

Definition at line 124 of file postypes.h.

References std::fpos< _StateT >::_M_state.


Member Data Documentation

template<typename _StateT>
streamoff std::fpos< _StateT >::_M_off [private]
 

Definition at line 98 of file postypes.h.

Referenced by std::fpos< _StateT >::fpos(), std::fpos< _StateT >::operator streamoff(), std::fpos< _StateT >::operator!=(), std::fpos< _StateT >::operator+=(), std::fpos< _StateT >::operator-(), std::fpos< _StateT >::operator-=(), and std::fpos< _StateT >::operator==().

template<typename _StateT>
_StateT std::fpos< _StateT >::_M_state [private]
 

Definition at line 99 of file postypes.h.

Referenced by std::fpos< _StateT >::fpos(), and std::fpos< _StateT >::state().


The documentation for this class was generated from the following file:
Generated on Tue Jan 30 17:32:15 2007 for GNU C++ STL by doxygen 1.3.6