Source code for ApplicationVersioningSupport.VersionHistory
# Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
# **InsertLicense** code
#----------------------------------------------------------------------------------
#! VersionHistory: Info about the application's version history.
#/*!
# \file VersionHistory.py
# \author Jan-Martin Kuhnigk
# \date 2014-08
#*/
#----------------------------------------------------------------------------------
# associated_tests: ApplicationVersioningSupport.tests.VersionHistoryTest
__author__ = 'jmkuhnigk'
from .VersionInfo import VersionInfo
[docs]class VersionHistory( object ):
"""
Information about an application's version history.
"""
def __init__( self ):
self.currentVersion = VersionInfo( )
def __eq__( self, other ):
if type( other ) is type( self ):
return self.__dict__ == other.__dict__
else:
return False
# Hash function needs to be overridden for Python3 compatibility due to overriden __eq__, but since we don't need
# hashing right now, we disable it.
__hash__ = None
def __ne__( self, other ):
return not self.__eq__( other )
def __repr__( self ):
return self.__dict__.__repr__( )
def getCurrentVersionInfo( self ):
return self.currentVersion
def setCurrentVersionInfo( self, versionInfo ):
self.currentVersion = versionInfo