# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.1
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

"""
TopLoc module, see official documentation at
https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_toploc.html
"""

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _TopLoc
else:
    import _TopLoc

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

_swig_new_instance_method = _TopLoc.SWIG_PyInstanceMethod_New
_swig_new_static_method = _TopLoc.SWIG_PyStaticMethod_New

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


class SwigPyIterator(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _TopLoc.delete_SwigPyIterator
    value = _swig_new_instance_method(_TopLoc.SwigPyIterator_value)
    incr = _swig_new_instance_method(_TopLoc.SwigPyIterator_incr)
    decr = _swig_new_instance_method(_TopLoc.SwigPyIterator_decr)
    distance = _swig_new_instance_method(_TopLoc.SwigPyIterator_distance)
    equal = _swig_new_instance_method(_TopLoc.SwigPyIterator_equal)
    copy = _swig_new_instance_method(_TopLoc.SwigPyIterator_copy)
    next = _swig_new_instance_method(_TopLoc.SwigPyIterator_next)
    __next__ = _swig_new_instance_method(_TopLoc.SwigPyIterator___next__)
    previous = _swig_new_instance_method(_TopLoc.SwigPyIterator_previous)
    advance = _swig_new_instance_method(_TopLoc.SwigPyIterator_advance)
    __eq__ = _swig_new_instance_method(_TopLoc.SwigPyIterator___eq__)
    __ne__ = _swig_new_instance_method(_TopLoc.SwigPyIterator___ne__)
    __iadd__ = _swig_new_instance_method(_TopLoc.SwigPyIterator___iadd__)
    __isub__ = _swig_new_instance_method(_TopLoc.SwigPyIterator___isub__)
    __add__ = _swig_new_instance_method(_TopLoc.SwigPyIterator___add__)
    __sub__ = _swig_new_instance_method(_TopLoc.SwigPyIterator___sub__)
    def __iter__(self):
        return self

# Register SwigPyIterator in _TopLoc:
_TopLoc.SwigPyIterator_swigregister(SwigPyIterator)


def _dumps_object(klass):
    """ Overwrite default string output for any wrapped object.
    By default, __repr__ method returns something like:
    <OCC.Core.TopoDS.TopoDS_Shape; proxy of <Swig Object of type 'TopoDS_Shape *' at 0x02BB0758> >
    This is too much verbose.
    We prefer :
    <class 'gp_Pnt'>
    or
    <class 'TopoDS_Shape'>
    """
    klass_name = str(klass.__class__).split(".")[3].split("'")[0]
    repr_string = "<class '" + klass_name + "'"
# for TopoDS_Shape, we also look for the base type
    if klass_name == "TopoDS_Shape":
        if klass.IsNull():
            repr_string += ": Null>"
            return repr_string
        st = klass.ShapeType()
        types = {OCC.Core.TopAbs.TopAbs_VERTEX: "Vertex",
                 OCC.Core.TopAbs.TopAbs_SOLID: "Solid",
                 OCC.Core.TopAbs.TopAbs_EDGE: "Edge",
                 OCC.Core.TopAbs.TopAbs_FACE: "Face",
                 OCC.Core.TopAbs.TopAbs_SHELL: "Shell",
                 OCC.Core.TopAbs.TopAbs_WIRE: "Wire",
                 OCC.Core.TopAbs.TopAbs_COMPOUND: "Compound",
                 OCC.Core.TopAbs.TopAbs_COMPSOLID: "Compsolid"}
        repr_string += "; Type:%s" % types[st]        
    elif hasattr(klass, "IsNull"):
        if klass.IsNull():
            repr_string += "; Null"
    repr_string += ">"
    return repr_string


from six import with_metaclass
import warnings
from OCC.Wrapper.wrapper_utils import Proxy, deprecated

import OCC.Core.Standard
import OCC.Core.NCollection
import OCC.Core.gp
Handle_TopLoc_Datum3D_Create = _TopLoc.Handle_TopLoc_Datum3D_Create
Handle_TopLoc_Datum3D_DownCast = _TopLoc.Handle_TopLoc_Datum3D_DownCast
Handle_TopLoc_Datum3D_IsNull = _TopLoc.Handle_TopLoc_Datum3D_IsNull
Handle_TopLoc_SListNodeOfItemLocation_Create = _TopLoc.Handle_TopLoc_SListNodeOfItemLocation_Create
Handle_TopLoc_SListNodeOfItemLocation_DownCast = _TopLoc.Handle_TopLoc_SListNodeOfItemLocation_DownCast
Handle_TopLoc_SListNodeOfItemLocation_IsNull = _TopLoc.Handle_TopLoc_SListNodeOfItemLocation_IsNull
class TopLoc_MapOfLocation(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    cbegin = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_cbegin)
    cend = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_cend)

    def __init__(self, *args):
        _TopLoc.TopLoc_MapOfLocation_swiginit(self, _TopLoc.new_TopLoc_MapOfLocation(*args))
    Exchange = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Exchange)
    Assign = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Assign)
    Set = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Set)
    ReSize = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_ReSize)
    Add = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Add)
    Added = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Added)
    Remove = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Remove)
    Clear = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Clear)
    __swig_destroy__ = _TopLoc.delete_TopLoc_MapOfLocation
    Size = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Size)
    IsEqual = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_IsEqual)
    Contains = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Contains)
    Union = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Union)
    Unite = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Unite)
    HasIntersection = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_HasIntersection)
    Intersection = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Intersection)
    Intersect = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Intersect)
    Subtraction = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Subtraction)
    Subtract = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Subtract)
    Difference = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Difference)
    Differ = _swig_new_instance_method(_TopLoc.TopLoc_MapOfLocation_Differ)

# Register TopLoc_MapOfLocation in _TopLoc:
_TopLoc.TopLoc_MapOfLocation_swigregister(TopLoc_MapOfLocation)

class TopLoc_IndexedMapOfLocation(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    cbegin = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_cbegin)
    cend = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_cend)

    def __init__(self, *args):
        _TopLoc.TopLoc_IndexedMapOfLocation_swiginit(self, _TopLoc.new_TopLoc_IndexedMapOfLocation(*args))
    Exchange = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_Exchange)
    Assign = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_Assign)
    Set = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_Set)
    ReSize = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_ReSize)
    Add = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_Add)
    Contains = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_Contains)
    Substitute = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_Substitute)
    Swap = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_Swap)
    RemoveLast = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_RemoveLast)
    RemoveFromIndex = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_RemoveFromIndex)
    RemoveKey = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_RemoveKey)
    FindKey = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_FindKey)
    __call__ = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation___call__)
    FindIndex = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_FindIndex)
    Clear = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_Clear)
    __swig_destroy__ = _TopLoc.delete_TopLoc_IndexedMapOfLocation
    Size = _swig_new_instance_method(_TopLoc.TopLoc_IndexedMapOfLocation_Size)

# Register TopLoc_IndexedMapOfLocation in _TopLoc:
_TopLoc.TopLoc_IndexedMapOfLocation_swigregister(TopLoc_IndexedMapOfLocation)

