# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# 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
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _codac
else:
    import _codac

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



CodacError = _codac.CodacError


def version():
    return _codac.version()

def match_filefilter(filefilter, num_filepaths, py_callback):
    return _codac.match_filefilter(filefilter, num_filepaths, py_callback)
class Cursor(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):
        _codac.Cursor_swiginit(self, _codac.new_Cursor())
    __swig_destroy__ = _codac.delete_Cursor

    def __deepcopy__(self,memo):
        return _codac.Cursor___deepcopy__(self)



    def __copy__(self):
        return _codac.Cursor___deepcopy__(self)


# Register Cursor in _codac:
_codac.Cursor_swigregister(Cursor)


def cursor_read_int8_array(cursor):
    return _codac.cursor_read_int8_array(cursor)

def cursor_read_uint8_array(cursor):
    return _codac.cursor_read_uint8_array(cursor)

def cursor_read_int16_array(cursor):
    return _codac.cursor_read_int16_array(cursor)

def cursor_read_uint16_array(cursor):
    return _codac.cursor_read_uint16_array(cursor)

def cursor_read_int32_array(cursor):
    return _codac.cursor_read_int32_array(cursor)

def cursor_read_uint32_array(cursor):
    return _codac.cursor_read_uint32_array(cursor)

def cursor_read_int64_array(cursor):
    return _codac.cursor_read_int64_array(cursor)

def cursor_read_uint64_array(cursor):
    return _codac.cursor_read_uint64_array(cursor)

def cursor_read_float_array(cursor):
    return _codac.cursor_read_float_array(cursor)

def cursor_read_double_array(cursor):
    return _codac.cursor_read_double_array(cursor)

def cursor_read_char_array(cursor):
    return _codac.cursor_read_char_array(cursor)

def cursor_read_int8_partial_array(cursor, offset, length):
    return _codac.cursor_read_int8_partial_array(cursor, offset, length)

def cursor_read_uint8_partial_array(cursor, offset, length):
    return _codac.cursor_read_uint8_partial_array(cursor, offset, length)

def cursor_read_int16_partial_array(cursor, offset, length):
    return _codac.cursor_read_int16_partial_array(cursor, offset, length)

def cursor_read_uint16_partial_array(cursor, offset, length):
    return _codac.cursor_read_uint16_partial_array(cursor, offset, length)

def cursor_read_int32_partial_array(cursor, offset, length):
    return _codac.cursor_read_int32_partial_array(cursor, offset, length)

def cursor_read_uint32_partial_array(cursor, offset, length):
    return _codac.cursor_read_uint32_partial_array(cursor, offset, length)

def cursor_read_int64_partial_array(cursor, offset, length):
    return _codac.cursor_read_int64_partial_array(cursor, offset, length)

def cursor_read_uint64_partial_array(cursor, offset, length):
    return _codac.cursor_read_uint64_partial_array(cursor, offset, length)

def cursor_read_float_partial_array(cursor, offset, length):
    return _codac.cursor_read_float_partial_array(cursor, offset, length)

def cursor_read_double_partial_array(cursor, offset, length):
    return _codac.cursor_read_double_partial_array(cursor, offset, length)

def cursor_read_char_partial_array(cursor, offset, length):
    return _codac.cursor_read_char_partial_array(cursor, offset, length)

def cursor_read_complex_double_pair(cursor):
    return _codac.cursor_read_complex_double_pair(cursor)

def cursor_read_complex_double_split_array(cursor):
    return _codac.cursor_read_complex_double_split_array(cursor)

def cursor_read_complex_double_pairs_array(cursor):
    return _codac.cursor_read_complex_double_pairs_array(cursor)

def cursor_read_complex(cursor):
    return _codac.cursor_read_complex(cursor)

def cursor_read_complex_array(cursor):
    return _codac.cursor_read_complex_array(cursor)

def cursor_read_bits(cursor, bit_offset, bit_length):
    return _codac.cursor_read_bits(cursor, bit_offset, bit_length)

