FEDEM Solver  R8.0
Source code of the dynamics solver
Public Member Functions | Private Attributes | List of all members
FFaVersionNumber Class Reference

A class to keep Fedem version numbers. More...

#include <FFaVersionNumber.H>

Public Member Functions

 FFaVersionNumber (int n1=0, int n2=0, int n3=0, int n4=-1)
 Default constructor. More...
 
 FFaVersionNumber (const std::string &s)
 Constructor initializing the version number from a string. More...
 
void setVersion (int n1, int n2=0, int n3=0, int n4=-1)
 Sets the version number. More...
 
void parseLine (const std::string &line, char skipUntil='\0')
 Parses a version number from the provided string. More...
 
void set (int i, int n)
 Sets the major-, minor- or patch version or the build number. More...
 
int get (int i) const
 returns the major-, minor- or patch version or the build number. More...
 
const std::string & getString () const
 Returns the string representation of this version number. More...
 
std::string getInterpretedString () const
 Returns a converted string representation of this version number. More...
 
bool operator> (const FFaVersionNumber &v) const
 Greater than operator. More...
 
bool operator== (const FFaVersionNumber &v) const
 Equality operator. More...
 
bool operator>= (const FFaVersionNumber &v) const
 Greater or equal to operator. More...
 
bool operator< (const FFaVersionNumber &v) const
 Less than operator. More...
 
bool operator<= (const FFaVersionNumber &v) const
 Less than or equal to operator. More...
 

Private Attributes

int d1
 Major version number. More...
 
int d2
 Minor version number. More...
 
int d3
 Patch version number. More...
 
int build
 Internal build number. More...
 
std::string version
 String representation of the version number. More...
 

Detailed Description

A class to keep Fedem version numbers.

Used to enable automatic conversion of older model files, etc. Version numbers like R2.5m3-i4 are stored as d1=2 d2=5 d3=3 internal=4.

Constructor & Destructor Documentation

◆ FFaVersionNumber() [1/2]

FFaVersionNumber::FFaVersionNumber ( int  n1 = 0,
int  n2 = 0,
int  n3 = 0,
int  n4 = -1 
)

Default constructor.

◆ FFaVersionNumber() [2/2]

FFaVersionNumber::FFaVersionNumber ( const std::string &  s)
inline

Constructor initializing the version number from a string.

Member Function Documentation

◆ get()

int FFaVersionNumber::get ( int  i) const

returns the major-, minor- or patch version or the build number.

◆ getInterpretedString()

std::string FFaVersionNumber::getInterpretedString ( ) const

Returns a converted string representation of this version number.

◆ getString()

const std::string& FFaVersionNumber::getString ( ) const
inline

Returns the string representation of this version number.

◆ operator<()

bool FFaVersionNumber::operator< ( const FFaVersionNumber v) const

Less than operator.

◆ operator<=()

bool FFaVersionNumber::operator<= ( const FFaVersionNumber v) const

Less than or equal to operator.

◆ operator==()

bool FFaVersionNumber::operator== ( const FFaVersionNumber v) const

Equality operator.

◆ operator>()

bool FFaVersionNumber::operator> ( const FFaVersionNumber v) const

Greater than operator.

◆ operator>=()

bool FFaVersionNumber::operator>= ( const FFaVersionNumber v) const

Greater or equal to operator.

◆ parseLine()

void FFaVersionNumber::parseLine ( const std::string &  line,
char  skipUntil = '\0' 
)

Parses a version number from the provided string.

◆ set()

void FFaVersionNumber::set ( int  i,
int  n 
)

Sets the major-, minor- or patch version or the build number.

◆ setVersion()

void FFaVersionNumber::setVersion ( int  n1,
int  n2 = 0,
int  n3 = 0,
int  n4 = -1 
)

Sets the version number.

Member Data Documentation

◆ build

int FFaVersionNumber::build
private

Internal build number.

◆ d1

int FFaVersionNumber::d1
private

Major version number.

◆ d2

int FFaVersionNumber::d2
private

Minor version number.

◆ d3

int FFaVersionNumber::d3
private

Patch version number.

◆ version

std::string FFaVersionNumber::version
private

String representation of the version number.


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