# -*- coding: utf-8 -*-
# **********************************************************************
#
# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************
#
# Ice version 3.6.3
#
# <auto-generated>
#
# Generated from file `sharknir.ice'
#
# Warning: do not edit this file.
#
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module sharknir
_M_sharknir = Ice.openModule('sharknir')
__name__ = 'sharknir'

if 'NonSciAssembly' not in _M_sharknir.__dict__:
    _M_sharknir.NonSciAssembly = Ice.createTempClass()
    class NonSciAssembly(object):
        """
        Assembly for non science devices
        """
        def __init__(self, name='', posApodizer=0, posCoroSlit=0, posLyotGrism=0, posWollaston=0, rotator=False):
            self.name = name
            self.posApodizer = posApodizer
            self.posCoroSlit = posCoroSlit
            self.posLyotGrism = posLyotGrism
            self.posWollaston = posWollaston
            self.rotator = rotator

        def __hash__(self):
            _h = 0
            _h = 5 * _h + Ice.getHash(self.name)
            _h = 5 * _h + Ice.getHash(self.posApodizer)
            _h = 5 * _h + Ice.getHash(self.posCoroSlit)
            _h = 5 * _h + Ice.getHash(self.posLyotGrism)
            _h = 5 * _h + Ice.getHash(self.posWollaston)
            _h = 5 * _h + Ice.getHash(self.rotator)
            return _h % 0x7fffffff

        def __compare(self, other):
            if other is None:
                return 1
            elif not isinstance(other, _M_sharknir.NonSciAssembly):
                return NotImplemented
            else:
                if self.name is None or other.name is None:
                    if self.name != other.name:
                        return (-1 if self.name is None else 1)
                else:
                    if self.name < other.name:
                        return -1
                    elif self.name > other.name:
                        return 1
                if self.posApodizer is None or other.posApodizer is None:
                    if self.posApodizer != other.posApodizer:
                        return (-1 if self.posApodizer is None else 1)
                else:
                    if self.posApodizer < other.posApodizer:
                        return -1
                    elif self.posApodizer > other.posApodizer:
                        return 1
                if self.posCoroSlit is None or other.posCoroSlit is None:
                    if self.posCoroSlit != other.posCoroSlit:
                        return (-1 if self.posCoroSlit is None else 1)
                else:
                    if self.posCoroSlit < other.posCoroSlit:
                        return -1
                    elif self.posCoroSlit > other.posCoroSlit:
                        return 1
                if self.posLyotGrism is None or other.posLyotGrism is None:
                    if self.posLyotGrism != other.posLyotGrism:
                        return (-1 if self.posLyotGrism is None else 1)
                else:
                    if self.posLyotGrism < other.posLyotGrism:
                        return -1
                    elif self.posLyotGrism > other.posLyotGrism:
                        return 1
                if self.posWollaston is None or other.posWollaston is None:
                    if self.posWollaston != other.posWollaston:
                        return (-1 if self.posWollaston is None else 1)
                else:
                    if self.posWollaston < other.posWollaston:
                        return -1
                    elif self.posWollaston > other.posWollaston:
                        return 1
                if self.rotator is None or other.rotator is None:
                    if self.rotator != other.rotator:
                        return (-1 if self.rotator is None else 1)
                else:
                    if self.rotator < other.rotator:
                        return -1
                    elif self.rotator > other.rotator:
                        return 1
                return 0

        def __lt__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r < 0

        def __le__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r <= 0

        def __gt__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r > 0

        def __ge__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r >= 0

        def __eq__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r == 0

        def __ne__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r != 0

        def __str__(self):
            return IcePy.stringify(self, _M_sharknir._t_NonSciAssembly)

        __repr__ = __str__

    _M_sharknir._t_NonSciAssembly = IcePy.defineStruct('::sharknir::NonSciAssembly', NonSciAssembly, (), (
        ('name', (), IcePy._t_string),
        ('posApodizer', (), IcePy._t_int),
        ('posCoroSlit', (), IcePy._t_int),
        ('posLyotGrism', (), IcePy._t_int),
        ('posWollaston', (), IcePy._t_int),
        ('rotator', (), IcePy._t_bool)
    ))

    _M_sharknir.NonSciAssembly = NonSciAssembly
    del NonSciAssembly

if 'SciAssembly' not in _M_sharknir.__dict__:
    _M_sharknir.SciAssembly = Ice.createTempClass()
    class SciAssembly(object):
        """
        Assembly for scientific wheels.
        """
        def __init__(self, posSci1=0, posSci2=0):
            self.posSci1 = posSci1
            self.posSci2 = posSci2

        def __hash__(self):
            _h = 0
            _h = 5 * _h + Ice.getHash(self.posSci1)
            _h = 5 * _h + Ice.getHash(self.posSci2)
            return _h % 0x7fffffff

        def __compare(self, other):
            if other is None:
                return 1
            elif not isinstance(other, _M_sharknir.SciAssembly):
                return NotImplemented
            else:
                if self.posSci1 is None or other.posSci1 is None:
                    if self.posSci1 != other.posSci1:
                        return (-1 if self.posSci1 is None else 1)
                else:
                    if self.posSci1 < other.posSci1:
                        return -1
                    elif self.posSci1 > other.posSci1:
                        return 1
                if self.posSci2 is None or other.posSci2 is None:
                    if self.posSci2 != other.posSci2:
                        return (-1 if self.posSci2 is None else 1)
                else:
                    if self.posSci2 < other.posSci2:
                        return -1
                    elif self.posSci2 > other.posSci2:
                        return 1
                return 0

        def __lt__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r < 0

        def __le__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r <= 0

        def __gt__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r > 0

        def __ge__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r >= 0

        def __eq__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r == 0

        def __ne__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r != 0

        def __str__(self):
            return IcePy.stringify(self, _M_sharknir._t_SciAssembly)

        __repr__ = __str__

    _M_sharknir._t_SciAssembly = IcePy.defineStruct('::sharknir::SciAssembly', SciAssembly, (), (
        ('posSci1', (), IcePy._t_int),
        ('posSci2', (), IcePy._t_int)
    ))

    _M_sharknir.SciAssembly = SciAssembly
    del SciAssembly

if '_t_dictNonSciAssembly' not in _M_sharknir.__dict__:
    _M_sharknir._t_dictNonSciAssembly = IcePy.defineDictionary('::sharknir::dictNonSciAssembly', (), IcePy._t_short, _M_sharknir._t_NonSciAssembly)

if '_t_dictSetupPos' not in _M_sharknir.__dict__:
    _M_sharknir._t_dictSetupPos = IcePy.defineDictionary('::sharknir::dictSetupPos', (), IcePy._t_string, IcePy._t_int)

if '_t_dictSetupNamedPos' not in _M_sharknir.__dict__:
    _M_sharknir._t_dictSetupNamedPos = IcePy.defineDictionary('::sharknir::dictSetupNamedPos', (), IcePy._t_string, IcePy._t_string)

if '_t_dictSciAssembly' not in _M_sharknir.__dict__:
    _M_sharknir._t_dictSciAssembly = IcePy.defineDictionary('::sharknir::dictSciAssembly', (), IcePy._t_short, _M_sharknir._t_NonSciAssembly)

# End of module sharknir
