Class ImageVersion
- java.lang.Object
-
- WildMagic.LibGraphics.ObjectSystem.ImageVersion
-
- All Implemented Interfaces:
java.io.Serializable
public class ImageVersion extends java.lang.Object implements java.io.Serializable
Images are stored in files with extension wmif. The header is of the form "Wild Magic Image File 4.xx" where the major version is 4 and the the minor version is xx in [00,99]. The length of the string is 26, but the null terminator is written to disk, so total number of file bytes used by the version is 27. The current version is "4.00"- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ImageVersion
CURRENT
Current Version:static java.lang.String
LABEL
Version label:static int
LENGTH
Version label length:protected int
m_iMajor
Major and Minor version numbers:protected int
m_iMinor
Major and Minor version numbers:static int
MAJOR
Version major number:static int
MINOR
Version minor number:private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description ImageVersion(int iMajor, int iMinor)
Create a new ImageVersion with the iMajor and iMinor version numbersImageVersion(java.lang.String acString)
Create a new ImageVersion from a Header String
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
GetCombined()
Returns the combined version number values: 100*major + minorint
GetMajor()
Return the major version numberint
GetMinor()
Return the minor version numberboolean
GreaterEqual(ImageVersion rkVersion)
For comparisons of versions.boolean
IsValid()
The version is valid if major is 4 and minor in [0,99].
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
MAJOR
public static final int MAJOR
Version major number:- See Also:
- Constant Field Values
-
MINOR
public static final int MINOR
Version minor number:- See Also:
- Constant Field Values
-
LABEL
public static final java.lang.String LABEL
Version label:
-
LENGTH
public static final int LENGTH
Version label length:
-
CURRENT
public static final ImageVersion CURRENT
Current Version:
-
m_iMajor
protected int m_iMajor
Major and Minor version numbers:
-
m_iMinor
protected int m_iMinor
Major and Minor version numbers:
-
-
Constructor Detail
-
ImageVersion
public ImageVersion(int iMajor, int iMinor)
Create a new ImageVersion with the iMajor and iMinor version numbers- Parameters:
iMajor
- the major version numberiMinor
- the minor version number
-
ImageVersion
public ImageVersion(java.lang.String acString)
Create a new ImageVersion from a Header String- Parameters:
acString
- the Header string containing the major and minor version numbers
-
-
Method Detail
-
GetMajor
public int GetMajor()
Return the major version number- Returns:
- the major version number
-
GetMinor
public int GetMinor()
Return the minor version number- Returns:
- the minor version number
-
GreaterEqual
public boolean GreaterEqual(ImageVersion rkVersion)
For comparisons of versions. This is useful whenever a change to the Image class causes a file format change.- Parameters:
rkVersion
- the ImageVersion to comare with- Returns:
- if this ImageVersion is greater or equal to the input ImageVersion
-
IsValid
public boolean IsValid()
The version is valid if major is 4 and minor in [0,99].- Returns:
- valid if major is 4 and minor in [0,99].
-
GetCombined
protected int GetCombined()
Returns the combined version number values: 100*major + minor- Returns:
- the combined version number values: 100*major + minor
-
-