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

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

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__)


import ooflib.SWIG.common.cmicrostructure
import ooflib.SWIG.common.coord
import ooflib.SWIG.common.timestamp
import ooflib.SWIG.common.pixelattribute
class PixelSet(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")
    __repr__ = _swig_repr
    __swig_destroy__ = _pixelgroup.delete_PixelSet

    def id(self):
        return _pixelgroup.PixelSet_id(self)

    def is_defunct(self):
        return _pixelgroup.PixelSet_is_defunct(self)

    def set_defunct(self):
        return _pixelgroup.PixelSet_set_defunct(self)

    def add(self, iPointList):
        return _pixelgroup.PixelSet_add(self, iPointList)

    def addWithoutCheck(self, iPointList):
        return _pixelgroup.PixelSet_addWithoutCheck(self, iPointList)

    def remove(self, iPointList):
        return _pixelgroup.PixelSet_remove(self, iPointList)

    def clone(self):
        return _pixelgroup.PixelSet_clone(self)

    def clear(self):
        return _pixelgroup.PixelSet_clear(self)

    def members(self):
        return _pixelgroup.PixelSet_members(self)

    def __len__(self):
        return _pixelgroup.PixelSet___len__(self)

    def __getitem__(self, i):
        return _pixelgroup.PixelSet___getitem__(self, i)

# Register PixelSet in _pixelgroup:
_pixelgroup.PixelSet_swigregister(PixelSet)
class PixelGroup(PixelSet):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, name, iPoint, microstructure):
        _pixelgroup.PixelGroup_swiginit(self, _pixelgroup.new_PixelGroup(name, iPoint, microstructure))
    __swig_destroy__ = _pixelgroup.delete_PixelGroup

    def rename(self, arg2):
        return _pixelgroup.PixelGroup_rename(self, arg2)

    def is_meshable(self):
        return _pixelgroup.PixelGroup_is_meshable(self)

    def set_meshable(self, arg2):
        return _pixelgroup.PixelGroup_set_meshable(self, arg2)

    def name(self):
        return _pixelgroup.PixelGroup_name(self)

# Register PixelGroup in _pixelgroup:
_pixelgroup.PixelGroup_swigregister(PixelGroup)

def pixelGroupNames(arg1, iPoint):
    return _pixelgroup.pixelGroupNames(arg1, iPoint)
class PixelGroupAttributeRegistration(ooflib.SWIG.common.pixelattribute.PxlAttributeRegistration):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _pixelgroup.PixelGroupAttributeRegistration_swiginit(self, _pixelgroup.new_PixelGroupAttributeRegistration())
    __swig_destroy__ = _pixelgroup.delete_PixelGroupAttributeRegistration

# Register PixelGroupAttributeRegistration in _pixelgroup:
_pixelgroup.PixelGroupAttributeRegistration_swigregister(PixelGroupAttributeRegistration)
# -*- python -*-

# This software was produced by NIST, an agency of the U.S. government,
# and by statute is not subject to copyright in the United States.
# Recipients of this software assume all responsibilities associated
# with its operation, modification and maintenance. However, to
# facilitate maintenance we ask that before distributing modified
# versions of this software, you first contact the authors at
# oof_manager@nist.gov.

def _PixelGroup___eq__(self, other):
    try:
        return self.id() == other.id()
    except AttributeError:
        return 0
PixelGroup.__eq__ = _PixelGroup___eq__

def _PixelGroup___hash__(self):
    return hash(self.id())
PixelGroup.__hash__ = _PixelGroup___hash__

#######################

attributeReg = PixelGroupAttributeRegistration()