def cursor_read_bytes(cursor, offset, length):
    return _codac.cursor_read_bytes(cursor, offset, length)

def done():
    return _codac.done()

def NaN():
    return _codac.NaN()

def PlusInf():
    return _codac.PlusInf()

def MinInf():
    return _codac.MinInf()

def type_get_format_name(format):
    return _codac.type_get_format_name(format)

def type_get_class_name(type_class):
    return _codac.type_get_class_name(type_class)

def type_get_native_type_name(native_type):
    return _codac.type_get_native_type_name(native_type)

def type_get_special_type_name(special_type):
    return _codac.type_get_special_type_name(special_type)

def c_index_to_fortran_index(num_dims, index):
    return _codac.c_index_to_fortran_index(num_dims, index)

def expression_get_type_name(type):
    return _codac.expression_get_type_name(type)

def expression_delete(expr):
    return _codac.expression_delete(expr)

def get_option_bypass_special_types():
    return _codac.get_option_bypass_special_types()

def get_option_perform_boundary_checks():
    return _codac.get_option_perform_boundary_checks()

def get_option_perform_conversions():
    return _codac.get_option_perform_conversions()

def get_option_use_fast_size_expressions():
    return _codac.get_option_use_fast_size_expressions()

def get_option_use_mmap():
    return _codac.get_option_use_mmap()

def isNaN(x):
    return _codac.isNaN(x)

def isInf(x):
    return _codac.isInf(x)

def isPlusInf(x):
    return _codac.isPlusInf(x)

def isMinInf(x):
    return _codac.isMinInf(x)

def expression_is_constant(expr):
    return _codac.expression_is_constant(expr)

def expression_is_equal(expr1, expr2):
    return _codac.expression_is_equal(expr1, expr2)
CODA_MAX_NUM_DIMS = _codac.CODA_MAX_NUM_DIMS
coda_array_ordering_c = _codac.coda_array_ordering_c
coda_array_ordering_fortran = _codac.coda_array_ordering_fortran
coda_ffs_error = _codac.coda_ffs_error
coda_ffs_could_not_open_file = _codac.coda_ffs_could_not_open_file
coda_ffs_could_not_access_directory = _codac.coda_ffs_could_not_access_directory
coda_ffs_unsupported_file = _codac.coda_ffs_unsupported_file
coda_ffs_match = _codac.coda_ffs_match
coda_ffs_no_match = _codac.coda_ffs_no_match
coda_format_ascii = _codac.coda_format_ascii
coda_format_binary = _codac.coda_format_binary
coda_format_xml = _codac.coda_format_xml
coda_format_hdf4 = _codac.coda_format_hdf4
coda_format_hdf5 = _codac.coda_format_hdf5
coda_format_cdf = _codac.coda_format_cdf
coda_format_netcdf = _codac.coda_format_netcdf
coda_format_grib = _codac.coda_format_grib
coda_format_rinex = _codac.coda_format_rinex
coda_format_sp3 = _codac.coda_format_sp3
coda_record_class = _codac.coda_record_class
coda_array_class = _codac.coda_array_class
coda_integer_class = _codac.coda_integer_class
coda_real_class = _codac.coda_real_class
coda_text_class = _codac.coda_text_class
coda_raw_class = _codac.coda_raw_class
coda_special_class = _codac.coda_special_class
coda_special_no_data = _codac.coda_special_no_data
coda_special_vsf_integer = _codac.coda_special_vsf_integer
coda_special_time = _codac.coda_special_time
coda_special_complex = _codac.coda_special_complex
coda_native_type_not_available = _codac.coda_native_type_not_available
coda_native_type_int8 = _codac.coda_native_type_int8
coda_native_type_uint8 = _codac.coda_native_type_uint8
coda_native_type_int16 = _codac.coda_native_type_int16
coda_native_type_uint16 = _codac.coda_native_type_uint16
coda_native_type_int32 = _codac.coda_native_type_int32
coda_native_type_uint32 = _codac.coda_native_type_uint32
coda_native_type_int64 = _codac.coda_native_type_int64
coda_native_type_uint64 = _codac.coda_native_type_uint64
coda_native_type_float = _codac.coda_native_type_float
coda_native_type_double = _codac.coda_native_type_double
coda_native_type_char = _codac.coda_native_type_char
coda_native_type_string = _codac.coda_native_type_string
coda_native_type_bytes = _codac.coda_native_type_bytes
coda_expression_boolean = _codac.coda_expression_boolean
coda_expression_integer = _codac.coda_expression_integer
coda_expression_float = _codac.coda_expression_float
coda_expression_string = _codac.coda_expression_string
coda_expression_node = _codac.coda_expression_node
coda_expression_void = _codac.coda_expression_void

