sword::SWVersion Class Reference

A basic tool class to handle program version numbers. More...

#include <swversion.h>

Collaboration diagram for sword::SWVersion:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SWVersion (const char *version="0.0")
 The constructor.
int compare (const SWVersion &vi) const
 Compare 2 Versions with each other.
const char * getText () const
 
Returns:
The parsed version number text.

 operator const char * () const
 
Returns:
The parsed version number text.

bool operator> (const SWVersion &vi) const
bool operator< (const SWVersion &vi) const
bool operator>= (const SWVersion &vi) const
bool operator<= (const SWVersion &vi) const
bool operator== (const SWVersion &vi) const

Public Attributes

int major
 The different version subnumbers.
int minor
int minor2
int minor3

Static Public Attributes

static SWVersion currentVersion
 Current sword library version.

Detailed Description

A basic tool class to handle program version numbers.

Definition at line 30 of file swversion.h.


Constructor & Destructor Documentation

sword::SWVersion::SWVersion ( const char *  version = "0.0"  ) 

The constructor.

Parameters:
version Version string to be parsed.


Member Function Documentation

int sword::SWVersion::compare ( const SWVersion vi  )  const

Compare 2 Versions with each other.

Parameters:
vi Version number to compare with.
Returns:
>0:this>vi; 0:this==vi; <0:this<vi


Member Data Documentation

SWVersion sword::SWVersion::currentVersion [static]

Current sword library version.

Use this to check (e.g. at compile time) if the version of the sword lib is recent enough for your program.

Definition at line 60 of file swversion.h.


The documentation for this class was generated from the following file: