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

"""
XmlObjMgt module, see official documentation at
https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xmlobjmgt.html
"""

from sys import version_info as _swig_python_version_info
# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _XmlObjMgt
else:
    import _XmlObjMgt

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

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 == "this":
            set(self, name, value)
        elif name == "thisown":
            self.this.own(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__ = _XmlObjMgt.delete_SwigPyIterator

    def value(self):
        return _XmlObjMgt.SwigPyIterator_value(self)

    def incr(self, n=1):
        return _XmlObjMgt.SwigPyIterator_incr(self, n)

    def decr(self, n=1):
        return _XmlObjMgt.SwigPyIterator_decr(self, n)

    def distance(self, x):
        return _XmlObjMgt.SwigPyIterator_distance(self, x)

    def equal(self, x):
        return _XmlObjMgt.SwigPyIterator_equal(self, x)

    def copy(self):
        return _XmlObjMgt.SwigPyIterator_copy(self)

    def next(self):
        return _XmlObjMgt.SwigPyIterator_next(self)

    def __next__(self):
        return _XmlObjMgt.SwigPyIterator___next__(self)

    def previous(self):
        return _XmlObjMgt.SwigPyIterator_previous(self)

    def advance(self, n):
        return _XmlObjMgt.SwigPyIterator_advance(self, n)

    def __eq__(self, x):
        return _XmlObjMgt.SwigPyIterator___eq__(self, x)

    def __ne__(self, x):
        return _XmlObjMgt.SwigPyIterator___ne__(self, x)

    def __iadd__(self, n):
        return _XmlObjMgt.SwigPyIterator___iadd__(self, n)

    def __isub__(self, n):
        return _XmlObjMgt.SwigPyIterator___isub__(self, n)

    def __add__(self, n):
        return _XmlObjMgt.SwigPyIterator___add__(self, n)

    def __sub__(self, *args):
        return _XmlObjMgt.SwigPyIterator___sub__(self, *args)
    def __iter__(self):
        return self

# Register SwigPyIterator in _XmlObjMgt:
_XmlObjMgt.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


def process_exception(error, method_name, class_name):
    return _XmlObjMgt.process_exception(error, method_name, class_name)

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.LDOM
import OCC.Core.TCollection
import OCC.Core.gp
import OCC.Core.TColStd
import OCC.Core.Storage

from enum import IntEnum
from OCC.Core.Exception import *



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

    @staticmethod
    def FindChildByName(*args):
        r"""

        Parameters
        ----------
        theSource: XmlObjMgt_Element
        theName: XmlObjMgt_DOMString

        Return
        -------
        XmlObjMgt_Element

        Description
        -----------
        No available documentation.

        """
        return _XmlObjMgt.xmlobjmgt_FindChildByName(*args)

    @staticmethod
    def FindChildByRef(*args):
        r"""

        Parameters
        ----------
        theSource: XmlObjMgt_Element
        theRefName: XmlObjMgt_DOMString

        Return
        -------
        XmlObjMgt_Element

        Description
        -----------
        No available documentation.

        """
        return _XmlObjMgt.xmlobjmgt_FindChildByRef(*args)

    @staticmethod
    def FindChildElement(*args):
        r"""

        Parameters
        ----------
        theSource: XmlObjMgt_Element
        theObjId: int

        Return
        -------
        XmlObjMgt_Element

        Description
        -----------
        No available documentation.

        """
        return _XmlObjMgt.xmlobjmgt_FindChildElement(*args)

    @staticmethod
    def GetExtendedString(*args):
        r"""

        Parameters
        ----------
        theElement: XmlObjMgt_Element
        theString: str

        Return
        -------
        bool

        Description
        -----------
        Get attribute <theelement extstring='thestring' ...>.

        """
        return _XmlObjMgt.xmlobjmgt_GetExtendedString(*args)

    @staticmethod
    def GetReal(*args):
        r"""

        Parameters
        ----------
        theString: str

        Return
        -------
        theValue: float

        Description
        -----------
        No available documentation.

        Parameters
        ----------
        theString: XmlObjMgt_DOMString

        Return
        -------
        theValue: float

        Description
        -----------
        No available documentation.

        """
        return _XmlObjMgt.xmlobjmgt_GetReal(*args)

    @staticmethod
    def GetStringValue(*args):
        r"""

        Parameters
        ----------
        theElement: XmlObjMgt_Element

        Return
        -------
        XmlObjMgt_DOMString

        Description
        -----------
        Returns the first child text node.

        """
        return _XmlObjMgt.xmlobjmgt_GetStringValue(*args)

    @staticmethod
    def GetTagEntryString(*args):
        r"""

        Parameters
        ----------
        theTarget: XmlObjMgt_DOMString
        theTagEntry: str

        Return
        -------
        bool

        Description
        -----------
        Convert xpath expression (domstring) into tagentry string returns false on error.

        """
        return _XmlObjMgt.xmlobjmgt_GetTagEntryString(*args)

    @staticmethod
    def IdString(*args):
        r"""
        Return
        -------
        XmlObjMgt_DOMString

        Description
        -----------
        Define the name of xmlattribute 'id' (to be used everywhere).

        """
        return _XmlObjMgt.xmlobjmgt_IdString(*args)

    @staticmethod
    def SetExtendedString(*args):
        r"""

        Parameters
        ----------
        theElement: XmlObjMgt_Element
        theString: str

        Return
        -------
        bool

        Description
        -----------
        Add attribute <theelement extstring='thestring' ...>.

        """
        return _XmlObjMgt.xmlobjmgt_SetExtendedString(*args)

    @staticmethod
    def SetStringValue(*args):
        r"""

        Parameters
        ----------
        theElement: XmlObjMgt_Element
        theData: XmlObjMgt_DOMString
        isClearText: bool (optional, default to Standard_False)

        Return
        -------
        None

        Description
        -----------
        Add thedata as the last child text node to theelement iscleartext(true) avoids analysis of the string and replacement of characters like '<' and '&' during xml file storage. do never set iscleartext unless you have a hell of a reason.

        """
        return _XmlObjMgt.xmlobjmgt_SetStringValue(*args)

    @staticmethod
    def SetTagEntryString(*args):
        r"""

        Parameters
        ----------
        theSource: XmlObjMgt_DOMString
        theTagEntry: str

        Return
        -------
        None

        Description
        -----------
        Convert xpath expression (domstring) into tagentry string returns false on error.

        """
        return _XmlObjMgt.xmlobjmgt_SetTagEntryString(*args)

    __repr__ = _dumps_object

    @methodnotwrapped
    def GetInteger(self):
    	pass


    def __init__(self):
        _XmlObjMgt.xmlobjmgt_swiginit(self, _XmlObjMgt.new_xmlobjmgt())
    __swig_destroy__ = _XmlObjMgt.delete_xmlobjmgt

# Register xmlobjmgt in _XmlObjMgt:
_XmlObjMgt.xmlobjmgt_swigregister(xmlobjmgt)
class XmlObjMgt_Array1(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""

        Parameters
        ----------
        Low: int
        Up: int

        Return
        -------
        None

        Description
        -----------
        Create an array of lower bound <low> and upper bound <up>. range error is raised when <up> is less than <low>.

        Parameters
        ----------
        theParent: XmlObjMgt_Element
        theName: XmlObjMgt_DOMString

        Return
        -------
        None

        Description
        -----------
        For restoration from dom_element which is child of theparent: <theparent ...> <thename ...>.

        """
        _XmlObjMgt.XmlObjMgt_Array1_swiginit(self, _XmlObjMgt.new_XmlObjMgt_Array1(*args))

    def CreateArrayElement(self, *args):
        r"""

        Parameters
        ----------
        theParent: XmlObjMgt_Element
        theName: XmlObjMgt_DOMString

        Return
        -------
        None

        Description
        -----------
        Create dom_element representing the array, under 'theparent'.

        """
        return _XmlObjMgt.XmlObjMgt_Array1_CreateArrayElement(self, *args)

    def Element(self, *args):
        r"""
        Return
        -------
        XmlObjMgt_Element

        Description
        -----------
        Returns the dom element of <self>.

        """
        return _XmlObjMgt.XmlObjMgt_Array1_Element(self, *args)

    def Length(self, *args):
        r"""
        Return
        -------
        int

        Description
        -----------
        Returns the number of elements of <self>.

        """
        return _XmlObjMgt.XmlObjMgt_Array1_Length(self, *args)

    def Lower(self, *args):
        r"""
        Return
        -------
        int

        Description
        -----------
        Returns the lower bound.

        """
        return _XmlObjMgt.XmlObjMgt_Array1_Lower(self, *args)

    def SetValue(self, *args):
        r"""

        Parameters
        ----------
        Index: int
        Value: XmlObjMgt_Element

        Return
        -------
        None

        Description
        -----------
        Set the <index>th element of the array to <value>.

        """
        return _XmlObjMgt.XmlObjMgt_Array1_SetValue(self, *args)

    def Upper(self, *args):
        r"""
        Return
        -------
        int

        Description
        -----------
        Returns the upper bound.

        """
        return _XmlObjMgt.XmlObjMgt_Array1_Upper(self, *args)

    def Value(self, *args):
        r"""

        Parameters
        ----------
        Index: int

        Return
        -------
        XmlObjMgt_Element

        Description
        -----------
        Returns the value of <index>th element of the array.

        """
        return _XmlObjMgt.XmlObjMgt_Array1_Value(self, *args)

    __repr__ = _dumps_object

    __swig_destroy__ = _XmlObjMgt.delete_XmlObjMgt_Array1

# Register XmlObjMgt_Array1 in _XmlObjMgt:
_XmlObjMgt.XmlObjMgt_Array1_swigregister(XmlObjMgt_Array1)
class XmlObjMgt_GP(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    @staticmethod
    def Translate(*args):
        r"""

        Parameters
        ----------
        aTrsf: gp_Trsf

        Return
        -------
        XmlObjMgt_DOMString

        Description
        -----------
        No available documentation.

        Parameters
        ----------
        aMat: gp_Mat

        Return
        -------
        XmlObjMgt_DOMString

        Description
        -----------
        No available documentation.

        Parameters
        ----------
        anXYZ: gp_XYZ

        Return
        -------
        XmlObjMgt_DOMString

        Description
        -----------
        No available documentation.

        Parameters
        ----------
        aStr: XmlObjMgt_DOMString
        T: gp_Trsf

        Return
        -------
        bool

        Description
        -----------
        No available documentation.

        Parameters
        ----------
        aStr: XmlObjMgt_DOMString
        T: gp_Mat

        Return
        -------
        bool

        Description
        -----------
        No available documentation.

        Parameters
        ----------
        aStr: XmlObjMgt_DOMString
        T: gp_XYZ

        Return
        -------
        bool

        Description
        -----------
        No available documentation.

        """
        return _XmlObjMgt.XmlObjMgt_GP_Translate(*args)

    __repr__ = _dumps_object


    def __init__(self):
        _XmlObjMgt.XmlObjMgt_GP_swiginit(self, _XmlObjMgt.new_XmlObjMgt_GP())
    __swig_destroy__ = _XmlObjMgt.delete_XmlObjMgt_GP

# Register XmlObjMgt_GP in _XmlObjMgt:
_XmlObjMgt.XmlObjMgt_GP_swigregister(XmlObjMgt_GP)
class XmlObjMgt_Persistent(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""
        Return
        -------
        None

        Description
        -----------
        Empty constructor.

        Parameters
        ----------
        theElement: XmlObjMgt_Element

        Return
        -------
        None

        Description
        -----------
        Constructor.

        Parameters
        ----------
        theElement: XmlObjMgt_Element
        theRef: XmlObjMgt_DOMString

        Return
        -------
        None

        Description
        -----------
        Constructor from sub-element of element referenced by theref.

        """
        _XmlObjMgt.XmlObjMgt_Persistent_swiginit(self, _XmlObjMgt.new_XmlObjMgt_Persistent(*args))

    def CreateElement(self, *args):
        r"""

        Parameters
        ----------
        theParent: XmlObjMgt_Element
        theType: XmlObjMgt_DOMString
        theID: int

        Return
        -------
        None

        Description
        -----------
        Myelement := <thetype id='theid'/>.

        """
        return _XmlObjMgt.XmlObjMgt_Persistent_CreateElement(self, *args)

    def Element(self, *args):
        r"""
        Return
        -------
        XmlObjMgt_Element

        Description
        -----------
        Return myelement.

        """
        return _XmlObjMgt.XmlObjMgt_Persistent_Element(self, *args)

    def Id(self, *args):
        r"""
        Return
        -------
        int

        Description
        -----------
        No available documentation.

        """
        return _XmlObjMgt.XmlObjMgt_Persistent_Id(self, *args)

    def SetId(self, *args):
        r"""

        Parameters
        ----------
        theId: int

        Return
        -------
        None

        Description
        -----------
        No available documentation.

        """
        return _XmlObjMgt.XmlObjMgt_Persistent_SetId(self, *args)

    __repr__ = _dumps_object

    __swig_destroy__ = _XmlObjMgt.delete_XmlObjMgt_Persistent

# Register XmlObjMgt_Persistent in _XmlObjMgt:
_XmlObjMgt.XmlObjMgt_Persistent_swigregister(XmlObjMgt_Persistent)
class XmlObjMgt_RRelocationTable(OCC.Core.TColStd.TColStd_DataMapOfIntegerTransient):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def Clear(self, *args):
        r"""

        Parameters
        ----------
        doReleaseMemory: bool (optional, default to Standard_True)

        Return
        -------
        None

        Description
        -----------
        No available documentation.

        """
        return _XmlObjMgt.XmlObjMgt_RRelocationTable_Clear(self, *args)

    def GetHeaderData(self, *args):
        r"""
        Return
        -------
        opencascade::handle<Storage_HeaderData>

        Description
        -----------
        Returns a handle to the header data of the file that is begin read.

        """
        return _XmlObjMgt.XmlObjMgt_RRelocationTable_GetHeaderData(self, *args)

    def SetHeaderData(self, *args):
        r"""

        Parameters
        ----------
        theHeaderData: Storage_HeaderData

        Return
        -------
        None

        Description
        -----------
        Sets the storage header data. //! @param theheaderdata header data of the file that is begin read.

        """
        return _XmlObjMgt.XmlObjMgt_RRelocationTable_SetHeaderData(self, *args)

    __repr__ = _dumps_object


    def __init__(self):
        _XmlObjMgt.XmlObjMgt_RRelocationTable_swiginit(self, _XmlObjMgt.new_XmlObjMgt_RRelocationTable())
    __swig_destroy__ = _XmlObjMgt.delete_XmlObjMgt_RRelocationTable

# Register XmlObjMgt_RRelocationTable in _XmlObjMgt:
_XmlObjMgt.XmlObjMgt_RRelocationTable_swigregister(XmlObjMgt_RRelocationTable)
class XmlObjMgt_SRelocationTable(OCC.Core.TColStd.TColStd_IndexedMapOfTransient):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def Clear(self, *args):
        r"""

        Parameters
        ----------
        doReleaseMemory: bool (optional, default to Standard_True)

        Return
        -------
        None

        Description
        -----------
        No available documentation.

        """
        return _XmlObjMgt.XmlObjMgt_SRelocationTable_Clear(self, *args)

    def GetHeaderData(self, *args):
        r"""
        Return
        -------
        opencascade::handle<Storage_HeaderData>

        Description
        -----------
        Returns a handle to the header data of the file that is begin read.

        """
        return _XmlObjMgt.XmlObjMgt_SRelocationTable_GetHeaderData(self, *args)

    def SetHeaderData(self, *args):
        r"""

        Parameters
        ----------
        theHeaderData: Storage_HeaderData

        Return
        -------
        None

        Description
        -----------
        Sets the storage header data. //! @param theheaderdata header data of the file that is begin read.

        """
        return _XmlObjMgt.XmlObjMgt_SRelocationTable_SetHeaderData(self, *args)

    __repr__ = _dumps_object


    def __init__(self):
        _XmlObjMgt.XmlObjMgt_SRelocationTable_swiginit(self, _XmlObjMgt.new_XmlObjMgt_SRelocationTable())
    __swig_destroy__ = _XmlObjMgt.delete_XmlObjMgt_SRelocationTable

# Register XmlObjMgt_SRelocationTable in _XmlObjMgt:
_XmlObjMgt.XmlObjMgt_SRelocationTable_swigregister(XmlObjMgt_SRelocationTable)

XmlObjMgt_Document=OCC.Core.LDOM.LDOM_Document
XmlObjMgt_Element=OCC.Core.LDOM.LDOM_Element


@deprecated
def xmlobjmgt_FindChildByName(*args):
	return xmlobjmgt.FindChildByName(*args)

@deprecated
def xmlobjmgt_FindChildByRef(*args):
	return xmlobjmgt.FindChildByRef(*args)

@deprecated
def xmlobjmgt_FindChildElement(*args):
	return xmlobjmgt.FindChildElement(*args)

@deprecated
def xmlobjmgt_GetExtendedString(*args):
	return xmlobjmgt.GetExtendedString(*args)

@deprecated
def xmlobjmgt_GetReal(*args):
	return xmlobjmgt.GetReal(*args)

@deprecated
def xmlobjmgt_GetReal(*args):
	return xmlobjmgt.GetReal(*args)

@deprecated
def xmlobjmgt_GetStringValue(*args):
	return xmlobjmgt.GetStringValue(*args)

@deprecated
def xmlobjmgt_GetTagEntryString(*args):
	return xmlobjmgt.GetTagEntryString(*args)

@deprecated
def xmlobjmgt_IdString(*args):
	return xmlobjmgt.IdString(*args)

@deprecated
def xmlobjmgt_SetExtendedString(*args):
	return xmlobjmgt.SetExtendedString(*args)

@deprecated
def xmlobjmgt_SetStringValue(*args):
	return xmlobjmgt.SetStringValue(*args)

@deprecated
def xmlobjmgt_SetTagEntryString(*args):
	return xmlobjmgt.SetTagEntryString(*args)

@deprecated
def XmlObjMgt_GP_Translate(*args):
	return XmlObjMgt_GP.Translate(*args)

@deprecated
def XmlObjMgt_GP_Translate(*args):
	return XmlObjMgt_GP.Translate(*args)

@deprecated
def XmlObjMgt_GP_Translate(*args):
	return XmlObjMgt_GP.Translate(*args)

@deprecated
def XmlObjMgt_GP_Translate(*args):
	return XmlObjMgt_GP.Translate(*args)

@deprecated
def XmlObjMgt_GP_Translate(*args):
	return XmlObjMgt_GP.Translate(*args)

@deprecated
def XmlObjMgt_GP_Translate(*args):
	return XmlObjMgt_GP.Translate(*args)



