# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# 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('_xylib', [dirname(__file__)])
        except ImportError:
            import _xylib
            return _xylib
        if fp is not None:
            try:
                _mod = imp.load_module('_xylib', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _xylib = swig_import_helper()
    del swig_import_helper
else:
    import _xylib
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):
        object.__setattr__(self, 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_nondynamic(self, class_type, name, static=1):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    if (not static):
        return object.__getattr__(self, name)
    else:
        raise AttributeError(name)

def _swig_getattr(self, class_type, name):
    return _swig_getattr_nondynamic(self, class_type, name, 0)


def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except Exception:
        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



_xylib.XYLIB_VERSION_swigconstant(_xylib)
XYLIB_VERSION = _xylib.XYLIB_VERSION
class xylibFormat(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    name = _swig_property(_xylib.xylibFormat_name_get, _xylib.xylibFormat_name_set)
    desc = _swig_property(_xylib.xylibFormat_desc_get, _xylib.xylibFormat_desc_set)
    exts = _swig_property(_xylib.xylibFormat_exts_get, _xylib.xylibFormat_exts_set)
    binary = _swig_property(_xylib.xylibFormat_binary_get, _xylib.xylibFormat_binary_set)
    multiblock = _swig_property(_xylib.xylibFormat_multiblock_get, _xylib.xylibFormat_multiblock_set)
    valid_options = _swig_property(_xylib.xylibFormat_valid_options_get, _xylib.xylibFormat_valid_options_set)

    def __init__(self):
        this = _xylib.new_xylibFormat()
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _xylib.delete_xylibFormat
    __del__ = lambda self: None
xylibFormat_swigregister = _xylib.xylibFormat_swigregister
xylibFormat_swigregister(xylibFormat)


def xylib_get_version():
    return _xylib.xylib_get_version()
xylib_get_version = _xylib.xylib_get_version

def xylib_get_format(n):
    return _xylib.xylib_get_format(n)
xylib_get_format = _xylib.xylib_get_format

def xylib_get_format_by_name(name):
    return _xylib.xylib_get_format_by_name(name)
xylib_get_format_by_name = _xylib.xylib_get_format_by_name

def xylib_load_file(path, format_name, options):
    return _xylib.xylib_load_file(path, format_name, options)
xylib_load_file = _xylib.xylib_load_file

def xylib_get_block(dataset, block):
    return _xylib.xylib_get_block(dataset, block)
xylib_get_block = _xylib.xylib_get_block

def xylib_count_columns(block):
    return _xylib.xylib_count_columns(block)
xylib_count_columns = _xylib.xylib_count_columns

def xylib_count_rows(block, column):
    return _xylib.xylib_count_rows(block, column)
xylib_count_rows = _xylib.xylib_count_rows

def xylib_get_data(block, column, row):
    return _xylib.xylib_get_data(block, column, row)
xylib_get_data = _xylib.xylib_get_data

def xylib_dataset_metadata(dataset, key):
    return _xylib.xylib_dataset_metadata(dataset, key)
xylib_dataset_metadata = _xylib.xylib_dataset_metadata

def xylib_block_metadata(block, key):
    return _xylib.xylib_block_metadata(block, key)
xylib_block_metadata = _xylib.xylib_block_metadata

def xylib_free_dataset(dataset):
    return _xylib.xylib_free_dataset(dataset)
xylib_free_dataset = _xylib.xylib_free_dataset
class FormatInfo(xylibFormat):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    ctor = _swig_property(_xylib.FormatInfo_ctor_get, _xylib.FormatInfo_ctor_set)
    checker = _swig_property(_xylib.FormatInfo_checker_get, _xylib.FormatInfo_checker_set)

    def __init__(self, name_, desc_, exts_, binary_, multiblock_, ctor_, checker_, valid_options_=None):
        this = _xylib.new_FormatInfo(name_, desc_, exts_, binary_, multiblock_, ctor_, checker_, valid_options_)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _xylib.delete_FormatInfo
    __del__ = lambda self: None
FormatInfo_swigregister = _xylib.FormatInfo_swigregister
FormatInfo_swigregister(FormatInfo)

class FormatError(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, msg):
        this = _xylib.new_FormatError(msg)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _xylib.delete_FormatError
    __del__ = lambda self: None
FormatError_swigregister = _xylib.FormatError_swigregister
FormatError_swigregister(FormatError)

class RunTimeError(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, msg):
        this = _xylib.new_RunTimeError(msg)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _xylib.delete_RunTimeError
    __del__ = lambda self: None
RunTimeError_swigregister = _xylib.RunTimeError_swigregister
RunTimeError_swigregister(RunTimeError)

class Column(object):
    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 - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _xylib.delete_Column
    __del__ = lambda self: None

    def get_name(self):
        return _xylib.Column_get_name(self)

    def get_point_count(self):
        return _xylib.Column_get_point_count(self)

    def get_value(self, n):
        return _xylib.Column_get_value(self, n)

    def get_min(self):
        return _xylib.Column_get_min(self)

    def get_max(self, point_count=0):
        return _xylib.Column_get_max(self, point_count)

    def get_step(self):
        return _xylib.Column_get_step(self)
Column_swigregister = _xylib.Column_swigregister
Column_swigregister(Column)

class MetaData(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def has_key(self, key):
        return _xylib.MetaData_has_key(self, key)

    def get(self, key):
        return _xylib.MetaData_get(self, key)

    def size(self):
        return _xylib.MetaData_size(self)

    def get_key(self, index):
        return _xylib.MetaData_get_key(self, index)

    def __init__(self):
        this = _xylib.new_MetaData()
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _xylib.delete_MetaData
    __del__ = lambda self: None

    def clear(self):
        return _xylib.MetaData_clear(self)

    def set(self, key, val):
        return _xylib.MetaData_set(self, key, val)
MetaData_swigregister = _xylib.MetaData_swigregister
MetaData_swigregister(MetaData)

class Block(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    meta = _swig_property(_xylib.Block_meta_get, _xylib.Block_meta_set)

    def __init__(self):
        this = _xylib.new_Block()
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _xylib.delete_Block
    __del__ = lambda self: None

    def get_name(self):
        return _xylib.Block_get_name(self)

    def get_column_count(self):
        return _xylib.Block_get_column_count(self)

    def get_column(self, n):
        return _xylib.Block_get_column(self, n)

    def get_point_count(self):
        return _xylib.Block_get_point_count(self)

    def add_column(self, c, append=True):
        return _xylib.Block_add_column(self, c, append)

    def del_column(self, n):
        return _xylib.Block_del_column(self, n)

    def set_name(self, name):
        return _xylib.Block_set_name(self, name)
Block_swigregister = _xylib.Block_swigregister
Block_swigregister(Block)
cvar = _xylib.cvar
Block.index_column = _xylib.cvar.Block_index_column

class DataSet(object):
    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 - class is abstract")
    __repr__ = _swig_repr
    fi = _swig_property(_xylib.DataSet_fi_get)
    meta = _swig_property(_xylib.DataSet_meta_get, _xylib.DataSet_meta_set)
    __swig_destroy__ = _xylib.delete_DataSet
    __del__ = lambda self: None

    def get_block_count(self):
        return _xylib.DataSet_get_block_count(self)

    def get_block(self, n):
        return _xylib.DataSet_get_block(self, n)

    def load_data(self, f):
        return _xylib.DataSet_load_data(self, f)

    def clear(self):
        return _xylib.DataSet_clear(self)

    def has_option(self, t):
        return _xylib.DataSet_has_option(self, t)

    def add_block(self, block):
        return _xylib.DataSet_add_block(self, block)

    def set_options(self, options):
        return _xylib.DataSet_set_options(self, options)

    def is_valid_option(self, opt):
        return _xylib.DataSet_is_valid_option(self, opt)
DataSet_swigregister = _xylib.DataSet_swigregister
DataSet_swigregister(DataSet)


def load_file(*args):
    return _xylib.load_file(*args)
load_file = _xylib.load_file

def load_stream(*args):
    return _xylib.load_stream(*args)
load_stream = _xylib.load_stream

def guess_filetype(path, f, details):
    return _xylib.guess_filetype(path, f, details)
guess_filetype = _xylib.guess_filetype

def check_format(fi, f, details):
    return _xylib.check_format(fi, f, details)
check_format = _xylib.check_format

def get_wildcards_string(*args):
    return _xylib.get_wildcards_string(*args)
get_wildcards_string = _xylib.get_wildcards_string

def is_directory(path):
    return _xylib.is_directory(path)
is_directory = _xylib.is_directory


