# -*- coding: utf-8 -*-
# **********************************************************************
#
# Copyright (c) 2003-2017 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.4
#
# <auto-generated>
#
# Generated from file `visualization.ice'
#
# Warning: do not edit this file.
#
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy
import common_ice
import primitives_ice
import pose3d_ice

# Included module jderobot
_M_jderobot = Ice.openModule('jderobot')

# Start of module jderobot
__name__ = 'jderobot'

if 'Color' not in _M_jderobot.__dict__:
    _M_jderobot.Color = Ice.createTempClass()
    class Color(object):
        def __init__(self, r=0.0, g=0.0, b=0.0):
            self.r = r
            self.g = g
            self.b = b

        def __eq__(self, other):
            if other is None:
                return False
            elif not isinstance(other, _M_jderobot.Color):
                return NotImplemented
            else:
                if self.r != other.r:
                    return False
                if self.g != other.g:
                    return False
                if self.b != other.b:
                    return False
                return True

        def __ne__(self, other):
            return not self.__eq__(other)

        def __str__(self):
            return IcePy.stringify(self, _M_jderobot._t_Color)

        __repr__ = __str__

    _M_jderobot._t_Color = IcePy.defineStruct('::jderobot::Color', Color, (), (
        ('r', (), IcePy._t_float),
        ('g', (), IcePy._t_float),
        ('b', (), IcePy._t_float)
    ))

    _M_jderobot.Color = Color
    del Color

if 'RGBSegment' not in _M_jderobot.__dict__:
    _M_jderobot.RGBSegment = Ice.createTempClass()
    class RGBSegment(object):
        def __init__(self, seg=Ice._struct_marker, c=Ice._struct_marker):
            if seg is Ice._struct_marker:
                self.seg = _M_jderobot.Segment()
            else:
                self.seg = seg
            if c is Ice._struct_marker:
                self.c = _M_jderobot.Color()
            else:
                self.c = c

        def __eq__(self, other):
            if other is None:
                return False
            elif not isinstance(other, _M_jderobot.RGBSegment):
                return NotImplemented
            else:
                if self.seg != other.seg:
                    return False
                if self.c != other.c:
                    return False
                return True

        def __ne__(self, other):
            return not self.__eq__(other)

        def __str__(self):
            return IcePy.stringify(self, _M_jderobot._t_RGBSegment)

        __repr__ = __str__

    _M_jderobot._t_RGBSegment = IcePy.defineStruct('::jderobot::RGBSegment', RGBSegment, (), (
        ('seg', (), _M_jderobot._t_Segment),
        ('c', (), _M_jderobot._t_Color)
    ))

    _M_jderobot.RGBSegment = RGBSegment
    del RGBSegment

if '_t_Segments' not in _M_jderobot.__dict__:
    _M_jderobot._t_Segments = IcePy.defineSequence('::jderobot::Segments', (), _M_jderobot._t_RGBSegment)

if '_t_Points' not in _M_jderobot.__dict__:
    _M_jderobot._t_Points = IcePy.defineSequence('::jderobot::Points', (), _M_jderobot._t_RGBPoint)

if '_t_File' not in _M_jderobot.__dict__:
    _M_jderobot._t_File = IcePy.defineSequence('::jderobot::File', (), IcePy._t_byte)

if 'bufferSegments' not in _M_jderobot.__dict__:
    _M_jderobot.bufferSegments = Ice.createTempClass()
    class bufferSegments(object):
        def __init__(self, buffer=None, refresh=False):
            self.buffer = buffer
            self.refresh = refresh

        def __eq__(self, other):
            if other is None:
                return False
            elif not isinstance(other, _M_jderobot.bufferSegments):
                return NotImplemented
            else:
                if self.buffer != other.buffer:
                    return False
                if self.refresh != other.refresh:
                    return False
                return True

        def __ne__(self, other):
            return not self.__eq__(other)

        def __str__(self):
            return IcePy.stringify(self, _M_jderobot._t_bufferSegments)

        __repr__ = __str__

    _M_jderobot._t_bufferSegments = IcePy.defineStruct('::jderobot::bufferSegments', bufferSegments, (), (
        ('buffer', (), _M_jderobot._t_Segments),
        ('refresh', (), IcePy._t_bool)
    ))

    _M_jderobot.bufferSegments = bufferSegments
    del bufferSegments

if 'bufferPoints' not in _M_jderobot.__dict__:
    _M_jderobot.bufferPoints = Ice.createTempClass()
    class bufferPoints(object):
        def __init__(self, buffer=None, refresh=False):
            self.buffer = buffer
            self.refresh = refresh

        def __eq__(self, other):
            if other is None:
                return False
            elif not isinstance(other, _M_jderobot.bufferPoints):
                return NotImplemented
            else:
                if self.buffer != other.buffer:
                    return False
                if self.refresh != other.refresh:
                    return False
                return True

        def __ne__(self, other):
            return not self.__eq__(other)

        def __str__(self):
            return IcePy.stringify(self, _M_jderobot._t_bufferPoints)

        __repr__ = __str__

    _M_jderobot._t_bufferPoints = IcePy.defineStruct('::jderobot::bufferPoints', bufferPoints, (), (
        ('buffer', (), _M_jderobot._t_Points),
        ('refresh', (), IcePy._t_bool)
    ))

    _M_jderobot.bufferPoints = bufferPoints
    del bufferPoints

