### IVersion

  IVersion represents a specific version number. It provides mechanisms for version comparison and for querying the Open Class library version. An IVersion is composed of:

  - A major number
  - A minor number

  To query the current Open Class library version, use the static function `libraryVersion`. For example:

        IVersion IOCVersion(IVersion::libraryVersion());
        cout << IOCVersion.asString() << endl;

### IVersion - Member Functions and Data by Group

### Constructors & Destructor

IVersion
  This constructor creates a version object.

  Overload 1

      public:
      IVersion(const IVersion& aVersion)

  Use this constructor to create a version object by copying another version object.

  aVersion
    The source version object to copy construct from.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      IVersion(unsigned short aMajor, unsigned short aMinor)

  Use this constructor to construct a version object from the given parameters.

  aMajor
    The major version number for the new object.
  aMinor
    The minor version number for the new object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3

      public:
      IVersion()

  Use this constructor to create a default IVersion object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Comparisons

operator !=

      public:
      bool operator !=(const IVersion& aVersion) const

  This function compares this object to another version object for inequality.

  aVersion
    The other version object to compare to this one for inequality.

Return
  true if this object is not equal to the passed object, else false.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator <

      public:
      bool operator <(const IVersion& aVersion) const

  This function compares this object to another version object for relative magnitude.

  aVersion
    The version to compare to this object for relative magnitude.

Return
  true if this object represents a lower version than the passed object, else false.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator <=

      public:
      bool operator <=(const IVersion& aVersion) const

  This function compares this object to another version object for relative magnitude.

  aVersion
    The version to compare to this object for relative magnitude.

Return
  true if this object represents a lower (or equivalent) version than the passed object, else false.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator ==

      public:
      bool operator ==(const IVersion& aVersion) const

  This function compares this object to another version object for equality.

  aVersion
    The other version object to compare to this one for equality.

Return
  true if this object represents an equivalent version as the passed object, else false.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator >

      public:
      bool operator >(const IVersion& aVersion) const

  This function compares this object to another version object for relative magnitude.

  aVersion
    The version to compare to this object for relative magnitude.

Return
  true if this object represents a greater version than the passed object, else false.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator >=

      public:
      bool operator >=(const IVersion& aVersion) const

  This function compares this object to another version object for relative magnitude.

  aVersion
    The version to compare to this object for relative magnitude.

Return
  true if this object represents a greater (or equivalent) version than the passed object, else false.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Diagnostics

asString

      public:
      IString asString() const

  This function returns the version object as an IString. By default, the string is formatted as `Major.Minor`.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Editing

setMajor

      public:
      void setMajor(unsigned short aMajor)

  This function sets the major version number of the version object.

  aMajor
    The new major version number

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setMinor

      public:
      void setMinor(unsigned short aMinor)

  This function sets the minor version number of the version object.

  aMinor
    The new minor version number

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Open Class Library Version

libraryVersion

      public:
      static IVersion libraryVersion()

  This function returns a version object which contains the IBM Open Class Library version.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Queries

major

      public:
      unsigned short major()

  This function returns the major version number of the version object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

minor

      public:
      unsigned short minor()

  This function returns the minor version number of the version object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Streaming

operator <<=

      public:
      void operator <<=(IDataStream& fromWhere)

  This function streams this object in from the passed data stream. Any existing content is overwritten by the streamed in information.

  fromWhere
    The stream to stream this object in from.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator >>=

      public:
      void operator >>=(IDataStream& toWhere)

  This function streams this IVersion object out to the passed data stream.

  toWhere
    The stream to stream this object out to.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

readFromStream

      protected:
      void readFromStream(IDataStream& fromWhere)

  This method supports the streaming of a version objects from a data stream.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeToStream

      protected:
      void writeToStream(IDataStream& toWhere) const

  This method supports the streaming of a version objects to a data stream.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IVersion - Inherited Member Functions and Data

#### Inherited Public Functions

  - None

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None