Class StreamVersion
- java.lang.Object
-
- WildMagic.LibGraphics.ObjectSystem.StreamVersion
-
- All Implemented Interfaces:
java.io.Serializable
public class StreamVersion extends java.lang.Object implements java.io.SerializableScene graphs are stored in files with extension wmof. The header is of the form "Wild Magic Object 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 27, but the null terminator is written to disk, so total number of file bytes used by the version is 28. The current version is "4.02"- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StreamVersionCURRENTCurrent Version:static java.lang.StringLABELVersion label:static intLENGTHVersion label length:protected intm_iMajorMajor and Minor version numbers:protected intm_iMinorMajor and Minor version numbers:static intMAJORVersion major number:static intMINORVersion minor number:private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description StreamVersion()Create a new StreamVersion with default iMajor and iMinor version numbersStreamVersion(int iMajor, int iMinor)Create a new StreamVersion with the iMajor and iMinor version numbersStreamVersion(java.lang.String acString)Create a new StreamVersion from a Header String
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intGetCombined()Returns the combined version number values: 100*major + minorintGetMajor()Return the major version numberintGetMinor()Return the minor version numberbooleanGreaterEqual(StreamVersion rkVersion)For comparisons of versions.booleanIsValid()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 StreamVersion 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
-
StreamVersion
public StreamVersion()
Create a new StreamVersion with default iMajor and iMinor version numbers
-
StreamVersion
public StreamVersion(int iMajor, int iMinor)Create a new StreamVersion with the iMajor and iMinor version numbers- Parameters:
iMajor- the major version numberiMinor- the minor version number
-
StreamVersion
public StreamVersion(java.lang.String acString)
Create a new StreamVersion 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(StreamVersion rkVersion)
For comparisons of versions. This is useful in the Stream support in an Object-derived class whenever a change to that class causes a file format change.- Parameters:
rkVersion- the StreamVersion to comare with- Returns:
- if this StreamVersion is greater or equal to the input StreamVersion
-
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
-
-