if 'object3d' not in _M_jderobot.__dict__:
    _M_jderobot.object3d = Ice.createTempClass()
    class object3d(object):
        def __init__(self, obj='', id='', format=''):
            self.obj = obj
            self.id = id
            self.format = format

        def __hash__(self):
            _h = 0
            _h = 5 * _h + Ice.getHash(self.obj)
            _h = 5 * _h + Ice.getHash(self.id)
            _h = 5 * _h + Ice.getHash(self.format)
            return _h % 0x7fffffff

        def __compare(self, other):
            if other is None:
                return 1
            elif not isinstance(other, _M_jderobot.object3d):
                return NotImplemented
            else:
                if self.obj is None or other.obj is None:
                    if self.obj != other.obj:
                        return (-1 if self.obj is None else 1)
                else:
                    if self.obj < other.obj:
                        return -1
                    elif self.obj > other.obj:
                        return 1
                if self.id is None or other.id is None:
                    if self.id != other.id:
                        return (-1 if self.id is None else 1)
                else:
                    if self.id < other.id:
                        return -1
                    elif self.id > other.id:
                        return 1
                if self.format is None or other.format is None:
                    if self.format != other.format:
                        return (-1 if self.format is None else 1)
                else:
                    if self.format < other.format:
                        return -1
                    elif self.format > other.format:
                        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_jderobot._t_object3d)

        __repr__ = __str__

    _M_jderobot._t_object3d = IcePy.defineStruct('::jderobot::object3d', object3d, (), (
        ('obj', (), IcePy._t_string),
        ('id', (), IcePy._t_string),
        ('format', (), IcePy._t_string)
    ))

    _M_jderobot.object3d = object3d
    del object3d

if 'PoseObj3D' not in _M_jderobot.__dict__:
    _M_jderobot.PoseObj3D = Ice.createTempClass()
    class PoseObj3D(object):
        def __init__(self, id='', pos=None):
            self.id = id
            self.pos = pos

        def __eq__(self, other):
            if other is None:
                return False
            elif not isinstance(other, _M_jderobot.PoseObj3D):
                return NotImplemented
            else:
                if self.id != other.id:
                    return False
                if self.pos != other.pos:
                    return False
                return True

        def __ne__(self, other):
            return not self.__eq__(other)

        def __str__(self):
            return IcePy.stringify(self, _M_jderobot._t_PoseObj3D)

        __repr__ = __str__

    _M_jderobot._t_PoseObj3D = IcePy.defineStruct('::jderobot::PoseObj3D', PoseObj3D, (), (
        ('id', (), IcePy._t_string),
        ('pos', (), _M_jderobot._t_Pose3DData)
    ))

    _M_jderobot.PoseObj3D = PoseObj3D
    del PoseObj3D

if '_t_bufferPoseObj3D' not in _M_jderobot.__dict__:
    _M_jderobot._t_bufferPoseObj3D = IcePy.defineSequence('::jderobot::bufferPoseObj3D', (), _M_jderobot._t_PoseObj3D)