def init():
    return _codac.init()

def coda_set_definition_path_conditional(file, searchpath, relative_location):
    return _codac.coda_set_definition_path_conditional(file, searchpath, relative_location)

def set_option_bypass_special_types(enable):
    return _codac.set_option_bypass_special_types(enable)

def set_option_perform_boundary_checks(enable):
    return _codac.set_option_perform_boundary_checks(enable)

def set_option_perform_conversions(enable):
    return _codac.set_option_perform_conversions(enable)

def set_option_use_fast_size_expressions(enable):
    return _codac.set_option_use_fast_size_expressions(enable)

def set_option_use_mmap(enable):
    return _codac.set_option_use_mmap(enable)

def time_double_to_parts(datetime):
    return _codac.time_double_to_parts(datetime)

def time_double_to_parts_utc(datetime):
    return _codac.time_double_to_parts_utc(datetime)

def time_parts_to_double(year, month, day, hour, minute, second, musec):
    return _codac.time_parts_to_double(year, month, day, hour, minute, second, musec)

def time_parts_to_double_utc(year, month, day, hour, minute, second, musec):
    return _codac.time_parts_to_double_utc(year, month, day, hour, minute, second, musec)

def time_parts_to_string(year, month, day, hour, minute, second, musec, format):
    return _codac.time_parts_to_string(year, month, day, hour, minute, second, musec, format)

def time_string_to_parts(format, str):
    return _codac.time_string_to_parts(format, str)

def time_double_to_string(datetime, format):
    return _codac.time_double_to_string(datetime, format)

def time_double_to_string_utc(datetime, format):
    return _codac.time_double_to_string_utc(datetime, format)

def time_string_to_double(format, str):
    return _codac.time_string_to_double(format, str)

def time_string_to_double_utc(format, str):
    return _codac.time_string_to_double_utc(format, str)

def recognize_file(filename):
    return _codac.recognize_file(filename)

def open(filename):
    return _codac.open(filename)

def open_as(filename, product_class, product_type, version):
    return _codac.open_as(filename, product_class, product_type, version)

def close(product):
    return _codac.close(product)

def get_product_filename(product):
    return _codac.get_product_filename(product)

def get_product_file_size(product):
    return _codac.get_product_file_size(product)

def get_product_format(product):
    return _codac.get_product_format(product)

def get_product_class(product):
    return _codac.get_product_class(product)

def get_product_type(product):
    return _codac.get_product_type(product)

def get_product_version(product):
    return _codac.get_product_version(product)

def get_product_definition_file(product):
    return _codac.get_product_definition_file(product)

def get_product_root_type(product):
    return _codac.get_product_root_type(product)

def get_product_variable_value(product, variable, index):
    return _codac.get_product_variable_value(product, variable, index)

def type_has_attributes(type):
    return _codac.type_has_attributes(type)

def type_get_format(type):
    return _codac.type_get_format(type)

def type_get_class(type):
    return _codac.type_get_class(type)

def type_get_read_type(type):
    return _codac.type_get_read_type(type)

def type_get_string_length(type):
    return _codac.type_get_string_length(type)

def type_get_bit_size(type):
    return _codac.type_get_bit_size(type)

