예제 #1
0
    def compare(self, epoch):
        '''
        Overriden.

        Raises: TypeNotFoundExImpl
        '''
        #epoch is SWIG generated
        if isinstance(epoch, acstimeSWIG.Epoch):
            return_value = acstimeSWIG.EpochHelper.compare(self, epoch)
        #epoch is CORBA generated
        elif isinstance(epoch, acstime.Epoch):
            #convert it into the SWIG generated class
            value = epoch.value
            epoch = acstimeSWIG.Epoch()
            epoch.value = value
            return_value = acstimeSWIG.EpochHelper.compare(self, epoch)
        #let them also use simple types...
        elif isinstance(epoch, long):
            value = epoch
            epoch = acstimeSWIG.Epoch()
            epoch.value = value
            return_value = acstimeSWIG.EpochHelper.compare(self, epoch)
        else:
            raise TypeNotFoundExImpl()

        if return_value == acstimeSWIG.TCEqualTo:
            return acstime.TCEqualTo
        elif return_value == acstimeSWIG.TCLessThan:
            return acstime.TCLessThan
        elif return_value == acstimeSWIG.TCGreaterThan:
            return acstime.TCGreaterThan
        elif return_value == acstimeSWIG.TCIndeterminate:
            return acstime.TCIndeterminate
        else:
            raise TypeNotFoundExImpl()
예제 #2
0
    def value(self, epoch=None):
        '''
        Overriden.

        Raises: TypeNotFoundExImpl
        '''
        #if provided nothing just use the superclass directly
        if epoch == None:
            return_value = acstimeSWIG.EpochHelper.value(self)
            return acstime.Epoch(return_value.value)
        #epoch is SWIG generated
        elif isinstance(epoch, acstimeSWIG.Epoch):
            acstimeSWIG.EpochHelper.value(self, epoch)
        #epoch is CORBA generated
        elif isinstance(epoch, acstime.Epoch):
            #convert it into the SWIG generated class
            value = epoch.value
            epoch = acstimeSWIG.Epoch()
            epoch.value = value
            acstimeSWIG.EpochHelper.value(self, epoch)
        #let them also use simple types...
        elif isinstance(epoch, long):
            value = epoch
            epoch = acstimeSWIG.Epoch()
            epoch.value = value
            acstimeSWIG.EpochHelper.value(self, epoch)
        else:
            raise TypeNotFoundExImpl()
예제 #3
0
    def __init__(self, epoch=None):
        '''
        Constructor.
        
        Parameters: if epoch is specified it is used.  Otherwise we assume
        member values are decided by reset method.
        
        Raises: TypeNotFoundExImpl
        '''

        #if provided nothing just use the superclass directly
        if epoch == None:
            acstimeSWIG.EpochHelper.__init__(self)
        #epoch is SWIG generated
        elif isinstance(epoch, acstimeSWIG.Epoch):
            acstimeSWIG.EpochHelper.__init__(self, epoch)
        #epoch is CORBA generated
        elif isinstance(epoch, acstime.Epoch):
            #convert it into the SWIG generated class
            value = epoch.value
            epoch = acstimeSWIG.Epoch()
            epoch.value = value
            acstimeSWIG.EpochHelper.__init__(self, epoch)
        #let them also use simple types...
        elif isinstance(epoch, long):
            value = epoch
            epoch = acstimeSWIG.Epoch()
            epoch.value = value
            acstimeSWIG.EpochHelper.__init__(self, epoch)
        else:
            raise TypeNotFoundExImpl()
예제 #4
0
    def difference(self, epoch):
        '''
        Overriden.

        Raises: TypeNotFoundExImpl
        '''
        #epoch is SWIG generated
        if isinstance(epoch, acstimeSWIG.Epoch):
            return_value = acstimeSWIG.EpochHelper.difference(self, epoch)
            #convert it into a CORBA type
            return acstime.Duration(return_value.value)
        #epoch is CORBA generated
        elif isinstance(epoch, acstime.Epoch):
            #convert it into the SWIG generated class
            value = epoch.value
            epoch = acstimeSWIG.Epoch()
            epoch.value = value
            return_value = acstimeSWIG.EpochHelper.difference(self, epoch)
            #convert it into a CORBA type
            return acstime.Duration(return_value.value)
        #let them also use simple types...
        elif isinstance(epoch, long):
            value = epoch
            epoch = acstimeSWIG.Epoch()
            epoch.value = value
            return_value = acstimeSWIG.EpochHelper.difference(self, epoch)
            #convert it into a CORBA type
            return acstime.Duration(return_value.value)
        else:
            raise TypeNotFoundExImpl()
예제 #5
0
    def modulo(self, epoch):
        '''
        Overriden.

        Raises: TypeNotFoundExImpl
        '''
        #epoch is SWIG generated
        if isinstance(epoch, acstimeSWIG.Epoch):
            acstimeSWIG.EpochHelper.modulo(self, epoch)
        #epoch is CORBA generated
        elif isinstance(epoch, acstime.Epoch):
            #convert it into the SWIG generated class
            value = epoch.value
            epoch = acstimeSWIG.Epoch()
            epoch.value = value
            acstimeSWIG.EpochHelper.modulo(self, epoch)
        #let them also use simple types...
        elif isinstance(epoch, long):
            value = epoch
            epoch = acstimeSWIG.Epoch()
            epoch.value = value
            acstimeSWIG.EpochHelper.modulo(self, epoch)
        else:
            raise TypeNotFoundExImpl()
예제 #6
0
    def subtract(self, duration):
        '''
        Overriden.

        Raises: TypeNotFoundExImpl
        '''
        #duration is SWIG generated
        if isinstance(duration, acstimeSWIG.Duration):
            acstimeSWIG.EpochHelper.subtract(self, duration)
        #duration is CORBA generated
        elif isinstance(duration, acstime.Duration):
            #convert it into the SWIG generated class
            value = duration.value
            duration = acstimeSWIG.Duration()
            duration.value = value
            acstimeSWIG.EpochHelper.subtract(self, duration)
        #let them also use simple types...
        elif isinstance(duration, long):
            value = duration
            duration = acstimeSWIG.Duration()
            duration.value = value
            acstimeSWIG.EpochHelper.subtract(self, duration)
        else:
            raise TypeNotFoundExImpl()