fpos man page on SunOS

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
SunOS logo
[printable version]

fpos(3C++)			       -			    fpos(3C++)

Standard C++ Library Copyright 1998, Rogue Wave Software, Inc.

NAME
       fpos

	- Maintains position information fort he iostream classes.

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  stream‐
       pos_as  their  positioning  type,  whereas streams instantiated on wide
       characters use wstreampos, but both are defined as fpos<mbstate_t>.

INTERFACE
       template <class stateT = mbstate_t>
       class fpos {

       public:

 typedef stateT	 state_type;

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

 bool good();
 operator long();

 long offset() cont;
 long offset(long);

 state_type   state(state_type);
 state_type   state () const;

 long pos() const;
 long pos(long);

};

TYPES
       state_type

   The type state_type holds the conversion state, and is compatible with  the
   function locale::codecvt(). By default it is defined as mbstate_t.

PUBLIC CONSTRUCTORS
       fpos(long off =0);

   Constructs  an fpos object, initializing its position with off and its con‐
   version state with the default stateT constructor.  This  function  is  not
   described in the C++ standard.

fpos(state_type st);

   Constructs  an  fpos object, initializing its conversion state with st, its
   position with the start position, and its status to good.

PUBLIC MEMBER FUNCTIONS
       state_type
       state() const;

   Returns the conversion state stored in the fpos object.

state_type
state(state_type st);

   Stores st as the new conversion state in the fpos object  and  returns  its
   previous value.

bool good();

   Returns  the	 status	 of  the  fpos object. Offset(-1) indicates an invalid
   value and returns false.

operator long();

   Converts fpos object to absolute displacement. This operator is handy  when
   used	 with  functions  such as tellp() or tellg() to get absolute displace‐
   ment.

long
offset() const;

   Returns the signed displacement in the fpos object.

long
offset(long off);

   Stores off as the new signed displacement in the fpos  object  and  returns
   its previous value.

long
pos() const;

   Returns the absolute position in the fpos object.

long
offset(long pos);

   Stores  pos as the new absolute position in the fpos object and returns its
   previous value.

VALID OPERATIONS
       In the following,

       ·    P refers to type fpos<stateT>

       ·    p and q refer to a value of type fpos<stateT>

       ·    O refers to the offset type (streamoff, wstreamoff, long )

       ·    o refers to a value of the offset type

       ·    i refers to a value of type int

       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

Rogue Wave Software		  02 Apr 1998			    fpos(3C++)
[top]

List of man pages available for SunOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net