def type_get_name(type):
    return _codac.type_get_name(type)

def type_get_description(type):
    return _codac.type_get_description(type)

def type_get_unit(type):
    return _codac.type_get_unit(type)

def type_get_fixed_value(type):
    return _codac.type_get_fixed_value(type)

def type_get_attributes(type):
    return _codac.type_get_attributes(type)

def type_get_num_record_fields(type):
    return _codac.type_get_num_record_fields(type)

def type_get_record_field_index_from_name(type, name):
    return _codac.type_get_record_field_index_from_name(type, name)

def type_get_record_field_index_from_real_name(type, real_name):
    return _codac.type_get_record_field_index_from_real_name(type, real_name)

def type_get_record_field_type(type, index):
    return _codac.type_get_record_field_type(type, index)

def type_get_record_field_name(type, index):
    return _codac.type_get_record_field_name(type, index)

def type_get_record_field_real_name(type, index):
    return _codac.type_get_record_field_real_name(type, index)

def type_get_record_field_hidden_status(type, index):
    return _codac.type_get_record_field_hidden_status(type, index)

def type_get_record_field_available_status(type, index):
    return _codac.type_get_record_field_available_status(type, index)

def type_get_record_union_status(type):
    return _codac.type_get_record_union_status(type)

def type_get_array_num_dims(type):
    return _codac.type_get_array_num_dims(type)

def type_get_array_dim(type):
    return _codac.type_get_array_dim(type)

def type_get_array_base_type(type):
    return _codac.type_get_array_base_type(type)

def type_get_special_type(type):
    return _codac.type_get_special_type(type)

def type_get_special_base_type(type):
    return _codac.type_get_special_base_type(type)

def cursor_set_product(cursor, product):
    return _codac.cursor_set_product(cursor, product)

def cursor_goto(cursor, path):
    return _codac.cursor_goto(cursor, path)

def cursor_goto_first_record_field(cursor):
    return _codac.cursor_goto_first_record_field(cursor)

def cursor_goto_next_record_field(cursor):
    return _codac.cursor_goto_next_record_field(cursor)

def cursor_goto_record_field_by_index(cursor, index):
    return _codac.cursor_goto_record_field_by_index(cursor, index)

def cursor_goto_record_field_by_name(cursor, name):
    return _codac.cursor_goto_record_field_by_name(cursor, name)

def cursor_goto_available_union_field(cursor):
    return _codac.cursor_goto_available_union_field(cursor)

def cursor_goto_first_array_element(cursor):
    return _codac.cursor_goto_first_array_element(cursor)

def cursor_goto_next_array_element(cursor):
    return _codac.cursor_goto_next_array_element(cursor)

def cursor_goto_array_element(cursor, num_subs):
    return _codac.cursor_goto_array_element(cursor, num_subs)

def cursor_goto_array_element_by_index(cursor, index):
    return _codac.cursor_goto_array_element_by_index(cursor, index)

def cursor_goto_attributes(cursor):
    return _codac.cursor_goto_attributes(cursor)

def cursor_goto_root(cursor):
    return _codac.cursor_goto_root(cursor)

def cursor_goto_parent(cursor):
    return _codac.cursor_goto_parent(cursor)

def cursor_use_base_type_of_special_type(cursor):
    return _codac.cursor_use_base_type_of_special_type(cursor)

def cursor_has_ascii_content(cursor):
    return _codac.cursor_has_ascii_content(cursor)

def cursor_has_attributes(cursor):
    return _codac.cursor_has_attributes(cursor)

def cursor_get_string_length(cursor):
    return _codac.cursor_get_string_length(cursor)

def cursor_get_bit_size(cursor):
    return _codac.cursor_get_bit_size(cursor)

def cursor_get_byte_size(cursor):
    return _codac.cursor_get_byte_size(cursor)

def cursor_get_num_elements(cursor):
    return _codac.cursor_get_num_elements(cursor)

def cursor_get_product_file(cursor):
    return _codac.cursor_get_product_file(cursor)

