# This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.4
#
# 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
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('_gnm', [dirname(__file__)])
        except ImportError:
            import _gnm
            return _gnm
        if fp is not None:
            try:
                _mod = imp.load_module('_gnm', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _gnm = swig_import_helper()
    del swig_import_helper
else:
    import _gnm
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):
        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


def _swig_setattr_nondynamic_method(set):
    def set_attr(self,name,value):
        if (name == "thisown"): return self.this.own(value)
        if hasattr(self,name) or (name == "this"):
            set(self,name,value)
        else:
            raise AttributeError("You cannot add attributes to %s" % self)
    return set_attr



def GetUseExceptions(*args):
  """GetUseExceptions() -> int"""
  return _gnm.GetUseExceptions(*args)

def UseExceptions(*args):
  """UseExceptions()"""
  return _gnm.UseExceptions(*args)

def DontUseExceptions(*args):
  """DontUseExceptions()"""
  return _gnm.DontUseExceptions(*args)
import ogr
import osr
GATDijkstraShortestPath = _gnm.GATDijkstraShortestPath
GATKShortestPath = _gnm.GATKShortestPath
GATConnectedComponents = _gnm.GATConnectedComponents
GNM_EDGE_DIR_BOTH = _gnm.GNM_EDGE_DIR_BOTH
GNM_EDGE_DIR_SRCTOTGT = _gnm.GNM_EDGE_DIR_SRCTOTGT
GNM_EDGE_DIR_TGTTOSRC = _gnm.GNM_EDGE_DIR_TGTTOSRC

def CastToNetwork(*args):
  """CastToNetwork(MajorObject base) -> Network"""
  return _gnm.CastToNetwork(*args)
CastToNetwork = _gnm.CastToNetwork

def CastToGenericNetwork(*args):
  """CastToGenericNetwork(MajorObject base) -> GenericNetwork"""
  return _gnm.CastToGenericNetwork(*args)
CastToGenericNetwork = _gnm.CastToGenericNetwork
class Network(ogr.MajorObject):
    """Proxy of C++ GNMNetworkShadow class"""
    thisown = _swig_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__ = _gnm.delete_Network
    __del__ = lambda self : None;
    def ReleaseResultSet(self, *args):
        """ReleaseResultSet(self, Layer layer)"""
        return _gnm.Network_ReleaseResultSet(self, *args)

    def GetVersion(self, *args):
        """GetVersion(self) -> int"""
        return _gnm.Network_GetVersion(self, *args)

    def GetName(self, *args):
        """GetName(self) -> char"""
        return _gnm.Network_GetName(self, *args)

    def GetFeatureByGlobalFID(self, *args):
        """GetFeatureByGlobalFID(self, GIntBig GFID) -> Feature"""
        return _gnm.Network_GetFeatureByGlobalFID(self, *args)

    def GetPath(self, *args, **kwargs):
        """
        GetPath(self, GIntBig nStartFID, GIntBig nEndFID, GraphAlgorithm eAlgorithm, 
            char options = None) -> Layer
        """
        return _gnm.Network_GetPath(self, *args, **kwargs)

    def DisconnectAll(self, *args):
        """DisconnectAll(self) -> CPLErr"""
        return _gnm.Network_DisconnectAll(self, *args)

    def GetProjection(self, *args):
        """GetProjection(self) -> char"""
        return _gnm.Network_GetProjection(self, *args)

    def GetProjectionRef(self, *args):
        """GetProjectionRef(self) -> char"""
        return _gnm.Network_GetProjectionRef(self, *args)

    def GetFileList(self, *args):
        """GetFileList(self) -> char"""
        return _gnm.Network_GetFileList(self, *args)

    def CreateLayer(self, *args, **kwargs):
        """
        CreateLayer(self, char name, SpatialReference srs = None, OGRwkbGeometryType geom_type = wkbUnknown, 
            char options = None) -> Layer
        """
        return _gnm.Network_CreateLayer(self, *args, **kwargs)

    def CopyLayer(self, *args, **kwargs):
        """CopyLayer(self, Layer src_layer, char new_name, char options = None) -> Layer"""
        return _gnm.Network_CopyLayer(self, *args, **kwargs)

    def DeleteLayer(self, *args):
        """DeleteLayer(self, int index) -> OGRErr"""
        return _gnm.Network_DeleteLayer(self, *args)

    def GetLayerCount(self, *args):
        """GetLayerCount(self) -> int"""
        return _gnm.Network_GetLayerCount(self, *args)

    def GetLayerByIndex(self, *args):
        """GetLayerByIndex(self, int index = 0) -> Layer"""
        return _gnm.Network_GetLayerByIndex(self, *args)

    def GetLayerByName(self, *args):
        """GetLayerByName(self, char layer_name) -> Layer"""
        return _gnm.Network_GetLayerByName(self, *args)

    def TestCapability(self, *args):
        """TestCapability(self, char cap) -> bool"""
        return _gnm.Network_TestCapability(self, *args)

    def StartTransaction(self, *args, **kwargs):
        """StartTransaction(self, int force = True) -> OGRErr"""
        return _gnm.Network_StartTransaction(self, *args, **kwargs)

    def CommitTransaction(self, *args):
        """CommitTransaction(self) -> OGRErr"""
        return _gnm.Network_CommitTransaction(self, *args)

    def RollbackTransaction(self, *args):
        """RollbackTransaction(self) -> OGRErr"""
        return _gnm.Network_RollbackTransaction(self, *args)