if 'Visualization' not in _M_jderobot.__dict__:
    _M_jderobot.Visualization = Ice.createTempClass()
    class Visualization(Ice.Object):
        """
        Interface to the Visualization interaction.
        """
        def __init__(self):
            if Ice.getType(self) == _M_jderobot.Visualization:
                raise RuntimeError('jderobot.Visualization is an abstract class')

        def ice_ids(self, current=None):
            return ('::Ice::Object', '::jderobot::Visualization')

        def ice_id(self, current=None):
            return '::jderobot::Visualization'

        def ice_staticId():
            return '::jderobot::Visualization'
        ice_staticId = staticmethod(ice_staticId)

        def drawSegment(self, bseg, current=None):
            pass

        def getSegment(self, current=None):
            pass

        def drawPoint(self, bpnts, current=None):
            pass

        def getPoints(self, current=None):
            pass

        def getObj3D(self, id, current=None):
            pass

        def getPoseObj3DData(self, current=None):
            pass

        def clearAll(self, current=None):
            pass

        def __str__(self):
            return IcePy.stringify(self, _M_jderobot._t_Visualization)

        __repr__ = __str__

    _M_jderobot.VisualizationPrx = Ice.createTempClass()
    class VisualizationPrx(Ice.ObjectPrx):

        def drawSegment(self, bseg, _ctx=None):
            return _M_jderobot.Visualization._op_drawSegment.invoke(self, ((bseg, ), _ctx))

        def begin_drawSegment(self, bseg, _response=None, _ex=None, _sent=None, _ctx=None):
            return _M_jderobot.Visualization._op_drawSegment.begin(self, ((bseg, ), _response, _ex, _sent, _ctx))

        def end_drawSegment(self, _r):
            return _M_jderobot.Visualization._op_drawSegment.end(self, _r)

        def getSegment(self, _ctx=None):
            return _M_jderobot.Visualization._op_getSegment.invoke(self, ((), _ctx))

        def begin_getSegment(self, _response=None, _ex=None, _sent=None, _ctx=None):
            return _M_jderobot.Visualization._op_getSegment.begin(self, ((), _response, _ex, _sent, _ctx))

        def end_getSegment(self, _r):
            return _M_jderobot.Visualization._op_getSegment.end(self, _r)

        def drawPoint(self, bpnts, _ctx=None):
            return _M_jderobot.Visualization._op_drawPoint.invoke(self, ((bpnts, ), _ctx))

        def begin_drawPoint(self, bpnts, _response=None, _ex=None, _sent=None, _ctx=None):
            return _M_jderobot.Visualization._op_drawPoint.begin(self, ((bpnts, ), _response, _ex, _sent, _ctx))

        def end_drawPoint(self, _r):
            return _M_jderobot.Visualization._op_drawPoint.end(self, _r)

        def getPoints(self, _ctx=None):
            return _M_jderobot.Visualization._op_getPoints.invoke(self, ((), _ctx))

        def begin_getPoints(self, _response=None, _ex=None, _sent=None, _ctx=None):
            return _M_jderobot.Visualization._op_getPoints.begin(self, ((), _response, _ex, _sent, _ctx))

        def end_getPoints(self, _r):
            return _M_jderobot.Visualization._op_getPoints.end(self, _r)

        def getObj3D(self, id, _ctx=None):
            return _M_jderobot.Visualization._op_getObj3D.invoke(self, ((id, ), _ctx))

        def begin_getObj3D(self, id, _response=None, _ex=None, _sent=None, _ctx=None):
            return _M_jderobot.Visualization._op_getObj3D.begin(self, ((id, ), _response, _ex, _sent, _ctx))

        def end_getObj3D(self, _r):
            return _M_jderobot.Visualization._op_getObj3D.end(self, _r)

        def getPoseObj3DData(self, _ctx=None):
            return _M_jderobot.Visualization._op_getPoseObj3DData.invoke(self, ((), _ctx))

        def begin_getPoseObj3DData(self, _response=None, _ex=None, _sent=None, _ctx=None):
            return _M_jderobot.Visualization._op_getPoseObj3DData.begin(self, ((), _response, _ex, _sent, _ctx))

        def end_getPoseObj3DData(self, _r):
            return _M_jderobot.Visualization._op_getPoseObj3DData.end(self, _r)

        def clearAll(self, _ctx=None):
            return _M_jderobot.Visualization._op_clearAll.invoke(self, ((), _ctx))

        def begin_clearAll(self, _response=None, _ex=None, _sent=None, _ctx=None):
            return _M_jderobot.Visualization._op_clearAll.begin(self, ((), _response, _ex, _sent, _ctx))

        def end_clearAll(self, _r):
            return _M_jderobot.Visualization._op_clearAll.end(self, _r)

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_jderobot.VisualizationPrx.ice_checkedCast(proxy, '::jderobot::Visualization', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_jderobot.VisualizationPrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

        def ice_staticId():
            return '::jderobot::Visualization'
        ice_staticId = staticmethod(ice_staticId)

    _M_jderobot._t_VisualizationPrx = IcePy.defineProxy('::jderobot::Visualization', VisualizationPrx)

    _M_jderobot._t_Visualization = IcePy.defineClass('::jderobot::Visualization', Visualization, -1, (), True, False, None, (), ())
    Visualization._ice_type = _M_jderobot._t_Visualization

    Visualization._op_drawSegment = IcePy.Operation('drawSegment', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (((), _M_jderobot._t_bufferSegments, False, 0),), (), None, ())
    Visualization._op_getSegment = IcePy.Operation('getSegment', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (), (), ((), _M_jderobot._t_bufferSegments, False, 0), ())
    Visualization._op_drawPoint = IcePy.Operation('drawPoint', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (((), _M_jderobot._t_bufferPoints, False, 0),), (), None, ())
    Visualization._op_getPoints = IcePy.Operation('getPoints', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (), (), ((), _M_jderobot._t_bufferPoints, False, 0), ())
    Visualization._op_getObj3D = IcePy.Operation('getObj3D', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (((), IcePy._t_string, False, 0),), (), ((), _M_jderobot._t_object3d, False, 0), ())
    Visualization._op_getPoseObj3DData = IcePy.Operation('getPoseObj3DData', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (), (), ((), _M_jderobot._t_bufferPoseObj3D, False, 0), ())
    Visualization._op_clearAll = IcePy.Operation('clearAll', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (), (), None, ())

    _M_jderobot.Visualization = Visualization
    del Visualization

    _M_jderobot.VisualizationPrx = VisualizationPrx
    del VisualizationPrx

# End of module jderobot
