# This file was automatically generated by SWIG (http://www.swig.org).
# Version 1.3.39
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
# This file is compatible with both classic and new-style classes.

"""
This module provides 2 classes PyObserver and PyCatalogLoader that can be subclassed in Python (uses director feature)
"""

from sys import version_info
if version_info >= (2,6,0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_pypilot', [dirname(__file__)])
        except ImportError:
            import _pypilot
            return _pypilot
        if fp is not None:
            try:
                _mod = imp.load_module('_pypilot', fp, pathname, description)
            finally:
                fp.close()
                return _mod
    _pypilot = swig_import_helper()
    del swig_import_helper
else:
    import _pypilot
del version_info
try:
    _swig_property = property
except NameError:
    pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
    if (name == "thisown"): return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name,None)
    if method: return method(self,value)
    if (not static) or hasattr(self,name):
        self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)

def _swig_setattr(self,class_type,name,value):
    return _swig_setattr_nondynamic(self,class_type,name,value,0)

def _swig_getattr(self,class_type,name):
    if (name == "thisown"): return self.this.own()
    method = class_type.__swig_getmethods__.get(name,None)
    if method: return method(self)
    raise AttributeError(name)

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

try:
    _object = object
    _newclass = 1
except AttributeError:
    class _object : pass
    _newclass = 0


try:
    import weakref
    weakref_proxy = weakref.proxy
except:
    weakref_proxy = lambda x: x


class SwigPyIterator(_object):
    """Proxy of C++ swig::SwigPyIterator class"""
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)
    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    __swig_destroy__ = _pypilot.delete_SwigPyIterator
    __del__ = lambda self : None;
    def value(self):
        """value(self) -> PyObject"""
        return _pypilot.SwigPyIterator_value(self)

    def incr(self, n = 1):
        """
        incr(self, size_t n = 1) -> SwigPyIterator
        incr(self) -> SwigPyIterator
        """
        return _pypilot.SwigPyIterator_incr(self, n)

    def decr(self, n = 1):
        """
        decr(self, size_t n = 1) -> SwigPyIterator
        decr(self) -> SwigPyIterator
        """
        return _pypilot.SwigPyIterator_decr(self, n)

    def distance(self, *args):
        """distance(self, SwigPyIterator x) -> ptrdiff_t"""
        return _pypilot.SwigPyIterator_distance(self, *args)

    def equal(self, *args):
        """equal(self, SwigPyIterator x) -> bool"""
        return _pypilot.SwigPyIterator_equal(self, *args)

    def copy(self):
        """copy(self) -> SwigPyIterator"""
        return _pypilot.SwigPyIterator_copy(self)

    def next(self):
        """next(self) -> PyObject"""
        return _pypilot.SwigPyIterator_next(self)

    def __next__(self):
        """__next__(self) -> PyObject"""
        return _pypilot.SwigPyIterator___next__(self)

    def previous(self):
        """previous(self) -> PyObject"""
        return _pypilot.SwigPyIterator_previous(self)

    def advance(self, *args):
        """advance(self, ptrdiff_t n) -> SwigPyIterator"""
        return _pypilot.SwigPyIterator_advance(self, *args)

    def __eq__(self, *args):
        """__eq__(self, SwigPyIterator x) -> bool"""
        return _pypilot.SwigPyIterator___eq__(self, *args)

    def __ne__(self, *args):
        """__ne__(self, SwigPyIterator x) -> bool"""
        return _pypilot.SwigPyIterator___ne__(self, *args)

    def __iadd__(self, *args):
        """__iadd__(self, ptrdiff_t n) -> SwigPyIterator"""
        return _pypilot.SwigPyIterator___iadd__(self, *args)

    def __isub__(self, *args):
        """__isub__(self, ptrdiff_t n) -> SwigPyIterator"""
        return _pypilot.SwigPyIterator___isub__(self, *args)

    def __add__(self, *args):
        """__add__(self, ptrdiff_t n) -> SwigPyIterator"""
        return _pypilot.SwigPyIterator___add__(self, *args)

    def __sub__(self, *args):
        """
        __sub__(self, ptrdiff_t n) -> SwigPyIterator
        __sub__(self, SwigPyIterator x) -> ptrdiff_t
        """
        return _pypilot.SwigPyIterator___sub__(self, *args)

    def __iter__(self): return self
SwigPyIterator_swigregister = _pypilot.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)

import pilot
class PyObserver(pilot.Observer):
    """Proxy of C++ YACS::ENGINE::PyObserver class"""
    __swig_setmethods__ = {}
    for _s in [pilot.Observer]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, PyObserver, name, value)
    __swig_getmethods__ = {}
    for _s in [pilot.Observer]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, PyObserver, name)
    __repr__ = _swig_repr
    def pynotify(self, *args):
        """pynotify(self, Node object, string event)"""
        return _pypilot.PyObserver_pynotify(self, *args)

    def __init__(self): 
        """__init__(self) -> PyObserver"""
        if self.__class__ == PyObserver:
            _self = None
        else:
            _self = self
        this = _pypilot.new_PyObserver(_self, )
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _pypilot.delete_PyObserver
    __del__ = lambda self : None;
    def __disown__(self):
        self.this.disown()
        _pypilot.disown_PyObserver(self)
        return weakref_proxy(self)
PyObserver_swigregister = _pypilot.PyObserver_swigregister
PyObserver_swigregister(PyObserver)

class PyCatalogLoader(pilot.CatalogLoader):
    """Proxy of C++ YACS::ENGINE::PyCatalogLoader class"""
    __swig_setmethods__ = {}
    for _s in [pilot.CatalogLoader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, PyCatalogLoader, name, value)
    __swig_getmethods__ = {}
    for _s in [pilot.CatalogLoader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, PyCatalogLoader, name)
    __repr__ = _swig_repr
    def __init__(self): 
        """__init__(self) -> PyCatalogLoader"""
        if self.__class__ == PyCatalogLoader:
            _self = None
        else:
            _self = self
        this = _pypilot.new_PyCatalogLoader(_self, )
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _pypilot.delete_PyCatalogLoader
    __del__ = lambda self : None;
    def __disown__(self):
        self.this.disown()
        _pypilot.disown_PyCatalogLoader(self)
        return weakref_proxy(self)
PyCatalogLoader_swigregister = _pypilot.PyCatalogLoader_swigregister
PyCatalogLoader_swigregister(PyCatalogLoader)