Network_swigregister = _gnm.Network_swigregister
Network_swigregister(Network)

class GenericNetwork(Network):
    """Proxy of C++ GNMGenericNetworkShadow class"""
    thisown = _swig_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__ = _gnm.delete_GenericNetwork
    __del__ = lambda self : None;
    def ConnectFeatures(self, *args):
        """
        ConnectFeatures(self, GIntBig nSrcFID, GIntBig nTgtFID, GIntBig nConFID, 
            double dfCost, double dfInvCost, GNMDirection eDir) -> CPLErr
        """
        return _gnm.GenericNetwork_ConnectFeatures(self, *args)

    def DisconnectFeatures(self, *args):
        """DisconnectFeatures(self, GIntBig nSrcFID, GIntBig nTgtFID, GIntBig nConFID) -> CPLErr"""
        return _gnm.GenericNetwork_DisconnectFeatures(self, *args)

    def DisconnectFeaturesWithId(self, *args):
        """DisconnectFeaturesWithId(self, GIntBig nFID) -> CPLErr"""
        return _gnm.GenericNetwork_DisconnectFeaturesWithId(self, *args)

    def ReconnectFeatures(self, *args):
        """
        ReconnectFeatures(self, GIntBig nSrcFID, GIntBig nTgtFID, GIntBig nConFID, 
            double dfCost, double dfInvCost, GNMDirection eDir) -> CPLErr
        """
        return _gnm.GenericNetwork_ReconnectFeatures(self, *args)

    def CreateRule(self, *args):
        """CreateRule(self, char pszRuleStr) -> CPLErr"""
        return _gnm.GenericNetwork_CreateRule(self, *args)

    def DeleteAllRules(self, *args):
        """DeleteAllRules(self) -> CPLErr"""
        return _gnm.GenericNetwork_DeleteAllRules(self, *args)

    def DeleteRule(self, *args):
        """DeleteRule(self, char pszRuleStr) -> CPLErr"""
        return _gnm.GenericNetwork_DeleteRule(self, *args)

    def GetRules(self, *args):
        """GetRules(self) -> char"""
        return _gnm.GenericNetwork_GetRules(self, *args)

    def ConnectPointsByLines(self, *args, **kwargs):
        """
        ConnectPointsByLines(self, char papszLayerList, double dfTolerance, double dfCost, 
            double dfInvCost, GNMDirection eDir) -> CPLErr
        """
        return _gnm.GenericNetwork_ConnectPointsByLines(self, *args, **kwargs)

    def ChangeBlockState(self, *args):
        """ChangeBlockState(self, GIntBig nFID, bool bIsBlock) -> CPLErr"""
        return _gnm.GenericNetwork_ChangeBlockState(self, *args)

    def ChangeAllBlockState(self, *args):
        """ChangeAllBlockState(self, bool bIsBlock = False) -> CPLErr"""
        return _gnm.GenericNetwork_ChangeAllBlockState(self, *args)

GenericNetwork_swigregister = _gnm.GenericNetwork_swigregister
GenericNetwork_swigregister(GenericNetwork)