def cursor_get_depth(cursor):
    return _codac.cursor_get_depth(cursor)

def cursor_get_index(cursor):
    return _codac.cursor_get_index(cursor)

def cursor_get_file_bit_offset(cursor):
    return _codac.cursor_get_file_bit_offset(cursor)

def cursor_get_file_byte_offset(cursor):
    return _codac.cursor_get_file_byte_offset(cursor)

def cursor_get_format(cursor):
    return _codac.cursor_get_format(cursor)

def cursor_get_type_class(cursor):
    return _codac.cursor_get_type_class(cursor)

def cursor_get_read_type(cursor):
    return _codac.cursor_get_read_type(cursor)

def cursor_get_special_type(cursor):
    return _codac.cursor_get_special_type(cursor)

def cursor_get_type(cursor):
    return _codac.cursor_get_type(cursor)

def cursor_get_record_field_index_from_name(cursor, name):
    return _codac.cursor_get_record_field_index_from_name(cursor, name)

def cursor_get_record_field_available_status(cursor, index):
    return _codac.cursor_get_record_field_available_status(cursor, index)

def cursor_get_available_union_field_index(cursor):
    return _codac.cursor_get_available_union_field_index(cursor)

def cursor_get_array_dim(cursor):
    return _codac.cursor_get_array_dim(cursor)

def cursor_read_int8(cursor):
    return _codac.cursor_read_int8(cursor)

def cursor_read_uint8(cursor):
    return _codac.cursor_read_uint8(cursor)

def cursor_read_int16(cursor):
    return _codac.cursor_read_int16(cursor)

def cursor_read_uint16(cursor):
    return _codac.cursor_read_uint16(cursor)

def cursor_read_int32(cursor):
    return _codac.cursor_read_int32(cursor)

def cursor_read_uint32(cursor):
    return _codac.cursor_read_uint32(cursor)

def cursor_read_int64(cursor):
    return _codac.cursor_read_int64(cursor)

def cursor_read_uint64(cursor):
    return _codac.cursor_read_uint64(cursor)

def cursor_read_float(cursor):
    return _codac.cursor_read_float(cursor)

def cursor_read_double(cursor):
    return _codac.cursor_read_double(cursor)

def cursor_read_char(cursor):
    return _codac.cursor_read_char(cursor)

def cursor_read_string(cursor):
    return _codac.cursor_read_string(cursor)

def cursor_read_complex_double_split(cursor):
    return _codac.cursor_read_complex_double_split(cursor)

def expression_from_string(exprstring):
    return _codac.expression_from_string(exprstring)

def expression_get_type(expr):
    return _codac.expression_get_type(expr)

def expression_eval_bool(expr, cursor):
    return _codac.expression_eval_bool(expr, cursor)

def expression_eval_integer(expr, cursor):
    return _codac.expression_eval_integer(expr, cursor)

def expression_eval_float(expr, cursor):
    return _codac.expression_eval_float(expr, cursor)

def expression_eval_string(expr, cursor):
    return _codac.expression_eval_string(expr, cursor)

def expression_eval_node(expr, cursor):
    return _codac.expression_eval_node(expr, cursor)

# wrap expression eval functions such that the cursor argument becomes optional
def expression_eval_bool(expr, cursor=None):
    return _codac.expression_eval_bool(expr, cursor)

def expression_eval_integer(expr, cursor=None):
    return _codac.expression_eval_integer(expr, cursor)

def expression_eval_double(expr, cursor=None):
    return _codac.expression_eval_double(expr, cursor)

def expression_eval_string(expr, cursor=None):
    return _codac.expression_eval_string(expr, cursor)

# wrap cursor_read_bytes() function such that the offset and length arguments become optional
def cursor_read_bytes(cursor, offset=None, length=None):
    if offset is None and length is None:
        offset = 0
        length = cursor_get_byte_size(cursor)
    return _codac.cursor_read_bytes(cursor, offset, length)



