C# Class TagTool.Definitions.Definition

Show file Open project: TheGuardians/TagTool

Public Methods

Method Description
Compare ( DefinitionSet lhs, DefinitionSet rhs ) : int

Compares two version numbers.

Detect ( TagCache cache, DefinitionSet &closestGuess ) : DefinitionSet

Detects the engine that a tags.dat was built for.

DetectFromTimestamp ( long timestamp, DefinitionSet &closestGuess ) : DefinitionSet

Detects the engine that a tags.dat was built for based on its timestamp.

GetTimestamp ( DefinitionSet version ) : long

Gets the timestamp for a version.

GetVersionString ( DefinitionSet version ) : string

Gets the version string corresponding to an DefinitionSet value.

IsBetween ( DefinitionSet compare, DefinitionSet min, DefinitionSet max ) : bool

Determines whether a version number is between two other version numbers (inclusive).

Method Details

Compare() public static method

Compares two version numbers.
public static Compare ( DefinitionSet lhs, DefinitionSet rhs ) : int
lhs DefinitionSet The left-hand version number.
rhs DefinitionSet The right-hand version number.
return int

Detect() public static method

Detects the engine that a tags.dat was built for.
public static Detect ( TagCache cache, DefinitionSet &closestGuess ) : DefinitionSet
cache TagTool.Cache.TagCache The cache file.
closestGuess DefinitionSet On return, the closest guess for the engine's version.
return DefinitionSet

DetectFromTimestamp() public static method

Detects the engine that a tags.dat was built for based on its timestamp.
public static DetectFromTimestamp ( long timestamp, DefinitionSet &closestGuess ) : DefinitionSet
timestamp long The timestamp.
closestGuess DefinitionSet On return, the closest guess for the engine's version.
return DefinitionSet

GetTimestamp() public static method

Gets the timestamp for a version.
public static GetTimestamp ( DefinitionSet version ) : long
version DefinitionSet The version.
return long

GetVersionString() public static method

Gets the version string corresponding to an DefinitionSet value.
public static GetVersionString ( DefinitionSet version ) : string
version DefinitionSet The version.
return string

IsBetween() public static method

Determines whether a version number is between two other version numbers (inclusive).
public static IsBetween ( DefinitionSet compare, DefinitionSet min, DefinitionSet max ) : bool
compare DefinitionSet The version number to compare. If this is , this function will always return true.
min DefinitionSet The minimum version number. If this is , then the lower bound will be ignored.
max DefinitionSet The maximum version number. If this is , then the upper bound will be ignored.
return bool