rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWInteger Class Reference
[RWCollectable-derived]

Useful as a base class for classes that use integers as keys in dictionaries, and so forth. More...

#include <rw/rwint.h>

Inheritance diagram for RWInteger:
RWCollectableInt

List of all members.

Public Member Functions

 RWInteger (int i=0)
 operator int () const
RWspace binaryStoreSize () const
int value () const
int value (int newval)

Friends

std::istream & operator>> (std::istream &i, RWInteger &x)

Related Functions

(Note that these are not member functions.)



std::ostream & operator<< (std::ostream &o, const RWInteger &x)
RWvistreamoperator>> (RWvistream &str, RWInteger &x)
RWFileoperator>> (RWFile &file, RWInteger &x)
RWvostreamoperator<< (RWvostream &str, const RWInteger &x)
RWFileoperator<< (RWFile &file, const RWInteger &x)

Detailed Description

Integer class. This class is useful as a base class for classes that use integers as keys in dictionaries, and so forth.

Synopsis

 #include <rw/rwint.h>
 RWInteger i;

Persistence

Isomorphic


Constructor & Destructor Documentation

RWInteger::RWInteger ( int  i = 0  )  [inline]

Constructs an RWInteger with value i. Serves as a type conversion from int.

Note:
If no argument is supplied, the value defaults to zero (0).

Member Function Documentation

RWspace RWInteger::binaryStoreSize (  )  const [inline]

Returns the number of bytes necessary to store the object using the global function:

RWFile& operator<<(RWFile&, const RWInteger&);

Reimplemented in RWCollectableInt.

RWInteger::operator int (  )  const [inline]

Type conversion to int.

int RWInteger::value ( int  newval  )  [inline]

Changes the value of the RWInteger to newval and returns the old value.

int RWInteger::value ( void   )  const [inline]

Returns the value of the RWInteger.


Friends And Related Function Documentation

RWFile & operator<< ( RWFile file,
const RWInteger x 
) [related]

Saves the RWInteger x to an RWFile.

RWvostream & operator<< ( RWvostream str,
const RWInteger x 
) [related]

Saves the RWInteger x to a virtual stream.

std::ostream & operator<< ( std::ostream &  o,
const RWInteger x 
) [related]

Outputs x to std::ostream o.

RWFile & operator>> ( RWFile file,
RWInteger x 
) [related]

Restores an RWInteger into x from an RWFile, replacing the previous contents of x.

RWvistream & operator>> ( RWvistream str,
RWInteger x 
) [related]

Restores an RWInteger into x from a virtual stream, replacing the previous contents of x.

std::istream& operator>> ( std::istream &  i,
RWInteger x 
) [friend]

Inputs x from std::istream i.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.