Repository URL to install this package:
//
// Version.h
// DynamicEngine
//
// Created by Mobile3D on 03/12/13.
// Copyright (c) 2013 Mobile3D. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface Version : NSObject
/**
* Class method that creates a new Version object with a version string.
* The string must have three dot-separated components, es: 1.11.12
*
* @param versionString The version string to parse.
* @return The verion instance parsed from the string.
*/
+ (Version *) versionWithStringVersion:(NSString *) versionString;
/**
* Initializes a new Version object with a version string.
* The string must have three dot-separated components, es: 1.11.12
*
* @param versionString The version string to parse.
* @return The verion instance parsed from the string.
*/
- (id) initWithVersionString:(NSString *) versionString;
/**
* Implementation of the compare method. It compares the instance with another version object.
*
* @param otherVersion The other version object to compare to.
* @return An NSComparisonResult indicating the result of the compare.
*/
- (NSComparisonResult) compare:(Version *) otherVersion;
/**
* Used to get the major version number.
*
* @return An NSNumber with the major version.
*/
- (NSNumber *) getMajor;
/**
* Used to get the minor version number.
*
* @return An NSNumber with the minor version.
*/
- (NSNumber *) getMinor;
/**
* Used to get the micro version number.
*
* @return An NSNumber with the micro version.
*/
- (NSNumber *) getMicro;
/**
* Used to get a string representation of the version number.
*
* @return A string representation of the version number.
*/
- (NSString *) stringRepresentation;
/**
* Checks if this version is newer than another passed version.
*
* @param otherVersion The other version to compare this to.
*
* @return YES if it is newer, NO otherwise.
*/
- (BOOL) isNewerThan:(Version *) otherVersion;
/**
* Checks if this version is older than another passed version.
*
* @param otherVersion The other version to compare this to.
*
* @return YES if it is older, NO otherwise.
*/
- (BOOL) isOlderThan:(Version *) otherVersion;
/**
* Checks if this version is equal to another passed version.
*
* @param otherVersion The other version to compare this to.
*
* @return YES if it is equal, NO otherwise.
*/
- (BOOL) isEqualTo:(Version *) otherVersion;
@end