class TopLoc_MapLocationHasher(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    HashCode = _swig_new_static_method(_TopLoc.TopLoc_MapLocationHasher_HashCode)
    IsEqual = _swig_new_static_method(_TopLoc.TopLoc_MapLocationHasher_IsEqual)

    def __init__(self):
        _TopLoc.TopLoc_MapLocationHasher_swiginit(self, _TopLoc.new_TopLoc_MapLocationHasher())
    __swig_destroy__ = _TopLoc.delete_TopLoc_MapLocationHasher

# Register TopLoc_MapLocationHasher in _TopLoc:
_TopLoc.TopLoc_MapLocationHasher_swigregister(TopLoc_MapLocationHasher)
TopLoc_MapLocationHasher_HashCode = _TopLoc.TopLoc_MapLocationHasher_HashCode
TopLoc_MapLocationHasher_IsEqual = _TopLoc.TopLoc_MapLocationHasher_IsEqual

class TopLoc_Datum3D(OCC.Core.Standard.Standard_Transient):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    DumpJsonToString = _swig_new_instance_method(_TopLoc.TopLoc_Datum3D_DumpJsonToString)
    ShallowDumpToString = _swig_new_instance_method(_TopLoc.TopLoc_Datum3D_ShallowDumpToString)

    def __init__(self, *args):
        r"""
        * Constructs a default Datum3D.
        	:rtype: None* Constructs a Datum3D form a Trsf from gp. An error is raised if the Trsf is not a rigid transformation.
        	:param T:
        	:type T: gp_Trsf
        	:rtype: None
        """
        _TopLoc.TopLoc_Datum3D_swiginit(self, _TopLoc.new_TopLoc_Datum3D(*args))
    Transformation = _swig_new_instance_method(_TopLoc.TopLoc_Datum3D_Transformation)


    @staticmethod
    def DownCast(t):
      return Handle_TopLoc_Datum3D_DownCast(t)


    __repr__ = _dumps_object

    __swig_destroy__ = _TopLoc.delete_TopLoc_Datum3D

# Register TopLoc_Datum3D in _TopLoc:
_TopLoc.TopLoc_Datum3D_swigregister(TopLoc_Datum3D)

class TopLoc_ItemLocation(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    DumpJsonToString = _swig_new_instance_method(_TopLoc.TopLoc_ItemLocation_DumpJsonToString)

    def __init__(self, *args):
        r"""
        * Sets the elementary Datum to <D> Sets the exponent to <P>
        	:param D:
        	:type D: TopLoc_Datum3D
        	:param P:
        	:type P: int
        	:rtype: None
        """
        _TopLoc.TopLoc_ItemLocation_swiginit(self, _TopLoc.new_TopLoc_ItemLocation(*args))

    __repr__ = _dumps_object

    __swig_destroy__ = _TopLoc.delete_TopLoc_ItemLocation

# Register TopLoc_ItemLocation in _TopLoc:
_TopLoc.TopLoc_ItemLocation_swigregister(TopLoc_ItemLocation)

class TopLoc_Location(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    Divided = _swig_new_instance_method(_TopLoc.TopLoc_Location_Divided)
    DumpJsonToString = _swig_new_instance_method(_TopLoc.TopLoc_Location_DumpJsonToString)
    FirstDatum = _swig_new_instance_method(_TopLoc.TopLoc_Location_FirstDatum)
    FirstPower = _swig_new_instance_method(_TopLoc.TopLoc_Location_FirstPower)
    HashCode = _swig_new_instance_method(_TopLoc.TopLoc_Location_HashCode)
    __hash__ = _swig_new_instance_method(_TopLoc.TopLoc_Location___hash__)
    Identity = _swig_new_instance_method(_TopLoc.TopLoc_Location_Identity)
    Inverted = _swig_new_instance_method(_TopLoc.TopLoc_Location_Inverted)
    IsDifferent = _swig_new_instance_method(_TopLoc.TopLoc_Location_IsDifferent)
    IsEqual = _swig_new_instance_method(_TopLoc.TopLoc_Location_IsEqual)
    IsIdentity = _swig_new_instance_method(_TopLoc.TopLoc_Location_IsIdentity)
    Multiplied = _swig_new_instance_method(_TopLoc.TopLoc_Location_Multiplied)
    NextLocation = _swig_new_instance_method(_TopLoc.TopLoc_Location_NextLocation)
    Powered = _swig_new_instance_method(_TopLoc.TopLoc_Location_Powered)
    Predivided = _swig_new_instance_method(_TopLoc.TopLoc_Location_Predivided)
    ShallowDumpToString = _swig_new_instance_method(_TopLoc.TopLoc_Location_ShallowDumpToString)

    def __init__(self, *args):
        r"""
        * Constructs an empty local coordinate system object. Note: A Location constructed from a default datum is said to be 'empty'.
        	:rtype: None* Constructs the local coordinate system object defined by the transformation T. T invokes in turn, a TopLoc_Datum3D object.
        	:param T:
        	:type T: gp_Trsf
        	:rtype: None* Constructs the local coordinate system object defined by the 3D datum D. Exceptions Standard_ConstructionError if the transformation T does not represent a 3D coordinate system.
        	:param D:
        	:type D: TopLoc_Datum3D
        	:rtype: None
        """
        _TopLoc.TopLoc_Location_swiginit(self, _TopLoc.new_TopLoc_Location(*args))
    Transformation = _swig_new_instance_method(_TopLoc.TopLoc_Location_Transformation)
    __mul__ = _swig_new_instance_method(_TopLoc.TopLoc_Location___mul__)

    def __truediv__(self, *args):
        return _TopLoc.TopLoc_Location___truediv__(self, *args)
    __div__ = __truediv__


    __eq_wrapper__ = _swig_new_instance_method(_TopLoc.TopLoc_Location___eq_wrapper__)

    def __eq__(self, right):
        try:
            return self.__eq_wrapper__(right)
        except:
            return False


    __repr__ = _dumps_object

    __swig_destroy__ = _TopLoc.delete_TopLoc_Location

# Register TopLoc_Location in _TopLoc:
_TopLoc.TopLoc_Location_swigregister(TopLoc_Location)

class TopLoc_SListNodeOfItemLocation(OCC.Core.Standard.Standard_Transient):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    Tail = _swig_new_instance_method(_TopLoc.TopLoc_SListNodeOfItemLocation_Tail)

    def __init__(self, *args):
        r"""
        :param I:
        	:type I: TopLoc_ItemLocation
        	:param aTail:
        	:type aTail: TopLoc_SListOfItemLocation
        	:rtype: None
        """
        _TopLoc.TopLoc_SListNodeOfItemLocation_swiginit(self, _TopLoc.new_TopLoc_SListNodeOfItemLocation(*args))
    Value = _swig_new_instance_method(_TopLoc.TopLoc_SListNodeOfItemLocation_Value)


    @staticmethod
    def DownCast(t):
      return Handle_TopLoc_SListNodeOfItemLocation_DownCast(t)


    __repr__ = _dumps_object

    __swig_destroy__ = _TopLoc.delete_TopLoc_SListNodeOfItemLocation

# Register TopLoc_SListNodeOfItemLocation in _TopLoc:
_TopLoc.TopLoc_SListNodeOfItemLocation_swigregister(TopLoc_SListNodeOfItemLocation)

class TopLoc_SListOfItemLocation(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    Assign = _swig_new_instance_method(_TopLoc.TopLoc_SListOfItemLocation_Assign)
    Clear = _swig_new_instance_method(_TopLoc.TopLoc_SListOfItemLocation_Clear)
    Construct = _swig_new_instance_method(_TopLoc.TopLoc_SListOfItemLocation_Construct)
    IsEmpty = _swig_new_instance_method(_TopLoc.TopLoc_SListOfItemLocation_IsEmpty)
    More = _swig_new_instance_method(_TopLoc.TopLoc_SListOfItemLocation_More)
    Next = _swig_new_instance_method(_TopLoc.TopLoc_SListOfItemLocation_Next)
    Tail = _swig_new_instance_method(_TopLoc.TopLoc_SListOfItemLocation_Tail)
    ToTail = _swig_new_instance_method(_TopLoc.TopLoc_SListOfItemLocation_ToTail)

    def __init__(self, *args):
        r"""
        * Creates an empty List.
        	:rtype: None* Creates a List with <anItem> as value and <aTail> as tail.
        	:param anItem:
        	:type anItem: TopLoc_ItemLocation
        	:param aTail:
        	:type aTail: TopLoc_SListOfItemLocation
        	:rtype: None* Creates a list from an other one. The lists are shared.
        	:param Other:
        	:type Other: TopLoc_SListOfItemLocation
        	:rtype: None* Move constructor
        	:param theOther:
        	:type theOther: TopLoc_SListOfItemLocation
        	:rtype: None
        """
        _TopLoc.TopLoc_SListOfItemLocation_swiginit(self, _TopLoc.new_TopLoc_SListOfItemLocation(*args))
    Value = _swig_new_instance_method(_TopLoc.TopLoc_SListOfItemLocation_Value)
    Set = _swig_new_instance_method(_TopLoc.TopLoc_SListOfItemLocation_Set)

    __repr__ = _dumps_object

    __swig_destroy__ = _TopLoc.delete_TopLoc_SListOfItemLocation

# Register TopLoc_SListOfItemLocation in _TopLoc:
_TopLoc.TopLoc_SListOfItemLocation_swigregister(TopLoc_SListOfItemLocation)



