/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.8
 * 
 * This file is not intended to be easily readable and contains a number of 
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG 
 * interface file instead. 
 * ----------------------------------------------------------------------------- */

#define SWIGRUBY
#define SWIG_DIRECTORS


#ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
  struct SwigMovePointer {
    T *ptr;
    SwigMovePointer(T *p) : ptr(p) { }
    ~SwigMovePointer() { delete ptr; }
    SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
  } pointer;
  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
  SwigValueWrapper() : pointer(0) { }
  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
  operator T&() const { return *pointer.ptr; }
  T *operator&() { return pointer.ptr; }
};

template <typename T> T SwigValueInit() {
  return T();
}
#endif

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__)) 
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__)) 
# else
#   define SWIGUNUSED 
# endif
#endif

#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
# endif 
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#  ifndef GCC_HASCLASSVISIBILITY
#    define GCC_HASCLASSVISIBILITY
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif 
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif


/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__)) 
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__)) 
# else
#   define SWIGUNUSED 
# endif
#endif

#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
# endif 
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#  ifndef GCC_HASCLASSVISIBILITY
#    define GCC_HASCLASSVISIBILITY
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif 
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif


/* -----------------------------------------------------------------------------
 * swigrun.swg
 *
 * This file contains generic C API SWIG runtime support for pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

/* This should only be incremented when either the layout of swig_type_info changes,
   or for whatever reason, the runtime changes incompatibly */
#define SWIG_RUNTIME_VERSION "4"

/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
# define SWIG_QUOTE_STRING(x) #x
# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
#else
# define SWIG_TYPE_TABLE_NAME
#endif

/*
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  creating a static or dynamic library from the SWIG runtime code.
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
  
  But only do this if strictly necessary, ie, if you have problems
  with your compiler or suchlike.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

/*  Generic buffer size */
#ifndef SWIG_BUFFER_SIZE
# define SWIG_BUFFER_SIZE 1024
#endif

/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN        0x1
#define SWIG_CAST_NEW_MEMORY       0x2

/* Flags for new pointer objects */
#define SWIG_POINTER_OWN           0x1


/* 
   Flags/methods for returning states.
   
   The SWIG conversion methods, as ConvertPtr, return an integer 
   that tells if the conversion was successful or not. And if not,
   an error code can be returned (see swigerrors.swg for the codes).
   
   Use the following macros/flags to set or process the returning
   states.
   
   In old versions of SWIG, code such as the following was usually written:

     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
       // success code
     } else {
       //fail code
     }

   Now you can be more explicit:

    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
    } else {
      // fail code
    }

   which is the same really, but now you can also do

    Type *ptr;
    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
      if (SWIG_IsNewObj(res) {
        ...
	delete *ptr;
      } else {
        ...
      }
    } else {
      // fail code
    }
    
   I.e., now SWIG_ConvertPtr can return new objects and you can
   identify the case and take care of the deallocation. Of course that
   also requires SWIG_ConvertPtr to return new result values, such as

      int SWIG_ConvertPtr(obj, ptr,...) {         
        if (<obj is ok>) {			       
          if (<need new object>) {		       
            *ptr = <ptr to new allocated object>; 
            return SWIG_NEWOBJ;		       
          } else {				       
            *ptr = <ptr to old object>;	       
            return SWIG_OLDOBJ;		       
          } 				       
        } else {				       
          return SWIG_BADOBJ;		       
        }					       
      }

   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
   SWIG errors code.

   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
   allows to return the 'cast rank', for example, if you have this

       int food(double)
       int fooi(int);

   and you call
 
      food(1)   // cast rank '1'  (1 -> 1.0)
      fooi(1)   // cast rank '0'

   just use the SWIG_AddCast()/SWIG_CheckState()
*/

#define SWIG_OK                    (0) 
#define SWIG_ERROR                 (-1)
#define SWIG_IsOK(r)               (r >= 0)
#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  

/* The CastRankLimit says how many bits are used for the cast rank */
#define SWIG_CASTRANKLIMIT         (1 << 8)
/* The NewMask denotes the object was created (using new/malloc) */
#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
/* The TmpMask is for in/out typemaps that use temporal objects */
#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
/* Simple returning values */
#define SWIG_BADOBJ                (SWIG_ERROR)
#define SWIG_OLDOBJ                (SWIG_OK)
#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
/* Check, add and del mask methods */
#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))

/* Cast-Rank Mode */
#if defined(SWIG_CASTRANK_MODE)
#  ifndef SWIG_TypeRank
#    define SWIG_TypeRank             unsigned long
#  endif
#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
#    define SWIG_MAXCASTRANK          (2)
#  endif
#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIGINTERNINLINE int SWIG_AddCast(int r) { 
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
}
SWIGINTERNINLINE int SWIG_CheckState(int r) { 
  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
}
#else /* no cast-rank mode */
#  define SWIG_AddCast
#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);

/* Structure to store information on one type */
typedef struct swig_type_info {
  const char             *name;			/* mangled name of this type */
  const char             *str;			/* human readable name of this type */
  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
  void                   *clientdata;		/* language specific type data */
  int                    owndata;		/* flag if the structure owns the clientdata */
} swig_type_info;

/* Structure to store a type and conversion function used for casting */
typedef struct swig_cast_info {
  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
  swig_converter_func     converter;		/* function to cast the void pointers */
  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
  struct swig_cast_info  *prev;			/* pointer to the previous cast */
} swig_cast_info;

/* Structure used to store module information
 * Each module generates one structure like this, and the runtime collects
 * all of these structures and stores them in a circularly linked list.*/
typedef struct swig_module_info {
  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
  size_t                 size;		        /* Number of types in this module */
  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
  swig_type_info         **type_initial;	/* Array of initially generated type structures */
  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
  void                    *clientdata;		/* Language specific module data */
} swig_module_info;

/* 
  Compare two type names skipping the space characters, therefore
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.

  Return 0 when the two name types are equivalent, as in
  strncmp, but skipping ' '.
*/
SWIGRUNTIME int
SWIG_TypeNameComp(const char *f1, const char *l1,
		  const char *f2, const char *l2) {
  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
    while ((*f1 == ' ') && (f1 != l1)) ++f1;
    while ((*f2 == ' ') && (f2 != l2)) ++f2;
    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  }
  return (int)((l1 - f1) - (l2 - f2));
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if not equal, 1 if equal
*/
SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) {
  int equiv = 0;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (!equiv && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
    if (*ne) ++ne;
  }
  return equiv;
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/
SWIGRUNTIME int
SWIG_TypeCompare(const char *nb, const char *tb) {
  int equiv = 0;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (!equiv && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
    if (*ne) ++ne;
  }
  return equiv;
}


/*
  Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (strcmp(iter->type->name, c) == 0) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/* 
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (iter->type == from) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/*
  Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}

/* 
   Dynamic pointer casting. Down an inheritance hierarchy
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  swig_type_info *lastty = ty;
  if (!ty || !ty->dcast) return ty;
  while (ty && (ty->dcast)) {
    ty = (*ty->dcast)(ptr);
    if (ty) lastty = ty;
  }
  return lastty;
}

/*
  Return the name associated with this type
*/
SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info *ty) {
  return ty->name;
}

/*
  Return the pretty name associated with this type,
  that is an unmangled type name in a form presentable to the user.
*/
SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info *type) {
  /* The "str" field contains the equivalent pretty names of the
     type, separated by vertical-bar characters.  We choose
     to print the last name, as it is often (?) the most
     specific. */
  if (!type) return NULL;
  if (type->str != NULL) {
    const char *last_name = type->str;
    const char *s;
    for (s = type->str; *s; s++)
      if (*s == '|') last_name = s+1;
    return last_name;
  }
  else
    return type->name;
}

/* 
   Set the clientdata field for a type
*/
SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_cast_info *cast = ti->cast;
  /* if (ti->clientdata == clientdata) return; */
  ti->clientdata = clientdata;
  
  while (cast) {
    if (!cast->converter) {
      swig_type_info *tc = cast->type;
      if (!tc->clientdata) {
	SWIG_TypeClientData(tc, clientdata);
      }
    }    
    cast = cast->next;
  }
}
SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  SWIG_TypeClientData(ti, clientdata);
  ti->owndata = 1;
}
  
/*
  Search for a swig_type_info structure only by mangled name
  Search is a O(log #types)
  
  We start searching at module start, and finish searching when start == end.  
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info *start, 
                            swig_module_info *end, 
		            const char *name) {
  swig_module_info *iter = start;
  do {
    if (iter->size) {
      register size_t l = 0;
      register size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	register size_t i = (l + r) >> 1; 
	const char *iname = iter->types[i]->name;
	if (iname) {
	  register int compare = strcmp(name, iname);
	  if (compare == 0) {	    
	    return iter->types[i];
	  } else if (compare < 0) {
	    if (i) {
	      r = i - 1;
	    } else {
	      break;
	    }
	  } else if (compare > 0) {
	    l = i + 1;
	  }
	} else {
	  break; /* should never happen */
	}
      } while (l <= r);
    }
    iter = iter->next;
  } while (iter != end);
  return 0;
}

/*
  Search for a swig_type_info structure for either a mangled name or a human readable name.
  It first searches the mangled names of the types, which is a O(log #types)
  If a type is not found it then searches the human readable names, which is O(#types).
  
  We start searching at module start, and finish searching when start == end.  
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info *start, 
                     swig_module_info *end, 
		     const char *name) {
  /* STEP 1: Search the name field using binary search */
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  if (ret) {
    return ret;
  } else {
    /* STEP 2: If the type hasn't been found, do a complete search
       of the str field (the human readable name) */
    swig_module_info *iter = start;
    do {
      register size_t i = 0;
      for (; i < iter->size; ++i) {
	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
	  return iter->types[i];
      }
      iter = iter->next;
    } while (iter != end);
  }
  
  /* neither found a match */
  return 0;
}

/* 
   Pack binary data into a string
*/
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
  static const char hex[17] = "0123456789abcdef";
  register const unsigned char *u = (unsigned char *) ptr;
  register const unsigned char *eu =  u + sz;
  for (; u != eu; ++u) {
    register unsigned char uu = *u;
    *(c++) = hex[(uu & 0xf0) >> 4];
    *(c++) = hex[uu & 0xf];
  }
  return c;
}

/* 
   Unpack binary data from a string
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  register unsigned char *u = (unsigned char *) ptr;
  register const unsigned char *eu = u + sz;
  for (; u != eu; ++u) {
    register char d = *(c++);
    register unsigned char uu;
    if ((d >= '0') && (d <= '9'))
      uu = ((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = ((d - ('a'-10)) << 4);
    else 
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (d - ('a'-10));
    else 
      return (char *) 0;
    *u = uu;
  }
  return c;
}

/* 
   Pack 'void *' into a string buffer.
*/
SWIGRUNTIME char *
SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  char *r = buff;
  if ((2*sizeof(void *) + 2) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,&ptr,sizeof(void *));
  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  strcpy(r,name);
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      *ptr = (void *) 0;
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sizeof(void *));
}

SWIGRUNTIME char *
SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  char *r = buff;
  size_t lname = (name ? strlen(name) : 0);
  if ((2*sz + 2 + lname) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  if (lname) {
    strncpy(r,name,lname+1);
  } else {
    *r = 0;
  }
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      memset(ptr,0,sz);
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sz);
}

#ifdef __cplusplus
}
#endif

/*  Errors in SWIG */
#define  SWIG_UnknownError    	   -1 
#define  SWIG_IOError        	   -2 
#define  SWIG_RuntimeError   	   -3 
#define  SWIG_IndexError     	   -4 
#define  SWIG_TypeError      	   -5 
#define  SWIG_DivisionByZero 	   -6 
#define  SWIG_OverflowError  	   -7 
#define  SWIG_SyntaxError    	   -8 
#define  SWIG_ValueError     	   -9 
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12 
#define  SWIG_NullReferenceError   -13



#include <ruby.h>

/* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
 * breaks using rb_intern as an lvalue, as SWIG does.  We work around this
 * issue for now by disabling this.
 * https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645
 */
#ifdef rb_intern
# undef rb_intern
#endif

/* Remove global macros defined in Ruby's win32.h */
#ifdef write
# undef write
#endif
#ifdef read
# undef read
#endif
#ifdef bind
# undef bind
#endif
#ifdef close
# undef close
#endif
#ifdef connect
# undef connect
#endif


/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
#ifndef NUM2LL
#define NUM2LL(x) NUM2LONG((x))
#endif
#ifndef LL2NUM
#define LL2NUM(x) INT2NUM((long) (x))
#endif
#ifndef ULL2NUM
#define ULL2NUM(x) UINT2NUM((unsigned long) (x))
#endif

/* Ruby 1.7 doesn't (yet) define NUM2ULL() */
#ifndef NUM2ULL
#ifdef HAVE_LONG_LONG
#define NUM2ULL(x) rb_num2ull((x))
#else
#define NUM2ULL(x) NUM2ULONG(x)
#endif
#endif

/* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */
/* Define these for older versions so we can just write code the new way */
#ifndef RSTRING_LEN
# define RSTRING_LEN(x) RSTRING(x)->len
#endif
#ifndef RSTRING_PTR
# define RSTRING_PTR(x) RSTRING(x)->ptr
#endif
#ifndef RSTRING_END
# define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
#endif
#ifndef RARRAY_LEN
# define RARRAY_LEN(x) RARRAY(x)->len
#endif
#ifndef RARRAY_PTR
# define RARRAY_PTR(x) RARRAY(x)->ptr
#endif
#ifndef RFLOAT_VALUE
# define RFLOAT_VALUE(x) RFLOAT(x)->value
#endif
#ifndef DOUBLE2NUM
# define DOUBLE2NUM(x) rb_float_new(x)
#endif
#ifndef RHASH_TBL
# define RHASH_TBL(x) (RHASH(x)->tbl)
#endif
#ifndef RHASH_ITER_LEV
# define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev)
#endif
#ifndef RHASH_IFNONE
# define RHASH_IFNONE(x) (RHASH(x)->ifnone)
#endif
#ifndef RHASH_SIZE
# define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries)
#endif
#ifndef RHASH_EMPTY_P
# define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0)
#endif
#ifndef RSTRUCT_LEN
# define RSTRUCT_LEN(x) RSTRUCT(x)->len
#endif
#ifndef RSTRUCT_PTR
# define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
#endif



/*
 * Need to be very careful about how these macros are defined, especially
 * when compiling C++ code or C code with an ANSI C compiler.
 *
 * VALUEFUNC(f) is a macro used to typecast a C function that implements
 * a Ruby method so that it can be passed as an argument to API functions
 * like rb_define_method() and rb_define_singleton_method().
 *
 * VOIDFUNC(f) is a macro used to typecast a C function that implements
 * either the "mark" or "free" stuff for a Ruby Data object, so that it
 * can be passed as an argument to API functions like Data_Wrap_Struct()
 * and Data_Make_Struct().
 */
 
#ifdef __cplusplus
#  ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
#    define PROTECTFUNC(f) ((VALUE (*)()) f)
#    define VALUEFUNC(f) ((VALUE (*)()) f)
#    define VOIDFUNC(f)  ((void (*)()) f)
#  else
#    ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
#      define PROTECTFUNC(f) ((VALUE (*)()) f)
#      define VALUEFUNC(f) ((VALUE (*)()) f)
#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
#    else /* These definitions should work for Ruby 1.7+ */
#      define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
#      define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
#    endif
#  endif
#else
#  define VALUEFUNC(f) (f)
#  define VOIDFUNC(f) (f)
#endif

/* Don't use for expressions have side effect */
#ifndef RB_STRING_VALUE
#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
#endif
#ifndef StringValue
#define StringValue(s) RB_STRING_VALUE(s)
#endif
#ifndef StringValuePtr
#define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s))
#endif
#ifndef StringValueLen
#define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
#endif
#ifndef SafeStringValue
#define SafeStringValue(v) do {\
    StringValue(v);\
    rb_check_safe_str(v);\
} while (0)
#endif

#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
#define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
#endif

static VALUE _mSWIG = Qnil;

/* -----------------------------------------------------------------------------
 * error manipulation
 * ----------------------------------------------------------------------------- */


/* Define some additional error types */
#define SWIG_ObjectPreviouslyDeletedError  -100


/* Define custom exceptions for errors that do not map to existing Ruby
   exceptions.  Note this only works for C++ since a global cannot be
   initialized by a function in C.  For C, fallback to rb_eRuntimeError.*/

SWIGINTERN VALUE 
getNullReferenceError(void) {
  static int init = 0;
  static VALUE rb_eNullReferenceError ;
  if (!init) {
    init = 1;
    rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError);
  }
  return rb_eNullReferenceError;
} 

SWIGINTERN VALUE 
getObjectPreviouslyDeletedError(void) {
  static int init = 0;
  static VALUE rb_eObjectPreviouslyDeleted ;
  if (!init) {
    init = 1;
    rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError);
  }
  return rb_eObjectPreviouslyDeleted;
} 


SWIGINTERN VALUE
SWIG_Ruby_ErrorType(int SWIG_code) {
  VALUE type;
  switch (SWIG_code) {
  case SWIG_MemoryError:
    type = rb_eNoMemError;
    break;
  case SWIG_IOError:
    type = rb_eIOError;
    break;
  case SWIG_RuntimeError:
    type = rb_eRuntimeError;
    break;
  case SWIG_IndexError:
    type = rb_eIndexError;
    break;
  case SWIG_TypeError:
    type = rb_eTypeError;
    break;
  case SWIG_DivisionByZero:
    type = rb_eZeroDivError;
    break;
  case SWIG_OverflowError:
    type = rb_eRangeError;
    break;
  case SWIG_SyntaxError:
    type = rb_eSyntaxError;
    break;
  case SWIG_ValueError:
    type = rb_eArgError;
    break;
  case SWIG_SystemError:
    type = rb_eFatal;
    break;
  case SWIG_AttributeError:
    type = rb_eRuntimeError;
    break;
  case SWIG_NullReferenceError:
    type = getNullReferenceError();
    break;
  case SWIG_ObjectPreviouslyDeletedError:
    type = getObjectPreviouslyDeletedError();
    break;
  case SWIG_UnknownError:
    type = rb_eRuntimeError;
    break;
  default:
    type = rb_eRuntimeError;
  }
  return type;
}


/* This function is called when a user inputs a wrong argument to
   a method.
 */
SWIGINTERN 
const char* Ruby_Format_TypeError( const char* msg,
				   const char* type, 
				   const char* name, 
				   const int argn,
				   VALUE input )
{
  char buf[128];
  VALUE str;
  VALUE asStr;
  if ( msg && *msg )
    {
      str = rb_str_new2(msg);
    }
  else
    {
      str = rb_str_new(NULL, 0);
    }

  str = rb_str_cat2( str, "Expected argument " );
  sprintf( buf, "%d of type ", argn-1 );
  str = rb_str_cat2( str, buf );
  str = rb_str_cat2( str, type );
  str = rb_str_cat2( str, ", but got " );
  str = rb_str_cat2( str, rb_obj_classname(input) );
  str = rb_str_cat2( str, " " );
  asStr = rb_inspect(input);
  if ( RSTRING_LEN(asStr) > 30 )
    {
      str = rb_str_cat( str, StringValuePtr(asStr), 30 );
      str = rb_str_cat2( str, "..." );
    }
  else
    {
      str = rb_str_append( str, asStr );
    }

  if ( name )
    {
      str = rb_str_cat2( str, "\n\tin SWIG method '" );
      str = rb_str_cat2( str, name );
      str = rb_str_cat2( str, "'" );
    }

  return StringValuePtr( str );
}

/* This function is called when an overloaded method fails */
SWIGINTERN 
void Ruby_Format_OverloadedError(
				 const int argc,
				 const int maxargs,
				 const char* method, 
				 const char* prototypes 
				 )
{
  const char* msg = "Wrong # of arguments";
  if ( argc <= maxargs ) msg = "Wrong arguments";
  rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"  
	   "Possible C/C++ prototypes are:\n%s",
	   msg, method, prototypes);
}

/* -----------------------------------------------------------------------------
 * rubytracking.swg
 *
 * This file contains support for tracking mappings from 
 * Ruby objects to C++ objects.  This functionality is needed
 * to implement mark functions for Ruby's mark and sweep
 * garbage collector.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif

/* Ruby 1.8 actually assumes the first case. */
#if SIZEOF_VOIDP == SIZEOF_LONG
#  define SWIG2NUM(v) LONG2NUM((unsigned long)v)
#  define NUM2SWIG(x) (unsigned long)NUM2LONG(x)
#elif SIZEOF_VOIDP == SIZEOF_LONG_LONG
#  define SWIG2NUM(v) LL2NUM((unsigned long long)v)
#  define NUM2SWIG(x) (unsigned long long)NUM2LL(x)
#else
#  error sizeof(void*) is not the same as long or long long
#endif


/* Global Ruby hash table to store Trackings from C/C++
   structs to Ruby Objects. 
*/
static VALUE swig_ruby_trackings = Qnil;

/* Global variable that stores a reference to the ruby
   hash table delete function. */
static ID swig_ruby_hash_delete;

/* Setup a Ruby hash table to store Trackings */
SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
  /* Create a ruby hash table to store Trackings from C++ 
     objects to Ruby objects. */

  /* Try to see if some other .so has already created a 
     tracking hash table, which we keep hidden in an instance var
     in the SWIG module.
     This is done to allow multiple DSOs to share the same
     tracking table.
  */
  ID trackings_id = rb_intern( "@__trackings__" );
  VALUE verbose = rb_gv_get("VERBOSE");
  rb_gv_set("VERBOSE", Qfalse);
  swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
  rb_gv_set("VERBOSE", verbose);

  /* No, it hasn't.  Create one ourselves */ 
  if ( swig_ruby_trackings == Qnil )
    {
      swig_ruby_trackings = rb_hash_new();
      rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings );
    }

  /* Now store a reference to the hash table delete function
     so that we only have to look it up once.*/
  swig_ruby_hash_delete = rb_intern("delete");
}

/* Get a Ruby number to reference a pointer */
SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
  /* We cast the pointer to an unsigned long
     and then store a reference to it using
     a Ruby number object. */

  /* Convert the pointer to a Ruby number */
  return SWIG2NUM(ptr);
}

/* Get a Ruby number to reference an object */
SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
  /* We cast the object to an unsigned long
     and then store a reference to it using
     a Ruby number object. */

  /* Convert the Object to a Ruby number */
  return SWIG2NUM(object);
}

/* Get a Ruby object from a previously stored reference */
SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
  /* The provided Ruby number object is a reference
     to the Ruby object we want.*/

  /* Convert the Ruby number to a Ruby object */
  return NUM2SWIG(reference);
}

/* Add a Tracking from a C/C++ struct to a Ruby object */
SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
  /* In a Ruby hash table we store the pointer and
     the associated Ruby object.  The trick here is
     that we cannot store the Ruby object directly - if
     we do then it cannot be garbage collected.  So
     instead we typecast it as a unsigned long and
     convert it to a Ruby number object.*/

  /* Get a reference to the pointer as a Ruby number */
  VALUE key = SWIG_RubyPtrToReference(ptr);

  /* Get a reference to the Ruby object as a Ruby number */
  VALUE value = SWIG_RubyObjectToReference(object);

  /* Store the mapping to the global hash table. */
  rb_hash_aset(swig_ruby_trackings, key, value);
}

/* Get the Ruby object that owns the specified C/C++ struct */
SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
  /* Get a reference to the pointer as a Ruby number */
  VALUE key = SWIG_RubyPtrToReference(ptr);

  /* Now lookup the value stored in the global hash table */
  VALUE value = rb_hash_aref(swig_ruby_trackings, key);
	
  if (value == Qnil) {
    /* No object exists - return nil. */
    return Qnil;
  }
  else {
    /* Convert this value to Ruby object */
    return SWIG_RubyReferenceToObject(value);
  }
}

/* Remove a Tracking from a C/C++ struct to a Ruby object.  It
   is very important to remove objects once they are destroyed
   since the same memory address may be reused later to create
   a new object. */
SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
  /* Get a reference to the pointer as a Ruby number */
  VALUE key = SWIG_RubyPtrToReference(ptr);

  /* Delete the object from the hash table by calling Ruby's
     do this we need to call the Hash.delete method.*/
  rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
}

/* This is a helper method that unlinks a Ruby object from its
   underlying C++ object.  This is needed if the lifetime of the
   Ruby object is longer than the C++ object */
SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
  VALUE object = SWIG_RubyInstanceFor(ptr);

  if (object != Qnil) {
    DATA_PTR(object) = 0;
  }
}


#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------
 * Ruby API portion that goes into the runtime
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif

SWIGINTERN VALUE
SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
  if (NIL_P(target)) {
    target = o;
  } else {
    if (TYPE(target) != T_ARRAY) {
      VALUE o2 = target;
      target = rb_ary_new();
      rb_ary_push(target, o2);
    }
    rb_ary_push(target, o);
  }
  return target;
}

/* For ruby1.8.4 and earlier. */
#ifndef RUBY_INIT_STACK
   RUBY_EXTERN void Init_stack(VALUE* addr);
#  define RUBY_INIT_STACK \
   VALUE variable_in_this_stack_frame; \
   Init_stack(&variable_in_this_stack_frame);
#endif


#ifdef __cplusplus
}
#endif


/* -----------------------------------------------------------------------------
 * rubyrun.swg
 *
 * This file contains the runtime support for Ruby modules
 * and includes code for managing global variables and pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

/* For backward compatibility only */
#define SWIG_POINTER_EXCEPTION  0

/* for raw pointers */
#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Ruby_NewPointerObj(ptr, type, flags)
#define SWIG_AcquirePtr(ptr, own)                       SWIG_Ruby_AcquirePtr(ptr, own)
#define swig_owntype                                    ruby_owntype

/* for raw packed data */
#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Ruby_NewPackedObj(ptr, sz, type)

/* for class or struct pointers */
#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)

/* for C or C++ function pointers */
#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_ConvertPtr(obj, pptr, type, 0)
#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_NewPointerObj(ptr, type, 0)

/* for C++ member pointers, ie, member methods */
#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty)
#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Ruby_NewPackedObj(ptr, sz, type)


/* Runtime API */

#define SWIG_GetModule(clientdata)                      SWIG_Ruby_GetModule()	
#define SWIG_SetModule(clientdata, pointer) 		SWIG_Ruby_SetModule(pointer)


/* Error manipulation */

#define SWIG_ErrorType(code)                            SWIG_Ruby_ErrorType(code)               
#define SWIG_Error(code, msg)            		rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
#define SWIG_fail                        		goto fail				 


/* Ruby-specific SWIG API */

#define SWIG_InitRuntime()                              SWIG_Ruby_InitRuntime()              
#define SWIG_define_class(ty)                        	SWIG_Ruby_define_class(ty)
#define SWIG_NewClassInstance(value, ty)             	SWIG_Ruby_NewClassInstance(value, ty)
#define SWIG_MangleStr(value)                        	SWIG_Ruby_MangleStr(value)		  
#define SWIG_CheckConvert(value, ty)                 	SWIG_Ruby_CheckConvert(value, ty)	  

#include "assert.h"

/* -----------------------------------------------------------------------------
 * pointers/data manipulation
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif

typedef struct {
  VALUE klass;
  VALUE mImpl;
  void  (*mark)(void *);
  void  (*destroy)(void *);
  int trackObjects;
} swig_class;


/* Global pointer used to keep some internal SWIG stuff */
static VALUE _cSWIG_Pointer = Qnil;
static VALUE swig_runtime_data_type_pointer = Qnil;

/* Global IDs used to keep some internal SWIG stuff */
static ID swig_arity_id = 0;
static ID swig_call_id  = 0;

/*
  If your swig extension is to be run within an embedded ruby and has
  director callbacks, you should set -DRUBY_EMBEDDED during compilation.  
  This will reset ruby's stack frame on each entry point from the main 
  program the first time a virtual director function is invoked (in a 
  non-recursive way).
  If this is not done, you run the risk of Ruby trashing the stack.
*/

#ifdef RUBY_EMBEDDED

#  define SWIG_INIT_STACK                            \
      if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
      ++swig_virtual_calls;
#  define SWIG_RELEASE_STACK --swig_virtual_calls;
#  define Ruby_DirectorTypeMismatchException(x) \
          rb_raise( rb_eTypeError, "%s", x ); return c_result;

      static unsigned int swig_virtual_calls = 0;

#else  /* normal non-embedded extension */

#  define SWIG_INIT_STACK
#  define SWIG_RELEASE_STACK
#  define Ruby_DirectorTypeMismatchException(x) \
          throw Swig::DirectorTypeMismatchException( x );

#endif  /* RUBY_EMBEDDED */


SWIGRUNTIME VALUE 
getExceptionClass(void) {
  static int init = 0;
  static VALUE rubyExceptionClass ;
  if (!init) {
    init = 1;
    rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception"));
  }
  return rubyExceptionClass;
} 

/* This code checks to see if the Ruby object being raised as part
   of an exception inherits from the Ruby class Exception.  If so,
   the object is simply returned.  If not, then a new Ruby exception
   object is created and that will be returned to Ruby.*/
SWIGRUNTIME VALUE
SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) {
  VALUE exceptionClass = getExceptionClass();
  if (rb_obj_is_kind_of(obj, exceptionClass)) {
    return obj;
  }  else {
    return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj));
  }
}

/* Initialize Ruby runtime support */
SWIGRUNTIME void
SWIG_Ruby_InitRuntime(void)
{
  if (_mSWIG == Qnil) {
    _mSWIG = rb_define_module("SWIG");
    swig_call_id  = rb_intern("call");
    swig_arity_id = rb_intern("arity");
  }
}

/* Define Ruby class for C type */
SWIGRUNTIME void
SWIG_Ruby_define_class(swig_type_info *type)
{
  VALUE klass;
  char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
  sprintf(klass_name, "TYPE%s", type->name);
  if (NIL_P(_cSWIG_Pointer)) {
    _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
    rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
  }
  klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
  free((void *) klass_name);
}

/* Create a new pointer object */
SWIGRUNTIME VALUE
SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
{
  int own =  flags & SWIG_POINTER_OWN; 
  int track;
  char *klass_name;
  swig_class *sklass;
  VALUE klass;
  VALUE obj;
  
  if (!ptr)
    return Qnil;
  
  if (type->clientdata) {
    sklass = (swig_class *) type->clientdata;
		
    /* Are we tracking this class and have we already returned this Ruby object? */
    track = sklass->trackObjects;
    if (track) {
      obj = SWIG_RubyInstanceFor(ptr);
      
      /* Check the object's type and make sure it has the correct type.
        It might not in cases where methods do things like 
        downcast methods. */
      if (obj != Qnil) {
        VALUE value = rb_iv_get(obj, "@__swigtype__");
        const char* type_name = RSTRING_PTR(value);
				
        if (strcmp(type->name, type_name) == 0) {
          return obj;
        }
      }
    }

    /* Create a new Ruby object */
    obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), 
			   ( own ? VOIDFUNC(sklass->destroy) : 
			     (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
			     ), ptr);

    /* If tracking is on for this class then track this object. */
    if (track) {
      SWIG_RubyAddTracking(ptr, obj);
    }
  } else {
    klass_name = (char *) malloc(4 + strlen(type->name) + 1);
    sprintf(klass_name, "TYPE%s", type->name);
    klass = rb_const_get(_mSWIG, rb_intern(klass_name));
    free((void *) klass_name);
    obj = Data_Wrap_Struct(klass, 0, 0, ptr);
  }
  rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
  
  return obj;
}

/* Create a new class instance (always owned) */
SWIGRUNTIME VALUE
SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
{
  VALUE obj;
  swig_class *sklass = (swig_class *) type->clientdata;
  obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
  rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
  return obj;
}

/* Get type mangle from class name */
SWIGRUNTIMEINLINE char *
SWIG_Ruby_MangleStr(VALUE obj)
{
  VALUE stype = rb_iv_get(obj, "@__swigtype__");
  return StringValuePtr(stype);
}

/* Acquire a pointer value */
typedef void (*ruby_owntype)(void*);

SWIGRUNTIME ruby_owntype
SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) {
  if (obj) {
    ruby_owntype oldown = RDATA(obj)->dfree;
    RDATA(obj)->dfree = own;
    return oldown;
  } else {
    return 0;
  }
}

/* Convert a pointer value */
SWIGRUNTIME int
SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own)
{
  char *c;
  swig_cast_info *tc;
  void *vptr = 0;

  /* Grab the pointer */
  if (NIL_P(obj)) {
    *ptr = 0;
    return SWIG_OK;
  } else {
    if (TYPE(obj) != T_DATA) {
      return SWIG_ERROR;
    }
    Data_Get_Struct(obj, void, vptr);
  }
  
  if (own) *own = RDATA(obj)->dfree;
    
  /* Check to see if the input object is giving up ownership
     of the underlying C struct or C++ object.  If so then we
     need to reset the destructor since the Ruby object no 
     longer owns the underlying C++ object.*/ 
  if (flags & SWIG_POINTER_DISOWN) {
    /* Is tracking on for this class? */
    int track = 0;
    if (ty && ty->clientdata) {
      swig_class *sklass = (swig_class *) ty->clientdata;
      track = sklass->trackObjects;
    }
		
    if (track) {
      /* We are tracking objects for this class.  Thus we change the destructor
       * to SWIG_RubyRemoveTracking.  This allows us to
       * remove the mapping from the C++ to Ruby object
       * when the Ruby object is garbage collected.  If we don't
       * do this, then it is possible we will return a reference 
       * to a Ruby object that no longer exists thereby crashing Ruby. */
      RDATA(obj)->dfree = SWIG_RubyRemoveTracking;
    } else {    
      RDATA(obj)->dfree = 0;
    }
  }

  /* Do type-checking if type info was provided */
  if (ty) {
    if (ty->clientdata) {
      if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
        if (vptr == 0) {
          /* The object has already been deleted */
          return SWIG_ObjectPreviouslyDeletedError;
        }
        *ptr = vptr;
        return SWIG_OK;
      }
    }
    if ((c = SWIG_MangleStr(obj)) == NULL) {
      return SWIG_ERROR;
    }
    tc = SWIG_TypeCheck(c, ty);
    if (!tc) {
      return SWIG_ERROR;
    } else {
      int newmemory = 0;
      *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
      assert(!newmemory); /* newmemory handling not yet implemented */
    }
  } else {
    *ptr = vptr;
  }
  
  return SWIG_OK;
}

/* Check convert */
SWIGRUNTIMEINLINE int
SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
{
  char *c = SWIG_MangleStr(obj);
  if (!c) return 0;
  return SWIG_TypeCheck(c,ty) != 0;
}

SWIGRUNTIME VALUE
SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
  char result[1024];
  char *r = result;
  if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r, ptr, sz);
  strcpy(r, type->name);
  return rb_str_new2(result);
}

/* Convert a packed value value */
SWIGRUNTIME int
SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
  swig_cast_info *tc;
  const char  *c;

  if (TYPE(obj) != T_STRING) goto type_error;
  c = StringValuePtr(obj);
  /* Pointer values must start with leading underscore */
  if (*c != '_') goto type_error;
  c++;
  c = SWIG_UnpackData(c, ptr, sz);
  if (ty) {
    tc = SWIG_TypeCheck(c, ty);
    if (!tc) goto type_error;
  }
  return SWIG_OK;

 type_error:
  return SWIG_ERROR;
}

SWIGRUNTIME swig_module_info *
SWIG_Ruby_GetModule(void)
{
  VALUE pointer;
  swig_module_info *ret = 0;
  VALUE verbose = rb_gv_get("VERBOSE");

 /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
  rb_gv_set("VERBOSE", Qfalse);
  
  /* first check if pointer already created */
  pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
  if (pointer != Qnil) {
    Data_Get_Struct(pointer, swig_module_info, ret);
  }

  /* reinstate warnings */
  rb_gv_set("VERBOSE", verbose);
  return ret;
}

SWIGRUNTIME void 
SWIG_Ruby_SetModule(swig_module_info *pointer)
{
  /* register a new class */
  VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
  /* create and store the structure pointer to a global variable */
  swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
  rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
}

/* This function can be used to check whether a proc or method or similarly
   callable function has been passed.  Usually used in a %typecheck, like:

   %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) {
        $result = SWIG_Ruby_isCallable( $input );
   }
 */
SWIGINTERN
int SWIG_Ruby_isCallable( VALUE proc )
{
  if ( rb_respond_to( proc, swig_call_id ) == Qtrue )
    return 1;
  return 0;
}

/* This function can be used to check the arity (number of arguments)
   a proc or method can take.  Usually used in a %typecheck.
   Valid arities will be that equal to minimal or those < 0
   which indicate a variable number of parameters at the end.
 */
SWIGINTERN
int SWIG_Ruby_arity( VALUE proc, int minimal )
{
  if ( rb_respond_to( proc, swig_arity_id ) == Qtrue )
    {
      VALUE num = rb_funcall( proc, swig_arity_id, 0 );
      int arity = NUM2INT(num);
      if ( arity < 0 && (arity+1) < -minimal ) return 1;
      if ( arity == minimal ) return 1;
      return 1;
    }
  return 0;
}


#ifdef __cplusplus
}
#endif



#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 

#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 



  #define SWIG_exception(code, msg) do { SWIG_Error(code, msg);; } while(0) 

/* -----------------------------------------------------------------------------
 * director.swg
 *
 * This file contains support for director classes that proxy
 * method calls from C++ to Ruby extensions.
 * ----------------------------------------------------------------------------- */

/*
  Use -DSWIG_DIRECTOR_NOUEH if you prefer to avoid the use of the
  Undefined Exception Handler provided by swift
*/
#ifndef SWIG_DIRECTOR_NOUEH
#ifndef SWIG_DIRECTOR_UEH
#define SWIG_DIRECTOR_UEH
#endif
#endif

#ifdef __cplusplus

#include <string>
#include <iostream>
#include <map>

# define SWIG_DIRECTOR_CAST(ARG) dynamic_cast<Swig::Director *>(ARG)

namespace Swig {
  /* memory handler */
  struct GCItem 
  {
    virtual ~GCItem()
    {
    }

    virtual ruby_owntype get_own() const
    {
      return 0;
    }
  };
  
  struct GCItem_var
  {
    GCItem_var(GCItem *item = 0) : _item(item)
    {
    }

    GCItem_var& operator=(GCItem *item)
    {
      GCItem *tmp = _item;
      _item = item;
      delete tmp;
      return *this;
    }
    
    ~GCItem_var() 
    {
      delete _item;
    }
    
    GCItem * operator->() const
    {
      return _item;
    }
    
  private:
    GCItem *_item;
  };


  template <typename Type>
  struct GCItem_T : GCItem
  {
    GCItem_T(Type *ptr) : _ptr(ptr)
    {
    }
    
    virtual ~GCItem_T() 
    {
      delete _ptr;
    }
    
  private:
    Type *_ptr;
  };

  struct GCItem_Object : GCItem
  {
    GCItem_Object(ruby_owntype own) : _own(own)
    {
    }
    
    virtual ~GCItem_Object() 
    {
    }

    ruby_owntype get_own() const
    {
      return _own;
    }
    
  private:
    ruby_owntype _own;
  };


  template <typename Type>
  struct GCArray_T : GCItem
  {
    GCArray_T(Type *ptr) : _ptr(ptr)
    {
    }
    
    virtual ~GCArray_T() 
    {
      delete[] _ptr;
    }
    
  private:
    Type *_ptr;
  };


  /* body args */
  struct body_args {
    VALUE recv;
    ID id;
    int argc;
    VALUE *argv;
  };
  
  /* Base class for director exceptions */
  class DirectorException {
  protected:
    VALUE swig_error;
    std::string swig_msg;
  protected:
    DirectorException(VALUE error)
      : swig_error(error)
    {
    }
    
    DirectorException(VALUE error, const char* hdr, const char* msg ="") 
      : swig_error(error), swig_msg(hdr) {
      if (strlen(msg)) {
	swig_msg += " ";
	swig_msg += msg;
      }
      if (swig_msg.size()) {
	VALUE str = rb_str_new(swig_msg.data(), swig_msg.size());
	swig_error = rb_exc_new3(error, str);
      } else {
	swig_error = error;
      }
    }
  public:
    VALUE getType() const  { 
      return CLASS_OF(swig_error); 
    }
    VALUE getError() const {
      return swig_error;
    }
    const std::string& getMessage() const 
    {
      return swig_msg;
    }
    
    virtual ~DirectorException() {}
  };
  
  /* unknown exception handler  */

  class UnknownExceptionHandler 
  {
#ifdef SWIG_DIRECTOR_UEH
    static void handler() {
      try {
	throw;
      } catch (DirectorException& e) {
	std::cerr << "SWIG Director exception caught:" << std::endl
		  << e.getMessage() << std::endl;
      } catch (std::exception& e) {
	std::cerr << "std::exception caught: "<< e.what() << std::endl;
      } catch (...) {
	std::cerr << "Unknown exception caught." << std::endl;
      }      
      std::cerr << std::endl
		<< "Ruby interpreter traceback:" << std::endl;
      std::cerr << std::endl;      
      std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl
		<< "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl
		<< std::endl
		<< "Exception is being re-thrown, program will like abort/terminate." << std::endl;
      throw;
    }
    
  public:    
    std::unexpected_handler old;
    UnknownExceptionHandler(std::unexpected_handler nh = handler)
    {
      old = std::set_unexpected(nh);
    }

    ~UnknownExceptionHandler()
    {
      std::set_unexpected(old);
    }
#endif
  };


  /* Type mismatch in the return value from a Ruby method call */
  class DirectorTypeMismatchException : public Swig::DirectorException {
  public:
    DirectorTypeMismatchException(VALUE error, const char *msg="")
      : Swig::DirectorException(error, "SWIG director type mismatch", msg) 
    {
    }

    DirectorTypeMismatchException(const char *msg="")
      : Swig::DirectorException(rb_eTypeError, "SWIG director type mismatch", msg) 
    {
    }

    static void raise(VALUE error, const char *msg) {
      throw DirectorTypeMismatchException(error, msg);
    }

    static void raise(const char *msg) {
      throw DirectorTypeMismatchException(msg);
    }
  };

  /* Any Ruby exception that occurs during a director method call */
  class DirectorMethodException : public Swig::DirectorException {
  public:
    DirectorMethodException(VALUE error) 
      : Swig::DirectorException(error) {
    }

    DirectorMethodException(const char* msg = "") 
      : Swig::DirectorException(rb_eRuntimeError, "SWIG director method error.", msg) {
    }
    
    static void raise(VALUE error)
    {
      throw DirectorMethodException(error);
    }    
  };

  /* Attempted to call a pure virtual method via a director method */
  class DirectorPureVirtualException : public Swig::DirectorException
  {
  public:
    DirectorPureVirtualException(const char* msg = "") 
      : DirectorException(rb_eRuntimeError, "SWIG director pure virtual method called", msg)
    { 
    }

    static void raise(const char *msg) 
    {
      throw DirectorPureVirtualException(msg);
    }
  };

  /* Simple thread abstraction for pthreads on win32 */
#ifdef __THREAD__
# define __PTHREAD__
# if defined(_WIN32) || defined(__WIN32__)
#  define pthread_mutex_lock EnterCriticalSection
#  define pthread_mutex_unlock LeaveCriticalSection
#  define pthread_mutex_t CRITICAL_SECTION
#  define SWIG_MUTEX_INIT(var) var
# else
#  include <pthread.h>
#  define SWIG_MUTEX_INIT(var) var = PTHREAD_MUTEX_INITIALIZER 
# endif
#endif

#ifdef  __PTHREAD__
  struct Guard
  {
    pthread_mutex_t *_mutex;
    
    Guard(pthread_mutex_t &mutex) : _mutex(&mutex)
    {
      pthread_mutex_lock(_mutex);
    }
    
    ~Guard()
    {
      pthread_mutex_unlock(_mutex);
    }
  };
# define SWIG_GUARD(mutex) Guard _guard(mutex)
#else
# define SWIG_GUARD(mutex) 
#endif

  /* director base class */
  class Director {
  private:
    /* pointer to the wrapped Ruby object */
    VALUE swig_self;
    /* flag indicating whether the object is owned by Ruby or c++ */
    mutable bool swig_disown_flag;

  public:
    /* wrap a Ruby object, optionally taking ownership */
    Director(VALUE self) : swig_self(self), swig_disown_flag(false) {
    }

    /* discard our reference at destruction */
    virtual ~Director() {
    }

    /* return a pointer to the wrapped Ruby object */
    VALUE swig_get_self() const { 
      return swig_self; 
    }

    /* acquire ownership of the wrapped Ruby object (the sense of "disown"
     * is from Ruby) */
    void swig_disown() const { 
      if (!swig_disown_flag) { 
        swig_disown_flag = true;
      } 
    }

  /* ownership management */
  private:
    typedef std::map<void*, GCItem_var> swig_ownership_map;
    mutable swig_ownership_map swig_owner;
#ifdef __PTHREAD__
    static pthread_mutex_t swig_mutex_own;
#endif

  public:
    template <typename Type>
    void swig_acquire_ownership_array(Type *vptr)  const
    {
      if (vptr) {
	SWIG_GUARD(swig_mutex_own);
	swig_owner[vptr] = new GCArray_T<Type>(vptr);
      }
    }
    
    template <typename Type>
    void swig_acquire_ownership(Type *vptr)  const
    {
      if (vptr) {	
	SWIG_GUARD(swig_mutex_own);
	swig_owner[vptr] = new GCItem_T<Type>(vptr);
      }
    }

    void swig_acquire_ownership_obj(void *vptr, ruby_owntype own) const
    {
      if (vptr && own) {
	SWIG_GUARD(swig_mutex_own);
	swig_owner[vptr] = new GCItem_Object(own);
      }
    }
    
    ruby_owntype swig_release_ownership(void *vptr) const
    {
      ruby_owntype own = 0;
      if (vptr) {
	SWIG_GUARD(swig_mutex_own);
	swig_ownership_map::iterator iter = swig_owner.find(vptr);
	if (iter != swig_owner.end()) {
	  own = iter->second->get_own();
	  swig_owner.erase(iter);
	}
      }
      return own;
    }
  };
}

#endif /* __cplusplus */



/* -------- TYPES TABLE (BEGIN) -------- */

#define SWIGTYPE_p_LizardTech__Bounds swig_types[0]
#define SWIGTYPE_p_LizardTech__ChannelData swig_types[1]
#define SWIGTYPE_p_LizardTech__ChannelInfo swig_types[2]
#define SWIGTYPE_p_LizardTech__DataTypeUtils swig_types[3]
#define SWIGTYPE_p_LizardTech__FileIO swig_types[4]
#define SWIGTYPE_p_LizardTech__IO swig_types[5]
#define SWIGTYPE_p_LizardTech__MG4PointReader swig_types[6]
#define SWIGTYPE_p_LizardTech__Metadata swig_types[7]
#define SWIGTYPE_p_LizardTech__Object swig_types[8]
#define SWIGTYPE_p_LizardTech__PercentProgressDelegate swig_types[9]
#define SWIGTYPE_p_LizardTech__PointData swig_types[10]
#define SWIGTYPE_p_LizardTech__PointInfo swig_types[11]
#define SWIGTYPE_p_LizardTech__PointIterator swig_types[12]
#define SWIGTYPE_p_LizardTech__PointReader swig_types[13]
#define SWIGTYPE_p_LizardTech__PointSource swig_types[14]
#define SWIGTYPE_p_LizardTech__PointWriter swig_types[15]
#define SWIGTYPE_p_LizardTech__ProgressDelegate swig_types[16]
#define SWIGTYPE_p_LizardTech__Range swig_types[17]
#define SWIGTYPE_p_LizardTech__SimplePointWriter swig_types[18]
#define SWIGTYPE_p_LizardTech__TXTPointReader swig_types[19]
#define SWIGTYPE_p_LizardTech__TXTPointWriter swig_types[20]
#define SWIGTYPE_p_LizardTech__Version swig_types[21]
#define SWIGTYPE_p_char swig_types[22]
#define SWIGTYPE_p_count_type swig_types[23]
#define SWIGTYPE_p_double swig_types[24]
#define SWIGTYPE_p_int swig_types[25]
#define SWIGTYPE_p_long_long swig_types[26]
#define SWIGTYPE_p_offset_type swig_types[27]
#define SWIGTYPE_p_p_char swig_types[28]
#define SWIGTYPE_p_short swig_types[29]
#define SWIGTYPE_p_signed_char swig_types[30]
#define SWIGTYPE_p_size_t swig_types[31]
#define SWIGTYPE_p_unsigned_char swig_types[32]
#define SWIGTYPE_p_unsigned_int swig_types[33]
#define SWIGTYPE_p_unsigned_long_long swig_types[34]
#define SWIGTYPE_p_unsigned_short swig_types[35]
#define SWIGTYPE_p_wchar_t swig_types[36]
static swig_type_info *swig_types[38];
static swig_module_info swig_module = {swig_types, 37, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

/* -------- TYPES TABLE (END) -------- */

#define SWIG_init    Init_LidarDSDK
#define SWIG_name    "LidarDSDK"

static VALUE mLidarDSDK;

#define SWIG_RUBY_THREAD_BEGIN_BLOCK
#define SWIG_RUBY_THREAD_END_BLOCK


#define SWIGVERSION 0x020008 
#define SWIG_VERSION SWIGVERSION


#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 


#include <stdexcept>



// host helper functions

#if defined SWIGPYTHON

static PyObject *doubleArrayToObject(const double *value, size_t length)
{
   PyObject *obj = Py_None;
   if(value != NULL)
   {
      obj = PyTuple_New(length);
      for(size_t i = 0; i < length; i += 1)
         PyTuple_SetItem(obj, i, PyFloat_FromDouble(value[i]));
   }
   return obj;
}

static PyObject *stringArrayToObject(char **value, size_t length)
{
   PyObject *obj = Py_None;
   if(value != NULL)
   {
      obj = PyTuple_New(length);
      for(size_t i = 0; i < length; i += 1)
         PyTuple_SetItem(obj, i, PyString_FromString(value[i]));
   }
   return obj;
}

static double *objectToDouble3(PyObject *obj, double value[3])
{
   if(obj == Py_None)
      return NULL;
   else if(PyTuple_Check(obj) && PyObject_Length(obj) == 3)
   {
      for(int i = 0; i < 3; i += 1)
         value[i] = PyFloat_AsDouble(PyTuple_GetItem(obj, i));
      return value;
   }
   //SWIG_exception(SWIG_TypeError, "expected an Array with 3 doubles");
   return NULL;
}

#elif defined SWIGRUBY

static VALUE doubleArrayToObject(const double *value, size_t length)
{
   VALUE obj = Qnil;
   if(value != NULL)
   {
      obj = rb_ary_new2(length);
      for(size_t i = 0; i < length; i += 1)
         rb_ary_store(obj, i, rb_float_new(value[i]));
   }
   return obj;
}

static VALUE stringArrayToObject(char **value, size_t length)
{
   VALUE obj = Qnil;
   if(value != NULL)
   {
      obj = rb_ary_new2(length);
      for(size_t i = 0; i < length; i += 1)
         rb_ary_store(obj, i, rb_str_new2(value[i]));
   }
   return obj;
}

static double *objectToDouble3(VALUE obj, double value[3])
{
   if(obj == Qnil)
      return NULL;
   else if(TYPE(obj) == T_ARRAY && RARRAY_LEN(obj) == 3)
   {
      for(int i = 0; i < 3; i += 1)
         value[i] = NUM2DBL(rb_ary_entry(obj, i));
      return value;
   }
   //SWIG_exception(SWIG_TypeError, "expected an Array with 3 doubles");
   return NULL;
}

#elif defined SWIGCSHARP

#pragma warning(disable:4702)
// all the helper code is in the typemaps because it lives in the C# world


#endif


#include "lidar/Error.h"
#include "lidar/Version.h"
#include "lidar/FileIO.h"
#include "lidar/TXTPointReader.h"
#include "lidar/TXTPointWriter.h"


SWIGINTERN VALUE
SWIG_ruby_failed(void)
{
  return Qnil;
} 


/*@SWIG:C:\swigwin-2.0.8\Lib\ruby\rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
{
  VALUE obj = args[0];
  VALUE type = TYPE(obj);
  double *res = (double *)(args[1]);
  *res = NUM2DBL(obj);
  return obj;
}
/*@SWIG@*/

SWIGINTERN int
SWIG_AsVal_double (VALUE obj, double *val)
{
  VALUE type = TYPE(obj);
  if ((type == T_FLOAT) || (type == T_FIXNUM) || (type == T_BIGNUM)) {
    double v;
    VALUE a[2];
    a[0] = obj;
    a[1] = (VALUE)(&v);
    if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2DBL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
      if (val) *val = v;
      return SWIG_OK;
    }
  }
  return SWIG_TypeError;
}


  #define SWIG_From_double   rb_float_new 


SWIGINTERNINLINE VALUE
SWIG_From_bool  (bool value)
{
  return value ? Qtrue : Qfalse;
}


#include <limits.h>
#if !defined(SWIG_NO_LLONG_MAX)
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
#   define LLONG_MAX __LONG_LONG_MAX__
#   define LLONG_MIN (-LLONG_MAX - 1LL)
#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
# endif
#endif


  #define SWIG_From_long   LONG2NUM 


SWIGINTERNINLINE VALUE
SWIG_From_int  (int value)
{    
  return SWIG_From_long  (value);
}


/*@SWIG:C:\swigwin-2.0.8\Lib\ruby\rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
{
  VALUE obj = args[0];
  VALUE type = TYPE(obj);
  long *res = (long *)(args[1]);
  *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
  return obj;
}
/*@SWIG@*/

SWIGINTERN int
SWIG_AsVal_long (VALUE obj, long* val)
{
  VALUE type = TYPE(obj);
  if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
    long v;
    VALUE a[2];
    a[0] = obj;
    a[1] = (VALUE)(&v);
    if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
      if (val) *val = v;
      return SWIG_OK;
    }
  }
  return SWIG_TypeError;
}


SWIGINTERN int
SWIG_AsVal_int (VALUE obj, int *val)
{
  long v;
  int res = SWIG_AsVal_long (obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v < INT_MIN || v > INT_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = static_cast< int >(v);
    }
  }  
  return res;
}


SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)
{
  static int init = 0;
  static swig_type_info* info = 0;
  if (!init) {
    info = SWIG_TypeQuery("_p_char");
    init = 1;
  }
  return info;
}


SWIGINTERNINLINE VALUE 
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
{
  if (carray) {
    if (size > LONG_MAX) {
      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
      return pchar_descriptor ? 
	SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : Qnil;
    } else {
      return rb_str_new(carray, static_cast< long >(size));
    }
  } else {
    return Qnil;
  }
}


SWIGINTERNINLINE VALUE 
SWIG_FromCharPtr(const char *cptr)
{ 
  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
}


SWIGINTERN int
SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
{
  if (TYPE(obj) == T_STRING) {
    #if defined(StringValuePtr)
    char *cstr = StringValuePtr(obj); 
    #else
    char *cstr = STR2CSTR(obj);
    #endif
    size_t size = RSTRING_LEN(obj) + 1;
    if (cptr)  {
      if (alloc) {
	if (*alloc == SWIG_NEWOBJ) {
	  *cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size)));
	} else {
	  *cptr = cstr;
	  *alloc = SWIG_OLDOBJ;
	}
      }
    }
    if (psize) *psize = size;
    return SWIG_OK;
  } else {
    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    if (pchar_descriptor) {
      void* vptr = 0;
      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
	if (cptr) *cptr = (char *)vptr;
	if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0;
	if (alloc) *alloc = SWIG_OLDOBJ;
	return SWIG_OK;
      }
    }
  }  
  return SWIG_TypeError;
}





SWIGINTERNINLINE VALUE
SWIG_From_unsigned_SS_long  (unsigned long value)
{
  return ULONG2NUM(value); 
}


SWIGINTERNINLINE VALUE
SWIG_From_size_t  (size_t value)
{    
  return SWIG_From_unsigned_SS_long  (static_cast< unsigned long >(value));
}


/*@SWIG:C:\swigwin-2.0.8\Lib\ruby\rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
{
  VALUE obj = args[0];
  VALUE type = TYPE(obj);
  unsigned long *res = (unsigned long *)(args[1]);
  *res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj);
  return obj;
}
/*@SWIG@*/

SWIGINTERN int
SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val) 
{
  VALUE type = TYPE(obj);
  if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
    unsigned long v;
    VALUE a[2];
    a[0] = obj;
    a[1] = (VALUE)(&v);
    if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
      if (val) *val = v;
      return SWIG_OK;
    }
  }
  return SWIG_TypeError;
}


SWIGINTERNINLINE int
SWIG_AsVal_size_t (VALUE obj, size_t *val)
{
  unsigned long v;
  int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
  if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
  return res;
}


SWIGINTERN int
SWIG_AsVal_bool (VALUE obj, bool *val)
{
  if (obj == Qtrue) {
    if (val) *val = true;
    return SWIG_OK;
  } else if (obj == Qfalse) {
    if (val) *val = false;
    return SWIG_OK;
  } else {
    int res = 0;
    if (SWIG_AsVal_int (obj, &res) == SWIG_OK) {    
      if (val) *val = res ? true : false;
      return SWIG_OK;
    }
  }  
  return SWIG_TypeError;
}

SWIGINTERN double LizardTech_ChannelData_getValue(LizardTech::ChannelData *self,size_t i){
      const void *values = self->getData();

      switch(self->getDataType())
      {



          case LizardTech::DATATYPE_UINT8:        return static_cast<double>(static_cast<const lt_uint8 *>(values)[i]);
          case LizardTech::DATATYPE_SINT8:        return static_cast<double>(static_cast<const lt_int8 *>(values)[i]);
          case LizardTech::DATATYPE_UINT16:        return static_cast<double>(static_cast<const lt_uint16 *>(values)[i]);
          case LizardTech::DATATYPE_SINT16:        return static_cast<double>(static_cast<const lt_int16 *>(values)[i]);
          case LizardTech::DATATYPE_UINT32:        return static_cast<double>(static_cast<const lt_uint32 *>(values)[i]);
          case LizardTech::DATATYPE_SINT32:        return static_cast<double>(static_cast<const lt_int32 *>(values)[i]);
          case LizardTech::DATATYPE_UINT64:        return static_cast<double>(static_cast<const lt_uint64 *>(values)[i]);
          case LizardTech::DATATYPE_SINT64:        return static_cast<double>(static_cast<const lt_int64 *>(values)[i]);
          case LizardTech::DATATYPE_FLOAT32:        return static_cast<double>(static_cast<const float *>(values)[i]);
          case LizardTech::DATATYPE_FLOAT64:        return static_cast<double>(static_cast<const double *>(values)[i]);

      default:
         return 0;
      }
   }

/*@SWIG:C:\swigwin-2.0.8\Lib\ruby\rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE *args)
{
  VALUE obj = args[0];
  VALUE type = TYPE(obj);
  long long *res = (long long *)(args[1]);
  *res = type == T_FIXNUM ? NUM2LL(obj) : rb_big2ll(obj);
  return obj;
}
/*@SWIG@*/

SWIGINTERN int
SWIG_AsVal_long_SS_long (VALUE obj, long long *val)
{
  VALUE type = TYPE(obj);
  if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
    long long v;
    VALUE a[2];
    a[0] = obj;
    a[1] = (VALUE)(&v);
    if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
      if (val) *val = v;
      return SWIG_OK;
    }
  }
  return SWIG_TypeError;
}


SWIGINTERNINLINE VALUE 
SWIG_From_long_SS_long  (long long value)
{
  return LL2NUM(value);
}

SWIGINTERN LizardTech::FileIO *new_LizardTech_FileIO(){
         //::fprintf(stderr, "in " #FileIO "\n");
         return LizardTech::FileIO::create();
      }
SWIGINTERN LizardTech::TXTPointReader *new_LizardTech_TXTPointReader(){
         //::fprintf(stderr, "in " #TXTPointReader "\n");
         return LizardTech::TXTPointReader::create();
      }
SWIGINTERN LizardTech::TXTPointWriter *new_LizardTech_TXTPointWriter(){
         //::fprintf(stderr, "in " #TXTPointWriter "\n");
         return LizardTech::TXTPointWriter::create();
      }

#include "lidar/MG4PointReader.h"

SWIGINTERN LizardTech::MG4PointReader *new_LizardTech_MG4PointReader(){
         //::fprintf(stderr, "in " #MG4PointReader "\n");
         return LizardTech::MG4PointReader::create();
      }
/* ---------------------------------------------------
 * C++ director class helpers
 * --------------------------------------------------- */



/* ---------------------------------------------------
 * C++ director class methods
 * --------------------------------------------------- */

#include "LidarDSDK.h"

SwigDirector_ProgressDelegate::SwigDirector_ProgressDelegate(VALUE self): LizardTech::ProgressDelegate(), Swig::Director(self) {
  
}



SwigDirector_ProgressDelegate::~SwigDirector_ProgressDelegate() {
}

void SwigDirector_ProgressDelegate::reportProgress(double progress, char const *message) {
  VALUE obj0 = Qnil ;
  VALUE obj1 = Qnil ;
  VALUE result;
  
  obj0 = SWIG_From_double(static_cast< double >(progress));
  obj1 = SWIG_FromCharPtr((const char *)message);
  result = rb_funcall(swig_get_self(), rb_intern("reportProgress"), 2,obj0,obj1);
}


bool SwigDirector_ProgressDelegate::getCancelled() {
  bool c_result ;
  VALUE result;
  
  result = rb_funcall(swig_get_self(), rb_intern("getCancelled"), 0, NULL);
  bool swig_val;
  int swig_res = SWIG_AsVal_bool(result, &swig_val);
  if (!SWIG_IsOK(swig_res)) {
    Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'");
  }
  c_result = static_cast< bool >(swig_val);
  return (bool) c_result;
}


void SwigDirector_ProgressDelegate::displayWarning(char const *message) {
  VALUE obj0 = Qnil ;
  VALUE result;
  
  obj0 = SWIG_FromCharPtr((const char *)message);
  result = rb_funcall(swig_get_self(), rb_intern("displayWarning"), 1,obj0);
}


static swig_class SwigClassRange;

SWIGINTERN VALUE
_wrap_Range_min_set(int argc, VALUE *argv, VALUE self) {
  LizardTech::Range *arg1 = (LizardTech::Range *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Range *","min", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Range * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","min", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->min = arg2;
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Range_min_get(int argc, VALUE *argv, VALUE self) {
  LizardTech::Range *arg1 = (LizardTech::Range *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Range *","min", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Range * >(argp1);
  result = (double) ((arg1)->min);
  vresult = SWIG_From_double(static_cast< double >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Range_max_set(int argc, VALUE *argv, VALUE self) {
  LizardTech::Range *arg1 = (LizardTech::Range *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Range *","max", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Range * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","max", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->max = arg2;
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Range_max_get(int argc, VALUE *argv, VALUE self) {
  LizardTech::Range *arg1 = (LizardTech::Range *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Range *","max", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Range * >(argp1);
  result = (double) ((arg1)->max);
  vresult = SWIG_From_double(static_cast< double >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_new_Range__SWIG_0(int argc, VALUE *argv, VALUE self) {
  double arg1 ;
  double arg2 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  const char *classname SWIGUNUSED = "LidarDSDK::Range";
  LizardTech::Range *result = 0 ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  ecode1 = SWIG_AsVal_double(argv[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","LizardTech::Range", 1, argv[0] ));
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(argv[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","LizardTech::Range", 2, argv[1] ));
  } 
  arg2 = static_cast< double >(val2);
  {
    try
    {
      result = (LizardTech::Range *)new LizardTech::Range(arg1,arg2);
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_new_Range__SWIG_1(int argc, VALUE *argv, VALUE self) {
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  const char *classname SWIGUNUSED = "LidarDSDK::Range";
  LizardTech::Range *result = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  ecode1 = SWIG_AsVal_double(argv[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","LizardTech::Range", 1, argv[0] ));
  } 
  arg1 = static_cast< double >(val1);
  {
    try
    {
      result = (LizardTech::Range *)new LizardTech::Range(arg1);
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
_wrap_Range_allocate(VALUE self) {
#else
  SWIGINTERN VALUE
  _wrap_Range_allocate(int argc, VALUE *argv, VALUE self) {
#endif
    
    
    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LizardTech__Range);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
    rb_obj_call_init(vresult, argc, argv);
#endif
    return vresult;
  }
  

SWIGINTERN VALUE
_wrap_new_Range__SWIG_2(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "LidarDSDK::Range";
  LizardTech::Range *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (LizardTech::Range *)new LizardTech::Range();
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN VALUE _wrap_new_Range(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[2];
  int ii;
  
  argc = nargs;
  if (argc > 2) SWIG_fail;
  for (ii = 0; (ii < argc); ++ii) {
    argv[ii] = args[ii];
  }
  if (argc == 0) {
    return _wrap_new_Range__SWIG_2(nargs, args, self);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_Range__SWIG_1(nargs, args, self);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_Range__SWIG_0(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 2, "Range.new", 
    "    Range.new(double amin, double amax)\n"
    "    Range.new(double amin)\n"
    "    Range.new()\n");
  
  return Qnil;
}



/*
  Document-method: LidarDSDK::Range.==

  call-seq:
    ==(r) -> bool

Equality comparison operator.
*/
SWIGINTERN VALUE
_wrap_Range___eq__(int argc, VALUE *argv, VALUE self) {
  LizardTech::Range *arg1 = (LizardTech::Range *) 0 ;
  LizardTech::Range *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Range const *","operator ==", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Range * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__Range,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Range const &","operator ==", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Range const &","operator ==", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::Range * >(argp2);
  {
    try
    {
      result = (bool)((LizardTech::Range const *)arg1)->operator ==((LizardTech::Range const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Range_contains(int argc, VALUE *argv, VALUE self) {
  LizardTech::Range *arg1 = (LizardTech::Range *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Range const *","contains", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Range * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","contains", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  {
    try
    {
      result = (bool)((LizardTech::Range const *)arg1)->contains(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Range_overlaps(int argc, VALUE *argv, VALUE self) {
  LizardTech::Range *arg1 = (LizardTech::Range *) 0 ;
  LizardTech::Range *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Range const *","overlaps", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Range * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__Range,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Range const &","overlaps", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Range const &","overlaps", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::Range * >(argp2);
  {
    try
    {
      result = (bool)((LizardTech::Range const *)arg1)->overlaps((LizardTech::Range const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}



/*
  Document-method: LidarDSDK::Range.empty

  call-seq:
    empty -> bool

Check if Range is empty.
*/
SWIGINTERN VALUE
_wrap_Range_empty(int argc, VALUE *argv, VALUE self) {
  LizardTech::Range *arg1 = (LizardTech::Range *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Range const *","empty", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Range * >(argp1);
  {
    try
    {
      result = (bool)((LizardTech::Range const *)arg1)->empty();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Range_length(int argc, VALUE *argv, VALUE self) {
  LizardTech::Range *arg1 = (LizardTech::Range *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Range const *","length", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Range * >(argp1);
  {
    try
    {
      result = (double)((LizardTech::Range const *)arg1)->length();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_double(static_cast< double >(result));
  return vresult;
fail:
  return Qnil;
}



/*
  Document-method: LidarDSDK::Range.shift

  call-seq:
    shift(v)

Remove and return element at the beginning of the Range.
*/
SWIGINTERN VALUE
_wrap_Range_shift(int argc, VALUE *argv, VALUE self) {
  LizardTech::Range *arg1 = (LizardTech::Range *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Range *","shift", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Range * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","shift", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  {
    try
    {
      (arg1)->shift(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Range_scale(int argc, VALUE *argv, VALUE self) {
  LizardTech::Range *arg1 = (LizardTech::Range *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Range *","scale", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Range * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","scale", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  {
    try
    {
      (arg1)->scale(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Range_clip(int argc, VALUE *argv, VALUE self) {
  LizardTech::Range *arg1 = (LizardTech::Range *) 0 ;
  LizardTech::Range *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Range *","clip", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Range * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__Range,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Range const &","clip", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Range const &","clip", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::Range * >(argp2);
  {
    try
    {
      (arg1)->clip((LizardTech::Range const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Range_grow__SWIG_0(int argc, VALUE *argv, VALUE self) {
  LizardTech::Range *arg1 = (LizardTech::Range *) 0 ;
  LizardTech::Range *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Range *","grow", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Range * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__Range,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Range const &","grow", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Range const &","grow", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::Range * >(argp2);
  {
    try
    {
      (arg1)->grow((LizardTech::Range const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Range_grow__SWIG_1(int argc, VALUE *argv, VALUE self) {
  LizardTech::Range *arg1 = (LizardTech::Range *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Range *","grow", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Range * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","grow", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  {
    try
    {
      (arg1)->grow(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE _wrap_Range_grow(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[3];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 3) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__Range, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__Range, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Range_grow__SWIG_0(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__Range, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Range_grow__SWIG_1(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 3, "Range.grow", 
    "    void Range.grow(LizardTech::Range const &r)\n"
    "    void Range.grow(double v)\n");
  
  return Qnil;
}


SWIGINTERN void
free_LizardTech_Range(LizardTech::Range *arg1) {
    delete arg1;
}

static swig_class SwigClassBounds;

SWIGINTERN VALUE
_wrap_Bounds_x_set(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  LizardTech::Range *arg2 = (LizardTech::Range *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds *","x", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Range *","x", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< LizardTech::Range * >(argp2);
  if (arg1) (arg1)->x = *arg2;
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Bounds_x_get(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  LizardTech::Range *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds *","x", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  result = (LizardTech::Range *)& ((arg1)->x);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Bounds_y_set(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  LizardTech::Range *arg2 = (LizardTech::Range *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds *","y", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Range *","y", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< LizardTech::Range * >(argp2);
  if (arg1) (arg1)->y = *arg2;
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Bounds_y_get(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  LizardTech::Range *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds *","y", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  result = (LizardTech::Range *)& ((arg1)->y);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Bounds_z_set(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  LizardTech::Range *arg2 = (LizardTech::Range *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds *","z", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Range *","z", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< LizardTech::Range * >(argp2);
  if (arg1) (arg1)->z = *arg2;
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Bounds_z_get(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  LizardTech::Range *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds *","z", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  result = (LizardTech::Range *)& ((arg1)->z);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__Range, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Bounds_Huge(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (LizardTech::Bounds *) &LizardTech::Bounds::Huge();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_new_Bounds__SWIG_0(int argc, VALUE *argv, VALUE self) {
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  const char *classname SWIGUNUSED = "LidarDSDK::Bounds";
  LizardTech::Bounds *result = 0 ;
  
  if ((argc < 6) || (argc > 6)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
  }
  ecode1 = SWIG_AsVal_double(argv[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 1, argv[0] ));
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(argv[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 2, argv[1] ));
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(argv[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 3, argv[2] ));
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(argv[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 4, argv[3] ));
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(argv[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 5, argv[4] ));
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(argv[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 6, argv[5] ));
  } 
  arg6 = static_cast< double >(val6);
  {
    try
    {
      result = (LizardTech::Bounds *)new LizardTech::Bounds(arg1,arg2,arg3,arg4,arg5,arg6);
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_new_Bounds__SWIG_1(int argc, VALUE *argv, VALUE self) {
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  const char *classname SWIGUNUSED = "LidarDSDK::Bounds";
  LizardTech::Bounds *result = 0 ;
  
  if ((argc < 5) || (argc > 5)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
  }
  ecode1 = SWIG_AsVal_double(argv[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 1, argv[0] ));
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(argv[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 2, argv[1] ));
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(argv[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 3, argv[2] ));
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(argv[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 4, argv[3] ));
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(argv[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 5, argv[4] ));
  } 
  arg5 = static_cast< double >(val5);
  {
    try
    {
      result = (LizardTech::Bounds *)new LizardTech::Bounds(arg1,arg2,arg3,arg4,arg5);
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_new_Bounds__SWIG_2(int argc, VALUE *argv, VALUE self) {
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  const char *classname SWIGUNUSED = "LidarDSDK::Bounds";
  LizardTech::Bounds *result = 0 ;
  
  if ((argc < 4) || (argc > 4)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
  }
  ecode1 = SWIG_AsVal_double(argv[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 1, argv[0] ));
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(argv[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 2, argv[1] ));
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(argv[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 3, argv[2] ));
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(argv[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 4, argv[3] ));
  } 
  arg4 = static_cast< double >(val4);
  {
    try
    {
      result = (LizardTech::Bounds *)new LizardTech::Bounds(arg1,arg2,arg3,arg4);
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_new_Bounds__SWIG_3(int argc, VALUE *argv, VALUE self) {
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  const char *classname SWIGUNUSED = "LidarDSDK::Bounds";
  LizardTech::Bounds *result = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  ecode1 = SWIG_AsVal_double(argv[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 1, argv[0] ));
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(argv[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 2, argv[1] ));
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(argv[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 3, argv[2] ));
  } 
  arg3 = static_cast< double >(val3);
  {
    try
    {
      result = (LizardTech::Bounds *)new LizardTech::Bounds(arg1,arg2,arg3);
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_new_Bounds__SWIG_4(int argc, VALUE *argv, VALUE self) {
  double arg1 ;
  double arg2 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  const char *classname SWIGUNUSED = "LidarDSDK::Bounds";
  LizardTech::Bounds *result = 0 ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  ecode1 = SWIG_AsVal_double(argv[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 1, argv[0] ));
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(argv[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 2, argv[1] ));
  } 
  arg2 = static_cast< double >(val2);
  {
    try
    {
      result = (LizardTech::Bounds *)new LizardTech::Bounds(arg1,arg2);
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_new_Bounds__SWIG_5(int argc, VALUE *argv, VALUE self) {
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  const char *classname SWIGUNUSED = "LidarDSDK::Bounds";
  LizardTech::Bounds *result = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  ecode1 = SWIG_AsVal_double(argv[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","LizardTech::Bounds", 1, argv[0] ));
  } 
  arg1 = static_cast< double >(val1);
  {
    try
    {
      result = (LizardTech::Bounds *)new LizardTech::Bounds(arg1);
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_new_Bounds__SWIG_6(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "LidarDSDK::Bounds";
  LizardTech::Bounds *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (LizardTech::Bounds *)new LizardTech::Bounds();
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
_wrap_Bounds_allocate(VALUE self) {
#else
  SWIGINTERN VALUE
  _wrap_Bounds_allocate(int argc, VALUE *argv, VALUE self) {
#endif
    
    
    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LizardTech__Bounds);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
    rb_obj_call_init(vresult, argc, argv);
#endif
    return vresult;
  }
  

SWIGINTERN VALUE
_wrap_new_Bounds__SWIG_7(int argc, VALUE *argv, VALUE self) {
  LizardTech::Range *arg1 = 0 ;
  LizardTech::Range *arg2 = 0 ;
  LizardTech::Range *arg3 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  const char *classname SWIGUNUSED = "LidarDSDK::Bounds";
  LizardTech::Bounds *result = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_LizardTech__Range,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Range const &","LizardTech::Bounds", 1, argv[0] )); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Range const &","LizardTech::Bounds", 1, argv[0])); 
  }
  arg1 = reinterpret_cast< LizardTech::Range * >(argp1);
  res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_LizardTech__Range,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Range const &","LizardTech::Bounds", 2, argv[1] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Range const &","LizardTech::Bounds", 2, argv[1])); 
  }
  arg2 = reinterpret_cast< LizardTech::Range * >(argp2);
  res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_LizardTech__Range,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "LizardTech::Range const &","LizardTech::Bounds", 3, argv[2] )); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Range const &","LizardTech::Bounds", 3, argv[2])); 
  }
  arg3 = reinterpret_cast< LizardTech::Range * >(argp3);
  {
    try
    {
      result = (LizardTech::Bounds *)new LizardTech::Bounds((LizardTech::Range const &)*arg1,(LizardTech::Range const &)*arg2,(LizardTech::Range const &)*arg3);
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN VALUE _wrap_new_Bounds(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[6];
  int ii;
  
  argc = nargs;
  if (argc > 6) SWIG_fail;
  for (ii = 0; (ii < argc); ++ii) {
    argv[ii] = args[ii];
  }
  if (argc == 0) {
    return _wrap_new_Bounds__SWIG_6(nargs, args, self);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_Bounds__SWIG_5(nargs, args, self);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_Bounds__SWIG_4(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__Range, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__Range, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_LizardTech__Range, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_new_Bounds__SWIG_7(nargs, args, self);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_Bounds__SWIG_3(nargs, args, self);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_new_Bounds__SWIG_2(nargs, args, self);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_new_Bounds__SWIG_1(nargs, args, self);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_new_Bounds__SWIG_0(nargs, args, self);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 6, "Bounds.new", 
    "    Bounds.new(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)\n"
    "    Bounds.new(double xmin, double xmax, double ymin, double ymax, double zmin)\n"
    "    Bounds.new(double xmin, double xmax, double ymin, double ymax)\n"
    "    Bounds.new(double xmin, double xmax, double ymin)\n"
    "    Bounds.new(double xmin, double xmax)\n"
    "    Bounds.new(double xmin)\n"
    "    Bounds.new()\n"
    "    Bounds.new(LizardTech::Range const &ax, LizardTech::Range const &ay, LizardTech::Range const &az)\n");
  
  return Qnil;
}



/*
  Document-method: LidarDSDK::Bounds.==

  call-seq:
    ==(b) -> bool

Equality comparison operator.
*/
SWIGINTERN VALUE
_wrap_Bounds___eq__(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  LizardTech::Bounds *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds const *","operator ==", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__Bounds,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Bounds const &","operator ==", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Bounds const &","operator ==", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::Bounds * >(argp2);
  {
    try
    {
      result = (bool)((LizardTech::Bounds const *)arg1)->operator ==((LizardTech::Bounds const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Bounds_contains(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds const *","contains", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","contains", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","contains", 3, argv[1] ));
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","contains", 4, argv[2] ));
  } 
  arg4 = static_cast< double >(val4);
  {
    try
    {
      result = (bool)((LizardTech::Bounds const *)arg1)->contains(arg2,arg3,arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Bounds_overlaps(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  LizardTech::Bounds *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds const *","overlaps", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__Bounds,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Bounds const &","overlaps", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Bounds const &","overlaps", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::Bounds * >(argp2);
  {
    try
    {
      result = (bool)((LizardTech::Bounds const *)arg1)->overlaps((LizardTech::Bounds const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}



/*
  Document-method: LidarDSDK::Bounds.empty

  call-seq:
    empty -> bool

Check if Bounds is empty.
*/
SWIGINTERN VALUE
_wrap_Bounds_empty(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds const *","empty", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  {
    try
    {
      result = (bool)((LizardTech::Bounds const *)arg1)->empty();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Bounds_volume(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds const *","volume", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  {
    try
    {
      result = (double)((LizardTech::Bounds const *)arg1)->volume();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_double(static_cast< double >(result));
  return vresult;
fail:
  return Qnil;
}



/*
  Document-method: LidarDSDK::Bounds.shift

  call-seq:
    shift(dx, dy, dz)

Remove and return element at the beginning of the Bounds.
*/
SWIGINTERN VALUE
_wrap_Bounds_shift(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds *","shift", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","shift", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","shift", 3, argv[1] ));
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","shift", 4, argv[2] ));
  } 
  arg4 = static_cast< double >(val4);
  {
    try
    {
      (arg1)->shift(arg2,arg3,arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Bounds_scale(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds *","scale", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","scale", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","scale", 3, argv[1] ));
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","scale", 4, argv[2] ));
  } 
  arg4 = static_cast< double >(val4);
  {
    try
    {
      (arg1)->scale(arg2,arg3,arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Bounds_clip(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  LizardTech::Bounds *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds *","clip", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__Bounds,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Bounds const &","clip", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Bounds const &","clip", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::Bounds * >(argp2);
  {
    try
    {
      (arg1)->clip((LizardTech::Bounds const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Bounds_grow__SWIG_0(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  LizardTech::Bounds *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds *","grow", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__Bounds,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Bounds const &","grow", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Bounds const &","grow", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::Bounds * >(argp2);
  {
    try
    {
      (arg1)->grow((LizardTech::Bounds const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Bounds_grow__SWIG_1(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = (LizardTech::Bounds *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds *","grow", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","grow", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","grow", 3, argv[1] ));
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","grow", 4, argv[2] ));
  } 
  arg4 = static_cast< double >(val4);
  {
    try
    {
      (arg1)->grow(arg2,arg3,arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE _wrap_Bounds_grow(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[5];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 5) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__Bounds, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__Bounds, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Bounds_grow__SWIG_0(nargs, args, self);
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__Bounds, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_Bounds_grow__SWIG_1(nargs, args, self);
          }
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 5, "Bounds.grow", 
    "    void Bounds.grow(LizardTech::Bounds const &r)\n"
    "    void Bounds.grow(double ax, double ay, double az)\n");
  
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Bounds_overlapFraction(int argc, VALUE *argv, VALUE self) {
  LizardTech::Bounds *arg1 = 0 ;
  LizardTech::Bounds *arg2 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  double result;
  VALUE vresult = Qnil;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_LizardTech__Bounds,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Bounds const &","LizardTech::Bounds::overlapFraction", 1, argv[0] )); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Bounds const &","LizardTech::Bounds::overlapFraction", 1, argv[0])); 
  }
  arg1 = reinterpret_cast< LizardTech::Bounds * >(argp1);
  res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_LizardTech__Bounds,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Bounds const &","LizardTech::Bounds::overlapFraction", 2, argv[1] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Bounds const &","LizardTech::Bounds::overlapFraction", 2, argv[1])); 
  }
  arg2 = reinterpret_cast< LizardTech::Bounds * >(argp2);
  {
    try
    {
      result = (double)LizardTech::Bounds::overlapFraction((LizardTech::Bounds const &)*arg1,(LizardTech::Bounds const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_double(static_cast< double >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN void
free_LizardTech_Bounds(LizardTech::Bounds *arg1) {
    delete arg1;
}

static swig_class SwigClassDataTypeUtils;

SWIGINTERN VALUE
_wrap_DataTypeUtils_isSigned(int argc, VALUE *argv, VALUE self) {
  LizardTech::DataType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  ecode1 = SWIG_AsVal_int(argv[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "LizardTech::DataType","LizardTech::DataTypeUtils::isSigned", 1, argv[0] ));
  } 
  arg1 = static_cast< LizardTech::DataType >(val1);
  {
    try
    {
      result = (bool)LizardTech::DataTypeUtils::isSigned(arg1);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_DataTypeUtils_isFloat(int argc, VALUE *argv, VALUE self) {
  LizardTech::DataType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  ecode1 = SWIG_AsVal_int(argv[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "LizardTech::DataType","LizardTech::DataTypeUtils::isFloat", 1, argv[0] ));
  } 
  arg1 = static_cast< LizardTech::DataType >(val1);
  {
    try
    {
      result = (bool)LizardTech::DataTypeUtils::isFloat(arg1);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_DataTypeUtils_byteWidth(int argc, VALUE *argv, VALUE self) {
  LizardTech::DataType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  int result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  ecode1 = SWIG_AsVal_int(argv[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "LizardTech::DataType","LizardTech::DataTypeUtils::byteWidth", 1, argv[0] ));
  } 
  arg1 = static_cast< LizardTech::DataType >(val1);
  {
    try
    {
      result = (int)LizardTech::DataTypeUtils::byteWidth(arg1);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_int(static_cast< int >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_DataTypeUtils_toString(int argc, VALUE *argv, VALUE self) {
  LizardTech::DataType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  ecode1 = SWIG_AsVal_int(argv[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "LizardTech::DataType","LizardTech::DataTypeUtils::toString", 1, argv[0] ));
  } 
  arg1 = static_cast< LizardTech::DataType >(val1);
  {
    try
    {
      result = (char *)LizardTech::DataTypeUtils::toString(arg1);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_FromCharPtr((const char *)result);
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_DataTypeUtils_toDataType(int argc, VALUE *argv, VALUE self) {
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  LizardTech::DataType result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","LizardTech::DataTypeUtils::toDataType", 1, argv[0] ));
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    try
    {
      result = (LizardTech::DataType)LizardTech::DataTypeUtils::toDataType((char const *)arg1);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_int(static_cast< int >(result));
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return vresult;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return Qnil;
}


#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
_wrap_DataTypeUtils_allocate(VALUE self) {
#else
  SWIGINTERN VALUE
  _wrap_DataTypeUtils_allocate(int argc, VALUE *argv, VALUE self) {
#endif
    
    
    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LizardTech__DataTypeUtils);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
    rb_obj_call_init(vresult, argc, argv);
#endif
    return vresult;
  }
  

SWIGINTERN VALUE
_wrap_new_DataTypeUtils(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "LidarDSDK::DataTypeUtils";
  LizardTech::DataTypeUtils *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (LizardTech::DataTypeUtils *)new LizardTech::DataTypeUtils();
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN void
free_LizardTech_DataTypeUtils(LizardTech::DataTypeUtils *arg1) {
    delete arg1;
}

static swig_class SwigClassChannelInfo;

SWIGINTERN void
free_LizardTech_ChannelInfo(LizardTech::ChannelInfo *arg1) {
    delete arg1;
}

#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
_wrap_ChannelInfo_allocate(VALUE self) {
#else
  SWIGINTERN VALUE
  _wrap_ChannelInfo_allocate(int argc, VALUE *argv, VALUE self) {
#endif
    
    
    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LizardTech__ChannelInfo);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
    rb_obj_call_init(vresult, argc, argv);
#endif
    return vresult;
  }
  

SWIGINTERN VALUE
_wrap_new_ChannelInfo(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "LidarDSDK::ChannelInfo";
  LizardTech::ChannelInfo *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (LizardTech::ChannelInfo *)new LizardTech::ChannelInfo();
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelInfo_init__SWIG_0(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelInfo *arg1 = (LizardTech::ChannelInfo *) 0 ;
  char *arg2 = (char *) 0 ;
  LizardTech::DataType arg3 ;
  int arg4 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  
  if ((argc < 4) || (argc > 4)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ChannelInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelInfo *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelInfo * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","init", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "LizardTech::DataType","init", 3, argv[1] ));
  } 
  arg3 = static_cast< LizardTech::DataType >(val3);
  ecode4 = SWIG_AsVal_int(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","init", 4, argv[2] ));
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_double(argv[3], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","init", 5, argv[3] ));
  } 
  arg5 = static_cast< double >(val5);
  {
    try
    {
      (arg1)->init((char const *)arg2,arg3,arg4,arg5);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelInfo_init__SWIG_1(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelInfo *arg1 = (LizardTech::ChannelInfo *) 0 ;
  char *arg2 = (char *) 0 ;
  LizardTech::DataType arg3 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ChannelInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelInfo *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelInfo * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","init", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "LizardTech::DataType","init", 3, argv[1] ));
  } 
  arg3 = static_cast< LizardTech::DataType >(val3);
  ecode4 = SWIG_AsVal_int(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","init", 4, argv[2] ));
  } 
  arg4 = static_cast< int >(val4);
  {
    try
    {
      (arg1)->init((char const *)arg2,arg3,arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelInfo_init__SWIG_2(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelInfo *arg1 = (LizardTech::ChannelInfo *) 0 ;
  LizardTech::ChannelInfo *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ChannelInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelInfo *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelInfo * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__ChannelInfo,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::ChannelInfo const &","init", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::ChannelInfo const &","init", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::ChannelInfo * >(argp2);
  {
    try
    {
      (arg1)->init((LizardTech::ChannelInfo const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE _wrap_ChannelInfo_init(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[6];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 6) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__ChannelInfo, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__ChannelInfo, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_ChannelInfo_init__SWIG_2(nargs, args, self);
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__ChannelInfo, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_ChannelInfo_init__SWIG_1(nargs, args, self);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__ChannelInfo, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_ChannelInfo_init__SWIG_0(nargs, args, self);
            }
          }
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 6, "ChannelInfo.init", 
    "    void ChannelInfo.init(char const *name, LizardTech::DataType datatype, int bits, double quantization)\n"
    "    void ChannelInfo.init(char const *name, LizardTech::DataType datatype, int bits)\n"
    "    void ChannelInfo.init(LizardTech::ChannelInfo const &info)\n");
  
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelInfo_getName(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelInfo *arg1 = (LizardTech::ChannelInfo *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ChannelInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelInfo const *","getName", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelInfo * >(argp1);
  {
    try
    {
      result = (char *)((LizardTech::ChannelInfo const *)arg1)->getName();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_FromCharPtr((const char *)result);
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelInfo_getDataType(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelInfo *arg1 = (LizardTech::ChannelInfo *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  LizardTech::DataType result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ChannelInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelInfo const *","getDataType", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelInfo * >(argp1);
  {
    try
    {
      result = (LizardTech::DataType)((LizardTech::ChannelInfo const *)arg1)->getDataType();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_int(static_cast< int >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelInfo_getBits(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelInfo *arg1 = (LizardTech::ChannelInfo *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ChannelInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelInfo const *","getBits", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelInfo * >(argp1);
  {
    try
    {
      result = ((LizardTech::ChannelInfo const *)arg1)->getBits();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelInfo_getQuantization(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelInfo *arg1 = (LizardTech::ChannelInfo *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ChannelInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelInfo const *","getQuantization", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelInfo * >(argp1);
  {
    try
    {
      result = (double)((LizardTech::ChannelInfo const *)arg1)->getQuantization();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_double(static_cast< double >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelInfo_setQuantization(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelInfo *arg1 = (LizardTech::ChannelInfo *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ChannelInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelInfo *","setQuantization", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelInfo * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","setQuantization", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  {
    try
    {
      (arg1)->setQuantization(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}



/*
  Document-method: LidarDSDK::ChannelInfo.==

  call-seq:
    ==(rhs) -> bool

Equality comparison operator.
*/
SWIGINTERN VALUE
_wrap_ChannelInfo___eq__(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelInfo *arg1 = (LizardTech::ChannelInfo *) 0 ;
  LizardTech::ChannelInfo *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ChannelInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelInfo const *","operator ==", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelInfo * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__ChannelInfo,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::ChannelInfo const &","operator ==", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::ChannelInfo const &","operator ==", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::ChannelInfo * >(argp2);
  {
    try
    {
      result = (bool)((LizardTech::ChannelInfo const *)arg1)->operator ==((LizardTech::ChannelInfo const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}


static swig_class SwigClassPointInfo;

SWIGINTERN void
free_LizardTech_PointInfo(LizardTech::PointInfo *arg1) {
    delete arg1;
}

#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
_wrap_PointInfo_allocate(VALUE self) {
#else
  SWIGINTERN VALUE
  _wrap_PointInfo_allocate(int argc, VALUE *argv, VALUE self) {
#endif
    
    
    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LizardTech__PointInfo);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
    rb_obj_call_init(vresult, argc, argv);
#endif
    return vresult;
  }
  

SWIGINTERN VALUE
_wrap_new_PointInfo(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "LidarDSDK::PointInfo";
  LizardTech::PointInfo *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (LizardTech::PointInfo *)new LizardTech::PointInfo();
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointInfo_init__SWIG_0(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","init", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      (arg1)->init(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointInfo_init__SWIG_1(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  LizardTech::PointInfo *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointInfo const &","init", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo const &","init", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::PointInfo * >(argp2);
  {
    try
    {
      (arg1)->init((LizardTech::PointInfo const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointInfo_init__SWIG_2(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  LizardTech::PointData *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__PointData,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointData const &","init", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointData const &","init", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::PointData * >(argp2);
  {
    try
    {
      (arg1)->init((LizardTech::PointData const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointInfo_init__SWIG_3(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  LizardTech::PointInfo *arg2 = 0 ;
  char **arg3 = (char **) 0 ;
  size_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointInfo const &","init", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo const &","init", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::PointInfo * >(argp2);
  res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_p_char, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *const *","init", 3, argv[1] )); 
  }
  arg3 = reinterpret_cast< char ** >(argp3);
  ecode4 = SWIG_AsVal_size_t(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","init", 4, argv[2] ));
  } 
  arg4 = static_cast< size_t >(val4);
  {
    try
    {
      (arg1)->init((LizardTech::PointInfo const &)*arg2,(char const *const *)arg3,arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointInfo_init__SWIG_4(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  LizardTech::PointData *arg2 = 0 ;
  char **arg3 = (char **) 0 ;
  size_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__PointData,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointData const &","init", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointData const &","init", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::PointData * >(argp2);
  res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_p_char, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *const *","init", 3, argv[1] )); 
  }
  arg3 = reinterpret_cast< char ** >(argp3);
  ecode4 = SWIG_AsVal_size_t(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","init", 4, argv[2] ));
  } 
  arg4 = static_cast< size_t >(val4);
  {
    try
    {
      (arg1)->init((LizardTech::PointData const &)*arg2,(char const *const *)arg3,arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointInfo_init__SWIG_5(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  LizardTech::PointInfo *arg2 = 0 ;
  size_t *arg3 = (size_t *) 0 ;
  size_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointInfo const &","init", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo const &","init", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::PointInfo * >(argp2);
  res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "size_t const *","init", 3, argv[1] )); 
  }
  arg3 = reinterpret_cast< size_t * >(argp3);
  ecode4 = SWIG_AsVal_size_t(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","init", 4, argv[2] ));
  } 
  arg4 = static_cast< size_t >(val4);
  {
    try
    {
      (arg1)->init((LizardTech::PointInfo const &)*arg2,(size_t const *)arg3,arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointInfo_init__SWIG_6(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  LizardTech::PointData *arg2 = 0 ;
  size_t *arg3 = (size_t *) 0 ;
  size_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__PointData,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointData const &","init", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointData const &","init", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::PointData * >(argp2);
  res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "size_t const *","init", 3, argv[1] )); 
  }
  arg3 = reinterpret_cast< size_t * >(argp3);
  ecode4 = SWIG_AsVal_size_t(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","init", 4, argv[2] ));
  } 
  arg4 = static_cast< size_t >(val4);
  {
    try
    {
      (arg1)->init((LizardTech::PointData const &)*arg2,(size_t const *)arg3,arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE _wrap_PointInfo_init(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[5];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 5) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_PointInfo_init__SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__PointData, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_PointInfo_init__SWIG_2(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_PointInfo_init__SWIG_0(nargs, args, self);
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_p_char, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_PointInfo_init__SWIG_3(nargs, args, self);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__PointData, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_p_char, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_PointInfo_init__SWIG_4(nargs, args, self);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_size_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_PointInfo_init__SWIG_5(nargs, args, self);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__PointData, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_size_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_PointInfo_init__SWIG_6(nargs, args, self);
          }
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 5, "PointInfo.init", 
    "    void PointInfo.init(size_t numChannels)\n"
    "    void PointInfo.init(LizardTech::PointInfo const &pointInfo)\n"
    "    void PointInfo.init(LizardTech::PointData const &pointData)\n"
    "    void PointInfo.init(LizardTech::PointInfo const &pointInfo, char const *const *channels, size_t numChannels)\n"
    "    void PointInfo.init(LizardTech::PointData const &pointData, char const *const *channels, size_t numChannels)\n"
    "    void PointInfo.init(LizardTech::PointInfo const &pointInfo, size_t const *channels, size_t numChannels)\n"
    "    void PointInfo.init(LizardTech::PointData const &pointData, size_t const *channels, size_t numChannels)\n");
  
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointInfo_getNumChannels(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo const *","getNumChannels", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  {
    try
    {
      result = ((LizardTech::PointInfo const *)arg1)->getNumChannels();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointInfo_getChannel__SWIG_0(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  LizardTech::ChannelInfo *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo const *","getChannel", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getChannel", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      result = (LizardTech::ChannelInfo *) &((LizardTech::PointInfo const *)arg1)->getChannel(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__ChannelInfo, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointInfo_getChannel__SWIG_1(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  LizardTech::ChannelInfo *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo *","getChannel", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getChannel", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      result = (LizardTech::ChannelInfo *) &(arg1)->getChannel(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__ChannelInfo, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointInfo_hasChannel(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo const *","hasChannel", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","hasChannel", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      result = (bool)((LizardTech::PointInfo const *)arg1)->hasChannel((char const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointInfo_getChannel__SWIG_2(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  LizardTech::ChannelInfo *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo const *","getChannel", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","getChannel", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      result = (LizardTech::ChannelInfo *)((LizardTech::PointInfo const *)arg1)->getChannel((char const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__ChannelInfo, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointInfo_getChannel__SWIG_3(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  LizardTech::ChannelInfo *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo *","getChannel", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","getChannel", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      result = (LizardTech::ChannelInfo *)(arg1)->getChannel((char const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__ChannelInfo, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE _wrap_PointInfo_getChannel(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[3];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 3) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_PointInfo_getChannel__SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_PointInfo_getChannel__SWIG_0(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_PointInfo_getChannel__SWIG_3(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_PointInfo_getChannel__SWIG_2(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 3, "PointInfo.getChannel", 
    "    LizardTech::ChannelInfo * PointInfo.getChannel(size_t idx)\n"
    "    LizardTech::ChannelInfo * PointInfo.getChannel(size_t idx)\n"
    "    LizardTech::ChannelInfo * PointInfo.getChannel(char const *name)\n"
    "    LizardTech::ChannelInfo * PointInfo.getChannel(char const *name)\n");
  
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointInfo_getChannelIndex(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  size_t result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo const *","getChannelIndex", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","getChannelIndex", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      result = ((LizardTech::PointInfo const *)arg1)->getChannelIndex((char const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointInfo_hasValidXYZ(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo const *","hasValidXYZ", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  {
    try
    {
      result = (bool)((LizardTech::PointInfo const *)arg1)->hasValidXYZ();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}



/*
  Document-method: LidarDSDK::PointInfo.==

  call-seq:
    ==(rhs) -> bool

Equality comparison operator.
*/
SWIGINTERN VALUE
_wrap_PointInfo___eq__(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointInfo *arg1 = (LizardTech::PointInfo *) 0 ;
  LizardTech::PointInfo *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointInfo const *","operator ==", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointInfo * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointInfo const &","operator ==", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo const &","operator ==", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::PointInfo * >(argp2);
  {
    try
    {
      result = (bool)((LizardTech::PointInfo const *)arg1)->operator ==((LizardTech::PointInfo const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}


static swig_class SwigClassChannelData;

SWIGINTERN void
free_LizardTech_ChannelData(LizardTech::ChannelData *arg1) {
    delete arg1;
}

#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
_wrap_ChannelData_allocate(VALUE self) {
#else
  SWIGINTERN VALUE
  _wrap_ChannelData_allocate(int argc, VALUE *argv, VALUE self) {
#endif
    
    
    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LizardTech__ChannelData);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
    rb_obj_call_init(vresult, argc, argv);
#endif
    return vresult;
  }
  

SWIGINTERN VALUE
_wrap_new_ChannelData(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "LidarDSDK::ChannelData";
  LizardTech::ChannelData *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (LizardTech::ChannelData *)new LizardTech::ChannelData();
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelData_init(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelData *arg1 = (LizardTech::ChannelData *) 0 ;
  LizardTech::ChannelInfo *arg2 = 0 ;
  size_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  size_t val3 ;
  int ecode3 = 0 ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ChannelData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelData *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelData * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__ChannelInfo,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::ChannelInfo const &","init", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::ChannelInfo const &","init", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::ChannelInfo * >(argp2);
  ecode3 = SWIG_AsVal_size_t(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","init", 3, argv[1] ));
  } 
  arg3 = static_cast< size_t >(val3);
  {
    try
    {
      (arg1)->init((LizardTech::ChannelInfo const &)*arg2,arg3);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelData_getNumSamples(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelData *arg1 = (LizardTech::ChannelData *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ChannelData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelData const *","getNumSamples", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelData * >(argp1);
  {
    try
    {
      result = ((LizardTech::ChannelData const *)arg1)->getNumSamples();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelData_copy(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelData *arg1 = 0 ;
  size_t arg2 ;
  LizardTech::ChannelData *arg3 = 0 ;
  size_t arg4 ;
  size_t arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  
  if ((argc < 5) || (argc > 5)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_LizardTech__ChannelData,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelData &","LizardTech::ChannelData::copy", 1, argv[0] )); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::ChannelData &","LizardTech::ChannelData::copy", 1, argv[0])); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelData * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","LizardTech::ChannelData::copy", 2, argv[1] ));
  } 
  arg2 = static_cast< size_t >(val2);
  res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_LizardTech__ChannelData,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "LizardTech::ChannelData const &","LizardTech::ChannelData::copy", 3, argv[2] )); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::ChannelData const &","LizardTech::ChannelData::copy", 3, argv[2])); 
  }
  arg3 = reinterpret_cast< LizardTech::ChannelData * >(argp3);
  ecode4 = SWIG_AsVal_size_t(argv[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","LizardTech::ChannelData::copy", 4, argv[3] ));
  } 
  arg4 = static_cast< size_t >(val4);
  ecode5 = SWIG_AsVal_size_t(argv[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "size_t","LizardTech::ChannelData::copy", 5, argv[4] ));
  } 
  arg5 = static_cast< size_t >(val5);
  {
    try
    {
      LizardTech::ChannelData::copy(*arg1,arg2,(LizardTech::ChannelData const &)*arg3,arg4,arg5);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelData_convert__SWIG_0(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelData *arg1 = 0 ;
  size_t arg2 ;
  LizardTech::ChannelData *arg3 = 0 ;
  size_t arg4 ;
  size_t arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  
  if ((argc < 5) || (argc > 5)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_LizardTech__ChannelData,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelData &","LizardTech::ChannelData::convert", 1, argv[0] )); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::ChannelData &","LizardTech::ChannelData::convert", 1, argv[0])); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelData * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","LizardTech::ChannelData::convert", 2, argv[1] ));
  } 
  arg2 = static_cast< size_t >(val2);
  res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_LizardTech__ChannelData,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "LizardTech::ChannelData const &","LizardTech::ChannelData::convert", 3, argv[2] )); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::ChannelData const &","LizardTech::ChannelData::convert", 3, argv[2])); 
  }
  arg3 = reinterpret_cast< LizardTech::ChannelData * >(argp3);
  ecode4 = SWIG_AsVal_size_t(argv[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","LizardTech::ChannelData::convert", 4, argv[3] ));
  } 
  arg4 = static_cast< size_t >(val4);
  ecode5 = SWIG_AsVal_size_t(argv[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "size_t","LizardTech::ChannelData::convert", 5, argv[4] ));
  } 
  arg5 = static_cast< size_t >(val5);
  {
    try
    {
      LizardTech::ChannelData::convert(*arg1,arg2,(LizardTech::ChannelData const &)*arg3,arg4,arg5);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelData_convert__SWIG_1(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelData *arg1 = 0 ;
  size_t arg2 ;
  LizardTech::ChannelData *arg3 = 0 ;
  size_t arg4 ;
  double arg5 ;
  double arg6 ;
  size_t arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  size_t val7 ;
  int ecode7 = 0 ;
  
  if ((argc < 7) || (argc > 7)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 7)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_LizardTech__ChannelData,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelData &","LizardTech::ChannelData::convert", 1, argv[0] )); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::ChannelData &","LizardTech::ChannelData::convert", 1, argv[0])); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelData * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","LizardTech::ChannelData::convert", 2, argv[1] ));
  } 
  arg2 = static_cast< size_t >(val2);
  res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_LizardTech__ChannelData,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "LizardTech::ChannelData const &","LizardTech::ChannelData::convert", 3, argv[2] )); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::ChannelData const &","LizardTech::ChannelData::convert", 3, argv[2])); 
  }
  arg3 = reinterpret_cast< LizardTech::ChannelData * >(argp3);
  ecode4 = SWIG_AsVal_size_t(argv[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","LizardTech::ChannelData::convert", 4, argv[3] ));
  } 
  arg4 = static_cast< size_t >(val4);
  ecode5 = SWIG_AsVal_double(argv[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","LizardTech::ChannelData::convert", 5, argv[4] ));
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(argv[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","LizardTech::ChannelData::convert", 6, argv[5] ));
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_size_t(argv[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "size_t","LizardTech::ChannelData::convert", 7, argv[6] ));
  } 
  arg7 = static_cast< size_t >(val7);
  {
    try
    {
      LizardTech::ChannelData::convert(*arg1,arg2,(LizardTech::ChannelData const &)*arg3,arg4,arg5,arg6,arg7);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE _wrap_ChannelData_convert(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[7];
  int ii;
  
  argc = nargs;
  if (argc > 7) SWIG_fail;
  for (ii = 0; (ii < argc); ++ii) {
    argv[ii] = args[ii];
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__ChannelData, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_LizardTech__ChannelData, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_ChannelData_convert__SWIG_0(nargs, args, self);
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__ChannelData, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_LizardTech__ChannelData, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_size_t(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_ChannelData_convert__SWIG_1(nargs, args, self);
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 7, "ChannelData.convert", 
    "    void ChannelData.convert(LizardTech::ChannelData &dst, size_t dstOffset, LizardTech::ChannelData const &src, size_t srcOffset, size_t length)\n"
    "    void ChannelData.convert(LizardTech::ChannelData &dst, size_t dstOffset, LizardTech::ChannelData const &src, size_t srcOffset, double offset, double scale, size_t length)\n");
  
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelData_resize(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelData *arg1 = (LizardTech::ChannelData *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ChannelData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelData *","resize", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelData * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","resize", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      (arg1)->resize(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelData_setOffset(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelData *arg1 = (LizardTech::ChannelData *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ChannelData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelData *","setOffset", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelData * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","setOffset", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      (arg1)->setOffset(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelData_setData(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelData *arg1 = (LizardTech::ChannelData *) 0 ;
  void *arg2 = (void *) 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  bool val3 ;
  int ecode3 = 0 ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ChannelData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelData *","setData", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelData * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","setData", 2, argv[0] )); 
  }
  ecode3 = SWIG_AsVal_bool(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","setData", 3, argv[1] ));
  } 
  arg3 = static_cast< bool >(val3);
  {
    try
    {
      (arg1)->setData(arg2,arg3);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ChannelData_getValue(int argc, VALUE *argv, VALUE self) {
  LizardTech::ChannelData *arg1 = (LizardTech::ChannelData *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  double result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ChannelData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ChannelData *","getValue", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ChannelData * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getValue", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      result = (double)LizardTech_ChannelData_getValue(arg1,arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_double(static_cast< double >(result));
  return vresult;
fail:
  return Qnil;
}


static swig_class SwigClassPointData;

SWIGINTERN void
free_LizardTech_PointData(LizardTech::PointData *arg1) {
    delete arg1;
}

#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
_wrap_PointData_allocate(VALUE self) {
#else
  SWIGINTERN VALUE
  _wrap_PointData_allocate(int argc, VALUE *argv, VALUE self) {
#endif
    
    
    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LizardTech__PointData);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
    rb_obj_call_init(vresult, argc, argv);
#endif
    return vresult;
  }
  

SWIGINTERN VALUE
_wrap_new_PointData(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "LidarDSDK::PointData";
  LizardTech::PointData *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (LizardTech::PointData *)new LizardTech::PointData();
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointData_init(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointData *arg1 = (LizardTech::PointData *) 0 ;
  LizardTech::PointInfo *arg2 = 0 ;
  size_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  size_t val3 ;
  int ecode3 = 0 ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointData *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointData * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointInfo const &","init", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo const &","init", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::PointInfo * >(argp2);
  ecode3 = SWIG_AsVal_size_t(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","init", 3, argv[1] ));
  } 
  arg3 = static_cast< size_t >(val3);
  {
    try
    {
      (arg1)->init((LizardTech::PointInfo const &)*arg2,arg3);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointData_getNumChannels(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointData *arg1 = (LizardTech::PointData *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointData const *","getNumChannels", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointData * >(argp1);
  {
    try
    {
      result = ((LizardTech::PointData const *)arg1)->getNumChannels();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointData_getNumSamples(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointData *arg1 = (LizardTech::PointData *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointData const *","getNumSamples", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointData * >(argp1);
  {
    try
    {
      result = ((LizardTech::PointData const *)arg1)->getNumSamples();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointData_getChannel__SWIG_0(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointData *arg1 = (LizardTech::PointData *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  LizardTech::ChannelData *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointData const *","getChannel", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointData * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getChannel", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      result = (LizardTech::ChannelData *) &((LizardTech::PointData const *)arg1)->getChannel(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__ChannelData, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointData_getChannel__SWIG_1(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointData *arg1 = (LizardTech::PointData *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  LizardTech::ChannelData *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointData *","getChannel", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointData * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getChannel", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      result = (LizardTech::ChannelData *) &(arg1)->getChannel(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__ChannelData, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointData_hasChannel(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointData *arg1 = (LizardTech::PointData *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointData const *","hasChannel", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointData * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","hasChannel", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      result = (bool)((LizardTech::PointData const *)arg1)->hasChannel((char const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointData_getChannel__SWIG_2(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointData *arg1 = (LizardTech::PointData *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  LizardTech::ChannelData *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointData const *","getChannel", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointData * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","getChannel", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      result = (LizardTech::ChannelData *)((LizardTech::PointData const *)arg1)->getChannel((char const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__ChannelData, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointData_getChannel__SWIG_3(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointData *arg1 = (LizardTech::PointData *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  LizardTech::ChannelData *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointData *","getChannel", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointData * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","getChannel", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      result = (LizardTech::ChannelData *)(arg1)->getChannel((char const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__ChannelData, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE _wrap_PointData_getChannel(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[3];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 3) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointData, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_PointData_getChannel__SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointData, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_PointData_getChannel__SWIG_0(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointData, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_PointData_getChannel__SWIG_3(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointData, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_PointData_getChannel__SWIG_2(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 3, "PointData.getChannel", 
    "    LizardTech::ChannelData * PointData.getChannel(size_t idx)\n"
    "    LizardTech::ChannelData * PointData.getChannel(size_t idx)\n"
    "    LizardTech::ChannelData * PointData.getChannel(char const *name)\n"
    "    LizardTech::ChannelData * PointData.getChannel(char const *name)\n");
  
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointData_copy(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointData *arg1 = 0 ;
  size_t arg2 ;
  LizardTech::PointData *arg3 = 0 ;
  size_t arg4 ;
  size_t arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  
  if ((argc < 5) || (argc > 5)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_LizardTech__PointData,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointData &","LizardTech::PointData::copy", 1, argv[0] )); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointData &","LizardTech::PointData::copy", 1, argv[0])); 
  }
  arg1 = reinterpret_cast< LizardTech::PointData * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","LizardTech::PointData::copy", 2, argv[1] ));
  } 
  arg2 = static_cast< size_t >(val2);
  res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_LizardTech__PointData,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "LizardTech::PointData const &","LizardTech::PointData::copy", 3, argv[2] )); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointData const &","LizardTech::PointData::copy", 3, argv[2])); 
  }
  arg3 = reinterpret_cast< LizardTech::PointData * >(argp3);
  ecode4 = SWIG_AsVal_size_t(argv[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","LizardTech::PointData::copy", 4, argv[3] ));
  } 
  arg4 = static_cast< size_t >(val4);
  ecode5 = SWIG_AsVal_size_t(argv[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "size_t","LizardTech::PointData::copy", 5, argv[4] ));
  } 
  arg5 = static_cast< size_t >(val5);
  {
    try
    {
      LizardTech::PointData::copy(*arg1,arg2,(LizardTech::PointData const &)*arg3,arg4,arg5);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointData_merge(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointData *arg1 = 0 ;
  size_t arg2 ;
  LizardTech::PointData *arg3 = 0 ;
  size_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  
  if ((argc < 4) || (argc > 4)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_LizardTech__PointData,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointData &","LizardTech::PointData::merge", 1, argv[0] )); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointData &","LizardTech::PointData::merge", 1, argv[0])); 
  }
  arg1 = reinterpret_cast< LizardTech::PointData * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","LizardTech::PointData::merge", 2, argv[1] ));
  } 
  arg2 = static_cast< size_t >(val2);
  res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_LizardTech__PointData,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "LizardTech::PointData const &","LizardTech::PointData::merge", 3, argv[2] )); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointData const &","LizardTech::PointData::merge", 3, argv[2])); 
  }
  arg3 = reinterpret_cast< LizardTech::PointData * >(argp3);
  ecode4 = SWIG_AsVal_size_t(argv[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","LizardTech::PointData::merge", 4, argv[3] ));
  } 
  arg4 = static_cast< size_t >(val4);
  {
    try
    {
      LizardTech::PointData::merge(*arg1,arg2,(LizardTech::PointData const &)*arg3,arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointData_resize(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointData *arg1 = (LizardTech::PointData *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointData *","resize", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointData * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","resize", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      (arg1)->resize(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointData_setOffset(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointData *arg1 = (LizardTech::PointData *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointData, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointData *","setOffset", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointData * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","setOffset", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      (arg1)->setOffset(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


static swig_class SwigClassObject;

SWIGINTERN VALUE
_wrap_Object_retain(int argc, VALUE *argv, VALUE self) {
  LizardTech::Object *arg1 = (LizardTech::Object *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Object, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Object const *","retain", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Object * >(argp1);
  {
    try
    {
      result = (int)((LizardTech::Object const *)arg1)->retain();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_int(static_cast< int >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Object_release(int argc, VALUE *argv, VALUE self) {
  LizardTech::Object *arg1 = (LizardTech::Object *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Object, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Object const *","release", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Object * >(argp1);
  {
    try
    {
      result = (int)((LizardTech::Object const *)arg1)->release();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_int(static_cast< int >(result));
  return vresult;
fail:
  return Qnil;
}


static swig_class SwigClassIO;

SWIGINTERN VALUE
_wrap_IO_open(int argc, VALUE *argv, VALUE self) {
  LizardTech::IO *arg1 = (LizardTech::IO *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__IO, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::IO *","open", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::IO * >(argp1);
  {
    try
    {
      (arg1)->open();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_IO_close(int argc, VALUE *argv, VALUE self) {
  LizardTech::IO *arg1 = (LizardTech::IO *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__IO, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::IO *","close", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::IO * >(argp1);
  {
    try
    {
      (arg1)->close();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_IO_pread(int argc, VALUE *argv, VALUE self) {
  LizardTech::IO *arg1 = (LizardTech::IO *) 0 ;
  LizardTech::IO::offset_type arg2 ;
  void *arg3 = (void *) 0 ;
  size_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  long long val2 ;
  int ecode2 = 0 ;
  int res3 ;
  size_t val4 ;
  int ecode4 = 0 ;
  size_t result;
  VALUE vresult = Qnil;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__IO, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::IO const *","pread", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::IO * >(argp1);
  ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "LizardTech::IO::offset_type","pread", 2, argv[0] ));
  } 
  arg2 = static_cast< LizardTech::IO::offset_type >(val2);
  res3 = SWIG_ConvertPtr(argv[1],SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","pread", 3, argv[1] )); 
  }
  ecode4 = SWIG_AsVal_size_t(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","pread", 4, argv[2] ));
  } 
  arg4 = static_cast< size_t >(val4);
  {
    try
    {
      result = ((LizardTech::IO const *)arg1)->pread(arg2,arg3,arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_IO_pwrite(int argc, VALUE *argv, VALUE self) {
  LizardTech::IO *arg1 = (LizardTech::IO *) 0 ;
  LizardTech::IO::offset_type arg2 ;
  void *arg3 = (void *) 0 ;
  size_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  long long val2 ;
  int ecode2 = 0 ;
  int res3 ;
  size_t val4 ;
  int ecode4 = 0 ;
  size_t result;
  VALUE vresult = Qnil;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__IO, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::IO const *","pwrite", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::IO * >(argp1);
  ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "LizardTech::IO::offset_type","pwrite", 2, argv[0] ));
  } 
  arg2 = static_cast< LizardTech::IO::offset_type >(val2);
  res3 = SWIG_ConvertPtr(argv[1],SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void const *","pwrite", 3, argv[1] )); 
  }
  ecode4 = SWIG_AsVal_size_t(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","pwrite", 4, argv[2] ));
  } 
  arg4 = static_cast< size_t >(val4);
  {
    try
    {
      result = ((LizardTech::IO const *)arg1)->pwrite(arg2,(void const *)arg3,arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}



/*
  Document-method: LidarDSDK::IO.size

  call-seq:
    size -> LizardTech::IO::offset_type

Size or Length of the IO.
*/
SWIGINTERN VALUE
_wrap_IO_size(int argc, VALUE *argv, VALUE self) {
  LizardTech::IO *arg1 = (LizardTech::IO *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  LizardTech::IO::offset_type result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__IO, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::IO const *","size", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::IO * >(argp1);
  {
    try
    {
      result = (LizardTech::IO::offset_type)((LizardTech::IO const *)arg1)->size();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_long_SS_long(static_cast< long long >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_IO_truncate(int argc, VALUE *argv, VALUE self) {
  LizardTech::IO *arg1 = (LizardTech::IO *) 0 ;
  LizardTech::IO::offset_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  long long val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__IO, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::IO *","truncate", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::IO * >(argp1);
  ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "LizardTech::IO::offset_type","truncate", 2, argv[0] ));
  } 
  arg2 = static_cast< LizardTech::IO::offset_type >(val2);
  {
    try
    {
      (arg1)->truncate(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_IO_unlink(int argc, VALUE *argv, VALUE self) {
  LizardTech::IO *arg1 = (LizardTech::IO *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__IO, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::IO *","unlink", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::IO * >(argp1);
  {
    try
    {
      (arg1)->unlink();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN void delete_LizardTech_IO(LizardTech::IO *self){
       //::fprintf(stderr, "in ~" #IO "\n");
       self->release();
     }
SWIGINTERN void
free_LizardTech_IO(LizardTech::IO *arg1) {
    delete_LizardTech_IO(arg1);
}

static swig_class SwigClassFileIO;

SWIGINTERN VALUE
_wrap_FileIO_init__SWIG_0(int argc, VALUE *argv, VALUE self) {
  LizardTech::FileIO *arg1 = (LizardTech::FileIO *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__FileIO, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::FileIO *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::FileIO * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","init", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","init", 3, argv[1] ));
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try
    {
      (arg1)->init((char const *)arg2,(char const *)arg3);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_FileIO_init__SWIG_1(int argc, VALUE *argv, VALUE self) {
  LizardTech::FileIO *arg1 = (LizardTech::FileIO *) 0 ;
  wchar_t *arg2 = (wchar_t *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__FileIO, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::FileIO *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::FileIO * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_wchar_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "wchar_t const *","init", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< wchar_t * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","init", 3, argv[1] ));
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try
    {
      (arg1)->init((wchar_t const *)arg2,(char const *)arg3);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_FileIO_init__SWIG_2(int argc, VALUE *argv, VALUE self) {
  LizardTech::FileIO *arg1 = (LizardTech::FileIO *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__FileIO, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::FileIO *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::FileIO * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","init", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      (arg1)->init((char const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_FileIO_init__SWIG_3(int argc, VALUE *argv, VALUE self) {
  LizardTech::FileIO *arg1 = (LizardTech::FileIO *) 0 ;
  wchar_t *arg2 = (wchar_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__FileIO, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::FileIO *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::FileIO * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_wchar_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "wchar_t const *","init", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< wchar_t * >(argp2);
  {
    try
    {
      (arg1)->init((wchar_t const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE _wrap_FileIO_init(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[4];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 4) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__FileIO, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_wchar_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_FileIO_init__SWIG_3(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__FileIO, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_FileIO_init__SWIG_2(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__FileIO, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_wchar_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_FileIO_init__SWIG_1(nargs, args, self);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__FileIO, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_FileIO_init__SWIG_0(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 4, "FileIO.init", 
    "    void FileIO.init(char const *path, char const *mode)\n"
    "    void FileIO.init(wchar_t const *path, char const *mode)\n"
    "    void FileIO.init(char const *tempdir)\n"
    "    void FileIO.init(wchar_t const *tempdir)\n");
  
  return Qnil;
}


SWIGINTERN void delete_LizardTech_FileIO(LizardTech::FileIO *self){
       //::fprintf(stderr, "in ~" #FileIO "\n");
       self->release();
     }
SWIGINTERN void
free_LizardTech_FileIO(LizardTech::FileIO *arg1) {
    delete_LizardTech_FileIO(arg1);
}

#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
_wrap_FileIO_allocate(VALUE self) {
#else
  SWIGINTERN VALUE
  _wrap_FileIO_allocate(int argc, VALUE *argv, VALUE self) {
#endif
    
    
    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LizardTech__FileIO);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
    rb_obj_call_init(vresult, argc, argv);
#endif
    return vresult;
  }
  

SWIGINTERN VALUE
_wrap_new_FileIO(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "LidarDSDK::FileIO";
  LizardTech::FileIO *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (LizardTech::FileIO *)new_LizardTech_FileIO();
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  
  return self;
fail:
  return Qnil;
}


static swig_class SwigClassMetadata;

SWIGINTERN void
free_LizardTech_Metadata(LizardTech::Metadata *arg1) {
    delete arg1;
}

#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
_wrap_Metadata_allocate(VALUE self) {
#else
  SWIGINTERN VALUE
  _wrap_Metadata_allocate(int argc, VALUE *argv, VALUE self) {
#endif
    
    
    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LizardTech__Metadata);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
    rb_obj_call_init(vresult, argc, argv);
#endif
    return vresult;
  }
  

SWIGINTERN VALUE
_wrap_new_Metadata(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "LidarDSDK::Metadata";
  LizardTech::Metadata *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (LizardTech::Metadata *)new LizardTech::Metadata();
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Metadata_getNumRecords(int argc, VALUE *argv, VALUE self) {
  LizardTech::Metadata *arg1 = (LizardTech::Metadata *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Metadata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Metadata const *","getNumRecords", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Metadata * >(argp1);
  {
    try
    {
      result = ((LizardTech::Metadata const *)arg1)->getNumRecords();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Metadata_has(int argc, VALUE *argv, VALUE self) {
  LizardTech::Metadata *arg1 = (LizardTech::Metadata *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Metadata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Metadata const *","has", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Metadata * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","has", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      result = (bool)((LizardTech::Metadata const *)arg1)->has((char const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Metadata_getKeyIndex(int argc, VALUE *argv, VALUE self) {
  LizardTech::Metadata *arg1 = (LizardTech::Metadata *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  size_t result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Metadata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Metadata const *","getKeyIndex", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Metadata * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","getKeyIndex", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      result = ((LizardTech::Metadata const *)arg1)->getKeyIndex((char const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Metadata_getKey(int argc, VALUE *argv, VALUE self) {
  LizardTech::Metadata *arg1 = (LizardTech::Metadata *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Metadata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Metadata const *","getKey", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Metadata * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getKey", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      result = (char *)((LizardTech::Metadata const *)arg1)->getKey(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_FromCharPtr((const char *)result);
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Metadata_getDescription(int argc, VALUE *argv, VALUE self) {
  LizardTech::Metadata *arg1 = (LizardTech::Metadata *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Metadata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Metadata const *","getDescription", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Metadata * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getDescription", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      result = (char *)((LizardTech::Metadata const *)arg1)->getDescription(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_FromCharPtr((const char *)result);
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Metadata_getDataType(int argc, VALUE *argv, VALUE self) {
  LizardTech::Metadata *arg1 = (LizardTech::Metadata *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  LizardTech::MetadataDataType result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Metadata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Metadata const *","getDataType", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Metadata * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getDataType", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      result = (LizardTech::MetadataDataType)((LizardTech::Metadata const *)arg1)->getDataType(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_int(static_cast< int >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Metadata_getValue(int argc, VALUE *argv, VALUE self) {
  LizardTech::Metadata *arg1 = (LizardTech::Metadata *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Metadata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Metadata const *","getValue", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Metadata * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getValue", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      result = (void *)((LizardTech::Metadata const *)arg1)->getValue(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    size_t length = arg1->getValueLength(arg2);
    switch(arg1->getDataType(arg2))
    {
    case LizardTech::METADATA_DATATYPE_STRING:
      vresult = rb_str_new2(static_cast<const char *>(result));
      break;
    case LizardTech::METADATA_DATATYPE_BLOB:
      vresult = rb_str_new(static_cast<const char *>(result), length);
      break;
    case LizardTech::METADATA_DATATYPE_REAL_ARRAY:
      vresult = doubleArrayToObject(static_cast<const double *>(result), length);
      break;
    default:
      vresult = Qnil;
      break;
    }
  }
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Metadata_getValueLength(int argc, VALUE *argv, VALUE self) {
  LizardTech::Metadata *arg1 = (LizardTech::Metadata *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  size_t result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Metadata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Metadata const *","getValueLength", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Metadata * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getValueLength", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      result = ((LizardTech::Metadata const *)arg1)->getValueLength(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Metadata_add__SWIG_0(int argc, VALUE *argv, VALUE self) {
  LizardTech::Metadata *arg1 = (LizardTech::Metadata *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  LizardTech::MetadataDataType arg4 ;
  void *arg5 = (void *) 0 ;
  size_t arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int res5 ;
  size_t val6 ;
  int ecode6 = 0 ;
  
  if ((argc < 5) || (argc > 5)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Metadata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Metadata *","add", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Metadata * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","add", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","add", 3, argv[1] ));
  }
  arg3 = reinterpret_cast< char * >(buf3);
  ecode4 = SWIG_AsVal_int(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "LizardTech::MetadataDataType","add", 4, argv[2] ));
  } 
  arg4 = static_cast< LizardTech::MetadataDataType >(val4);
  res5 = SWIG_ConvertPtr(argv[3],SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "void const *","add", 5, argv[3] )); 
  }
  ecode6 = SWIG_AsVal_size_t(argv[4], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "size_t","add", 6, argv[4] ));
  } 
  arg6 = static_cast< size_t >(val6);
  {
    try
    {
      (arg1)->add((char const *)arg2,(char const *)arg3,arg4,(void const *)arg5,arg6);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Metadata_add__SWIG_1(int argc, VALUE *argv, VALUE self) {
  LizardTech::Metadata *arg1 = (LizardTech::Metadata *) 0 ;
  LizardTech::Metadata *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Metadata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Metadata *","add", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Metadata * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__Metadata,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Metadata const &","add", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Metadata const &","add", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::Metadata * >(argp2);
  {
    try
    {
      (arg1)->add((LizardTech::Metadata const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE _wrap_Metadata_add(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[7];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 7) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__Metadata, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__Metadata, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Metadata_add__SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__Metadata, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_size_t(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_Metadata_add__SWIG_0(nargs, args, self);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 7, "Metadata.add", 
    "    void Metadata.add(char const *key, char const *description, LizardTech::MetadataDataType datatype, void const *value, size_t length)\n"
    "    void Metadata.add(LizardTech::Metadata const &meta)\n");
  
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Metadata_remove__SWIG_0(int argc, VALUE *argv, VALUE self) {
  LizardTech::Metadata *arg1 = (LizardTech::Metadata *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Metadata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Metadata *","remove", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Metadata * >(argp1);
  {
    try
    {
      (arg1)->remove();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Metadata_remove__SWIG_1(int argc, VALUE *argv, VALUE self) {
  LizardTech::Metadata *arg1 = (LizardTech::Metadata *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Metadata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Metadata *","remove", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Metadata * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","remove", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      (arg1)->remove(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Metadata_remove__SWIG_2(int argc, VALUE *argv, VALUE self) {
  LizardTech::Metadata *arg1 = (LizardTech::Metadata *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Metadata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Metadata *","remove", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Metadata * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","remove", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      (arg1)->remove((char const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE _wrap_Metadata_remove(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[3];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 3) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__Metadata, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_Metadata_remove__SWIG_0(nargs, args, self);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__Metadata, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Metadata_remove__SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__Metadata, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Metadata_remove__SWIG_2(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 3, "Metadata.remove", 
    "    void Metadata.remove()\n"
    "    void Metadata.remove(size_t idx)\n"
    "    void Metadata.remove(char const *key)\n");
  
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Metadata_sort(int argc, VALUE *argv, VALUE self) {
  LizardTech::Metadata *arg1 = (LizardTech::Metadata *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__Metadata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::Metadata *","sort", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::Metadata * >(argp1);
  {
    try
    {
      (arg1)->sort();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


static swig_class SwigClassProgressDelegate;

SWIGINTERN void
free_LizardTech_ProgressDelegate(LizardTech::ProgressDelegate *arg1) {
    delete arg1;
}

SWIGINTERN VALUE
_wrap_ProgressDelegate_reportProgress(int argc, VALUE *argv, VALUE self) {
  LizardTech::ProgressDelegate *arg1 = (LizardTech::ProgressDelegate *) 0 ;
  double arg2 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ProgressDelegate, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ProgressDelegate *","reportProgress", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ProgressDelegate * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","reportProgress", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","reportProgress", 3, argv[1] ));
  }
  arg3 = reinterpret_cast< char * >(buf3);
  director = dynamic_cast<Swig::Director *>(arg1);
  upcall = (director && (director->swig_get_self() == self));
  try {
    {
      try
      {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("LizardTech::ProgressDelegate::reportProgress");
        } else {
          (arg1)->reportProgress(arg2,(char const *)arg3);
        }
      }
      catch(std::exception &err)
      {
        SWIG_exception(SWIG_RuntimeError, err.what());
      }
      catch(...)
      {
        SWIG_exception(SWIG_RuntimeError,"Unknown exception");
      }
    }
  } catch (Swig::DirectorException& e) {
    rb_exc_raise(e.getError());
    SWIG_fail;
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ProgressDelegate_getCancelled(int argc, VALUE *argv, VALUE self) {
  LizardTech::ProgressDelegate *arg1 = (LizardTech::ProgressDelegate *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ProgressDelegate, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ProgressDelegate *","getCancelled", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ProgressDelegate * >(argp1);
  director = dynamic_cast<Swig::Director *>(arg1);
  upcall = (director && (director->swig_get_self() == self));
  try {
    {
      try
      {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("LizardTech::ProgressDelegate::getCancelled");
        } else {
          result = (bool)(arg1)->getCancelled();
        }
      }
      catch(std::exception &err)
      {
        SWIG_exception(SWIG_RuntimeError, err.what());
      }
      catch(...)
      {
        SWIG_exception(SWIG_RuntimeError,"Unknown exception");
      }
    }
  } catch (Swig::DirectorException& e) {
    rb_exc_raise(e.getError());
    SWIG_fail;
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ProgressDelegate_setTotal(int argc, VALUE *argv, VALUE self) {
  LizardTech::ProgressDelegate *arg1 = (LizardTech::ProgressDelegate *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ProgressDelegate, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ProgressDelegate *","setTotal", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ProgressDelegate * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","setTotal", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  {
    try
    {
      (arg1)->setTotal(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ProgressDelegate_updateCompleted(int argc, VALUE *argv, VALUE self) {
  LizardTech::ProgressDelegate *arg1 = (LizardTech::ProgressDelegate *) 0 ;
  double arg2 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ProgressDelegate, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ProgressDelegate *","updateCompleted", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ProgressDelegate * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","updateCompleted", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","updateCompleted", 3, argv[1] ));
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try
    {
      (arg1)->updateCompleted(arg2,(char const *)arg3);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ProgressDelegate_getProgress(int argc, VALUE *argv, VALUE self) {
  LizardTech::ProgressDelegate *arg1 = (LizardTech::ProgressDelegate *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ProgressDelegate, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ProgressDelegate const *","getProgress", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ProgressDelegate * >(argp1);
  {
    try
    {
      result = (double)((LizardTech::ProgressDelegate const *)arg1)->getProgress();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_double(static_cast< double >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ProgressDelegate_warning(int argc, VALUE *argv, VALUE self) {
  LizardTech::ProgressDelegate *arg1 = (LizardTech::ProgressDelegate *) 0 ;
  char *arg2 = (char *) 0 ;
  void *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  
  if (argc < 1) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ProgressDelegate, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ProgressDelegate *","warning", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ProgressDelegate * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","warning", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      (arg1)->warning((char const *)arg2,arg3);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_ProgressDelegate_displayWarning(int argc, VALUE *argv, VALUE self) {
  LizardTech::ProgressDelegate *arg1 = (LizardTech::ProgressDelegate *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__ProgressDelegate, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ProgressDelegate *","displayWarning", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::ProgressDelegate * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","displayWarning", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  director = dynamic_cast<Swig::Director *>(arg1);
  upcall = (director && (director->swig_get_self() == self));
  try {
    {
      try
      {
        if (upcall) {
          (arg1)->LizardTech::ProgressDelegate::displayWarning((char const *)arg2);
        } else {
          (arg1)->displayWarning((char const *)arg2);
        }
      }
      catch(std::exception &err)
      {
        SWIG_exception(SWIG_RuntimeError, err.what());
      }
      catch(...)
      {
        SWIG_exception(SWIG_RuntimeError,"Unknown exception");
      }
    }
  } catch (Swig::DirectorException& e) {
    rb_exc_raise(e.getError());
    SWIG_fail;
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
_wrap_ProgressDelegate_allocate(VALUE self) {
#else
  SWIGINTERN VALUE
  _wrap_ProgressDelegate_allocate(int argc, VALUE *argv, VALUE self) {
#endif
    
    
    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LizardTech__ProgressDelegate);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
    rb_obj_call_init(vresult, argc, argv);
#endif
    return vresult;
  }
  

SWIGINTERN VALUE
_wrap_new_ProgressDelegate(int argc, VALUE *argv, VALUE self) {
  VALUE arg1 = (VALUE) 0 ;
  const char *classname SWIGUNUSED = "LidarDSDK::ProgressDelegate";
  LizardTech::ProgressDelegate *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  arg1 = self;
  {
    try
    {
      if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
        /* subclassed */
        result = (LizardTech::ProgressDelegate *)new SwigDirector_ProgressDelegate(arg1); 
      } else {
        rb_raise(rb_eNameError,"accessing abstract class or protected constructor"); 
        return Qnil;
      }
      
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_disown_ProgressDelegate(int argc, VALUE *argv, VALUE self) {
  LizardTech::ProgressDelegate *arg1 = (LizardTech::ProgressDelegate *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_LizardTech__ProgressDelegate, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::ProgressDelegate *","disown_ProgressDelegate", 1, argv[0] )); 
  }
  arg1 = reinterpret_cast< LizardTech::ProgressDelegate * >(argp1);
  {
    Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
    if (director) director->swig_disown();
  }
  
  return Qnil;
fail:
  return Qnil;
}


static swig_class SwigClassPercentProgressDelegate;

#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
_wrap_PercentProgressDelegate_allocate(VALUE self) {
#else
  SWIGINTERN VALUE
  _wrap_PercentProgressDelegate_allocate(int argc, VALUE *argv, VALUE self) {
#endif
    
    
    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LizardTech__PercentProgressDelegate);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
    rb_obj_call_init(vresult, argc, argv);
#endif
    return vresult;
  }
  

SWIGINTERN VALUE
_wrap_new_PercentProgressDelegate(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "LidarDSDK::PercentProgressDelegate";
  LizardTech::PercentProgressDelegate *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (LizardTech::PercentProgressDelegate *)new LizardTech::PercentProgressDelegate();
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN void
free_LizardTech_PercentProgressDelegate(LizardTech::PercentProgressDelegate *arg1) {
    delete arg1;
}

SWIGINTERN VALUE
_wrap_PercentProgressDelegate_setCancelled(int argc, VALUE *argv, VALUE self) {
  LizardTech::PercentProgressDelegate *arg1 = (LizardTech::PercentProgressDelegate *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PercentProgressDelegate, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PercentProgressDelegate *","setCancelled", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PercentProgressDelegate * >(argp1);
  ecode2 = SWIG_AsVal_bool(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","setCancelled", 2, argv[0] ));
  } 
  arg2 = static_cast< bool >(val2);
  {
    try
    {
      (arg1)->setCancelled(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


static swig_class SwigClassPointIterator;

SWIGINTERN VALUE
_wrap_PointIterator_getNextPoints(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointIterator *arg1 = (LizardTech::PointIterator *) 0 ;
  LizardTech::PointData *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  size_t result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointIterator *","getNextPoints", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointIterator * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__PointData,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointData &","getNextPoints", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointData &","getNextPoints", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::PointData * >(argp2);
  {
    try
    {
      result = (arg1)->getNextPoints(*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN void delete_LizardTech_PointIterator(LizardTech::PointIterator *self){
       //::fprintf(stderr, "in ~" #PointIterator "\n");
       self->release();
     }
SWIGINTERN void
free_LizardTech_PointIterator(LizardTech::PointIterator *arg1) {
    delete_LizardTech_PointIterator(arg1);
}

static swig_class SwigClassPointSource;

SWIGINTERN VALUE
_wrap_PointSource_getPointInfo(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  LizardTech::PointInfo *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","getPointInfo", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  {
    try
    {
      result = (LizardTech::PointInfo *) &((LizardTech::PointSource const *)arg1)->getPointInfo();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__PointInfo, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointSource_getNumChannels(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","getNumChannels", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  {
    try
    {
      result = ((LizardTech::PointSource const *)arg1)->getNumChannels();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointSource_hasChannel(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","hasChannel", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","hasChannel", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      result = (bool)((LizardTech::PointSource const *)arg1)->hasChannel((char const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointSource_getChannel__SWIG_0(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  LizardTech::ChannelInfo *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","getChannel", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getChannel", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      result = (LizardTech::ChannelInfo *) &((LizardTech::PointSource const *)arg1)->getChannel(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__ChannelInfo, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointSource_getChannel__SWIG_1(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  LizardTech::ChannelInfo *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","getChannel", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","getChannel", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      result = (LizardTech::ChannelInfo *)((LizardTech::PointSource const *)arg1)->getChannel((char const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__ChannelInfo, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE _wrap_PointSource_getChannel(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[3];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 3) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointSource, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_PointSource_getChannel__SWIG_0(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__PointSource, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_PointSource_getChannel__SWIG_1(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 3, "PointSource.getChannel", 
    "    LizardTech::ChannelInfo const * PointSource.getChannel(size_t idx)\n"
    "    LizardTech::ChannelInfo const * PointSource.getChannel(char const *name)\n");
  
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointSource_getNumPoints(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  LizardTech::PointSource::count_type result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","getNumPoints", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  {
    try
    {
      result = (LizardTech::PointSource::count_type)((LizardTech::PointSource const *)arg1)->getNumPoints();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_long_SS_long(static_cast< long long >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointSource_getWKT(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","getWKT", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  {
    try
    {
      result = (char *)((LizardTech::PointSource const *)arg1)->getWKT();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_FromCharPtr((const char *)result);
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointSource_loadMetadata(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  LizardTech::Metadata *arg2 = 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","loadMetadata", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__Metadata,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Metadata &","loadMetadata", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Metadata &","loadMetadata", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::Metadata * >(argp2);
  ecode3 = SWIG_AsVal_bool(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","loadMetadata", 3, argv[1] ));
  } 
  arg3 = static_cast< bool >(val3);
  {
    try
    {
      ((LizardTech::PointSource const *)arg1)->loadMetadata(*arg2,arg3);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointSource_getBounds(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  LizardTech::Bounds *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","getBounds", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  {
    try
    {
      result = (LizardTech::Bounds *) &((LizardTech::PointSource const *)arg1)->getBounds();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__Bounds, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointSource_getScale(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","getScale", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  {
    try
    {
      result = (double *)((LizardTech::PointSource const *)arg1)->getScale();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    vresult = doubleArrayToObject(result, 3);
  }
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointSource_getOffset(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","getOffset", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  {
    try
    {
      result = (double *)((LizardTech::PointSource const *)arg1)->getOffset();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    vresult = doubleArrayToObject(result, 3);
  }
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointSource_getNumClassIdNames(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","getNumClassIdNames", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  {
    try
    {
      result = ((LizardTech::PointSource const *)arg1)->getNumClassIdNames();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointSource_getClassIdNames(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char **result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","getClassIdNames", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  {
    try
    {
      result = (char **)((LizardTech::PointSource const *)arg1)->getClassIdNames();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    vresult = stringArrayToObject(result, arg1->getNumClassIdNames());
  }
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointSource_getTotalWork(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  LizardTech::Bounds *arg2 = 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double result;
  VALUE vresult = Qnil;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","getTotalWork", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__Bounds,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Bounds const &","getTotalWork", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Bounds const &","getTotalWork", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::Bounds * >(argp2);
  ecode3 = SWIG_AsVal_double(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","getTotalWork", 3, argv[1] ));
  } 
  arg3 = static_cast< double >(val3);
  {
    try
    {
      result = (double)((LizardTech::PointSource const *)arg1)->getTotalWork((LizardTech::Bounds const &)*arg2,arg3);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_double(static_cast< double >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointSource_createIterator(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  LizardTech::Bounds *arg2 = 0 ;
  double arg3 ;
  LizardTech::PointInfo *arg4 = 0 ;
  LizardTech::ProgressDelegate *arg5 = (LizardTech::ProgressDelegate *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  LizardTech::PointIterator *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 4) || (argc > 4)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","createIterator", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__Bounds,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Bounds const &","createIterator", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Bounds const &","createIterator", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::Bounds * >(argp2);
  ecode3 = SWIG_AsVal_double(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","createIterator", 3, argv[1] ));
  } 
  arg3 = static_cast< double >(val3);
  res4 = SWIG_ConvertPtr(argv[2], &argp4, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "LizardTech::PointInfo const &","createIterator", 4, argv[2] )); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo const &","createIterator", 4, argv[2])); 
  }
  arg4 = reinterpret_cast< LizardTech::PointInfo * >(argp4);
  res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_LizardTech__ProgressDelegate, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "LizardTech::ProgressDelegate *","createIterator", 5, argv[3] )); 
  }
  arg5 = reinterpret_cast< LizardTech::ProgressDelegate * >(argp5);
  {
    try
    {
      result = (LizardTech::PointIterator *)((LizardTech::PointSource const *)arg1)->createIterator((LizardTech::Bounds const &)*arg2,arg3,(LizardTech::PointInfo const &)*arg4,arg5);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__PointIterator, SWIG_POINTER_OWN |  0 );
  
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointSource_read(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointSource *arg1 = (LizardTech::PointSource *) 0 ;
  LizardTech::Bounds *arg2 = 0 ;
  LizardTech::PointData *arg3 = 0 ;
  LizardTech::ProgressDelegate *arg4 = (LizardTech::ProgressDelegate *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t result;
  VALUE vresult = Qnil;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","read", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointSource * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__Bounds,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Bounds const &","read", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Bounds const &","read", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::Bounds * >(argp2);
  res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_LizardTech__PointData,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "LizardTech::PointData &","read", 3, argv[1] )); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointData &","read", 3, argv[1])); 
  }
  arg3 = reinterpret_cast< LizardTech::PointData * >(argp3);
  res4 = SWIG_ConvertPtr(argv[2], &argp4,SWIGTYPE_p_LizardTech__ProgressDelegate, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "LizardTech::ProgressDelegate *","read", 4, argv[2] )); 
  }
  arg4 = reinterpret_cast< LizardTech::ProgressDelegate * >(argp4);
  {
    try
    {
      result = ((LizardTech::PointSource const *)arg1)->read((LizardTech::Bounds const &)*arg2,*arg3,arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN void delete_LizardTech_PointSource(LizardTech::PointSource *self){
       //::fprintf(stderr, "in ~" #PointSource "\n");
       self->release();
     }
SWIGINTERN void
free_LizardTech_PointSource(LizardTech::PointSource *arg1) {
    delete_LizardTech_PointSource(arg1);
}

static swig_class SwigClassPointReader;

SWIGINTERN VALUE
_wrap_PointReader_overrideWKT(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointReader *arg1 = (LizardTech::PointReader *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointReader, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointReader *","overrideWKT", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointReader * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","overrideWKT", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      (arg1)->overrideWKT((char const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointReader_getFileFormatString(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointReader *arg1 = (LizardTech::PointReader *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointReader, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointReader const *","getFileFormatString", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointReader * >(argp1);
  {
    try
    {
      result = (char *)((LizardTech::PointReader const *)arg1)->getFileFormatString();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_FromCharPtr((const char *)result);
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN void delete_LizardTech_PointReader(LizardTech::PointReader *self){
       //::fprintf(stderr, "in ~" #PointReader "\n");
       self->release();
     }
SWIGINTERN void
free_LizardTech_PointReader(LizardTech::PointReader *arg1) {
    delete_LizardTech_PointReader(arg1);
}

static swig_class SwigClassPointWriter;

SWIGINTERN VALUE
_wrap_PointWriter_setMetadata(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointWriter *arg1 = (LizardTech::PointWriter *) 0 ;
  LizardTech::Metadata *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointWriter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointWriter *","setMetadata", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointWriter * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__Metadata,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Metadata const &","setMetadata", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Metadata const &","setMetadata", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::Metadata * >(argp2);
  {
    try
    {
      (arg1)->setMetadata((LizardTech::Metadata const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointWriter_getMetadata(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointWriter *arg1 = (LizardTech::PointWriter *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  LizardTech::Metadata *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointWriter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointWriter *","getMetadata", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointWriter * >(argp1);
  {
    try
    {
      result = (LizardTech::Metadata *) &(arg1)->getMetadata();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LizardTech__Metadata, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointWriter_setQuantization(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointWriter *arg1 = (LizardTech::PointWriter *) 0 ;
  double *arg2 ;
  double *arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2[3] ;
  double temp3[3] ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointWriter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointWriter *","setQuantization", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointWriter * >(argp1);
  {
    arg2 = objectToDouble3(argv[0], temp2);
  }
  {
    arg3 = objectToDouble3(argv[1], temp3);
  }
  {
    try
    {
      (arg1)->setQuantization((double const (*))arg2,(double const (*))arg3);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointWriter_getScale(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointWriter *arg1 = (LizardTech::PointWriter *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointWriter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointWriter const *","getScale", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointWriter * >(argp1);
  {
    try
    {
      result = (double *)((LizardTech::PointWriter const *)arg1)->getScale();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    vresult = doubleArrayToObject(result, 3);
  }
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointWriter_getOffset(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointWriter *arg1 = (LizardTech::PointWriter *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointWriter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointWriter const *","getOffset", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointWriter * >(argp1);
  {
    try
    {
      result = (double *)((LizardTech::PointWriter const *)arg1)->getOffset();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    vresult = doubleArrayToObject(result, 3);
  }
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointWriter_write(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointWriter *arg1 = (LizardTech::PointWriter *) 0 ;
  LizardTech::Bounds *arg2 = 0 ;
  double arg3 ;
  LizardTech::PointInfo *arg4 = 0 ;
  LizardTech::ProgressDelegate *arg5 = (LizardTech::ProgressDelegate *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  LizardTech::PointWriter::count_type result;
  VALUE vresult = Qnil;
  
  if ((argc < 4) || (argc > 4)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointWriter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointWriter *","write", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointWriter * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__Bounds,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::Bounds const &","write", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Bounds const &","write", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::Bounds * >(argp2);
  ecode3 = SWIG_AsVal_double(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","write", 3, argv[1] ));
  } 
  arg3 = static_cast< double >(val3);
  res4 = SWIG_ConvertPtr(argv[2], &argp4, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "LizardTech::PointInfo const &","write", 4, argv[2] )); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo const &","write", 4, argv[2])); 
  }
  arg4 = reinterpret_cast< LizardTech::PointInfo * >(argp4);
  res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_LizardTech__ProgressDelegate, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "LizardTech::ProgressDelegate *","write", 5, argv[3] )); 
  }
  arg5 = reinterpret_cast< LizardTech::ProgressDelegate * >(argp5);
  {
    try
    {
      result = (LizardTech::PointWriter::count_type)(arg1)->write((LizardTech::Bounds const &)*arg2,arg3,(LizardTech::PointInfo const &)*arg4,arg5);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_long_SS_long(static_cast< long long >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointWriter_setChunckSize(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointWriter *arg1 = (LizardTech::PointWriter *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointWriter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointWriter *","setChunckSize", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointWriter * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","setChunckSize", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try
    {
      (arg1)->setChunckSize(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_PointWriter_supportedChannels(int argc, VALUE *argv, VALUE self) {
  LizardTech::PointWriter *arg1 = (LizardTech::PointWriter *) 0 ;
  LizardTech::PointInfo *arg2 = 0 ;
  LizardTech::PointInfo *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__PointWriter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::PointWriter const *","supportedChannels", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::PointWriter * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointInfo const &","supportedChannels", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo const &","supportedChannels", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::PointInfo * >(argp2);
  res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "LizardTech::PointInfo &","supportedChannels", 3, argv[1] )); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo &","supportedChannels", 3, argv[1])); 
  }
  arg3 = reinterpret_cast< LizardTech::PointInfo * >(argp3);
  {
    try
    {
      result = (bool)((LizardTech::PointWriter const *)arg1)->supportedChannels((LizardTech::PointInfo const &)*arg2,*arg3);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN void delete_LizardTech_PointWriter(LizardTech::PointWriter *self){
       //::fprintf(stderr, "in ~" #PointWriter "\n");
       self->release();
     }
SWIGINTERN void
free_LizardTech_PointWriter(LizardTech::PointWriter *arg1) {
    delete_LizardTech_PointWriter(arg1);
}

static swig_class SwigClassSimplePointWriter;

SWIGINTERN VALUE
_wrap_SimplePointWriter_writeBegin(int argc, VALUE *argv, VALUE self) {
  LizardTech::SimplePointWriter *arg1 = (LizardTech::SimplePointWriter *) 0 ;
  LizardTech::PointInfo *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__SimplePointWriter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::SimplePointWriter *","writeBegin", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::SimplePointWriter * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointInfo const &","writeBegin", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo const &","writeBegin", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::PointInfo * >(argp2);
  {
    try
    {
      (arg1)->writeBegin((LizardTech::PointInfo const &)*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_SimplePointWriter_writePoints(int argc, VALUE *argv, VALUE self) {
  LizardTech::SimplePointWriter *arg1 = (LizardTech::SimplePointWriter *) 0 ;
  LizardTech::PointData *arg2 = 0 ;
  size_t arg3 ;
  LizardTech::ProgressDelegate *arg4 = (LizardTech::ProgressDelegate *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  size_t val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__SimplePointWriter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::SimplePointWriter *","writePoints", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::SimplePointWriter * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_LizardTech__PointData,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointData const &","writePoints", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointData const &","writePoints", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< LizardTech::PointData * >(argp2);
  ecode3 = SWIG_AsVal_size_t(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","writePoints", 3, argv[1] ));
  } 
  arg3 = static_cast< size_t >(val3);
  res4 = SWIG_ConvertPtr(argv[2], &argp4,SWIGTYPE_p_LizardTech__ProgressDelegate, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "LizardTech::ProgressDelegate *","writePoints", 4, argv[2] )); 
  }
  arg4 = reinterpret_cast< LizardTech::ProgressDelegate * >(argp4);
  {
    try
    {
      (arg1)->writePoints((LizardTech::PointData const &)*arg2,arg3,arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_SimplePointWriter_writeEnd(int argc, VALUE *argv, VALUE self) {
  LizardTech::SimplePointWriter *arg1 = (LizardTech::SimplePointWriter *) 0 ;
  LizardTech::PointSource::count_type arg2 ;
  LizardTech::Bounds *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  long long val2 ;
  int ecode2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__SimplePointWriter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::SimplePointWriter *","writeEnd", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::SimplePointWriter * >(argp1);
  ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "LizardTech::PointSource::count_type","writeEnd", 2, argv[0] ));
  } 
  arg2 = static_cast< LizardTech::PointSource::count_type >(val2);
  res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_LizardTech__Bounds,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "LizardTech::Bounds const &","writeEnd", 3, argv[1] )); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::Bounds const &","writeEnd", 3, argv[1])); 
  }
  arg3 = reinterpret_cast< LizardTech::Bounds * >(argp3);
  {
    try
    {
      (arg1)->writeEnd(arg2,(LizardTech::Bounds const &)*arg3);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN void delete_LizardTech_SimplePointWriter(LizardTech::SimplePointWriter *self){
       //::fprintf(stderr, "in ~" #SimplePointWriter "\n");
       self->release();
     }
SWIGINTERN void
free_LizardTech_SimplePointWriter(LizardTech::SimplePointWriter *arg1) {
    delete_LizardTech_SimplePointWriter(arg1);
}

static swig_class SwigClassTXTPointReader;

SWIGINTERN VALUE
_wrap_TXTPointReader_init__SWIG_0(int argc, VALUE *argv, VALUE self) {
  LizardTech::TXTPointReader *arg1 = (LizardTech::TXTPointReader *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  size_t arg4 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  
  if ((argc < 4) || (argc > 4)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__TXTPointReader, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::TXTPointReader *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::TXTPointReader * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","init", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","init", 3, argv[1] ));
  }
  arg3 = reinterpret_cast< char * >(buf3);
  ecode4 = SWIG_AsVal_size_t(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","init", 4, argv[2] ));
  } 
  arg4 = static_cast< size_t >(val4);
  ecode5 = SWIG_AsVal_bool(argv[3], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "bool","init", 5, argv[3] ));
  } 
  arg5 = static_cast< bool >(val5);
  {
    try
    {
      (arg1)->init((char const *)arg2,(char const *)arg3,arg4,arg5);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_TXTPointReader_init__SWIG_1(int argc, VALUE *argv, VALUE self) {
  LizardTech::TXTPointReader *arg1 = (LizardTech::TXTPointReader *) 0 ;
  LizardTech::IO *arg2 = (LizardTech::IO *) 0 ;
  char *arg3 = (char *) 0 ;
  size_t arg4 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  
  if ((argc < 4) || (argc > 4)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__TXTPointReader, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::TXTPointReader *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::TXTPointReader * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_LizardTech__IO, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::IO *","init", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< LizardTech::IO * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","init", 3, argv[1] ));
  }
  arg3 = reinterpret_cast< char * >(buf3);
  ecode4 = SWIG_AsVal_size_t(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","init", 4, argv[2] ));
  } 
  arg4 = static_cast< size_t >(val4);
  ecode5 = SWIG_AsVal_bool(argv[3], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "bool","init", 5, argv[3] ));
  } 
  arg5 = static_cast< bool >(val5);
  {
    try
    {
      (arg1)->init(arg2,(char const *)arg3,arg4,arg5);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_TXTPointReader_init__SWIG_2(int argc, VALUE *argv, VALUE self) {
  LizardTech::TXTPointReader *arg1 = (LizardTech::TXTPointReader *) 0 ;
  char *arg2 = (char *) 0 ;
  LizardTech::PointInfo *arg3 = 0 ;
  size_t arg4 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  
  if ((argc < 4) || (argc > 4)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__TXTPointReader, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::TXTPointReader *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::TXTPointReader * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","init", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "LizardTech::PointInfo const &","init", 3, argv[1] )); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo const &","init", 3, argv[1])); 
  }
  arg3 = reinterpret_cast< LizardTech::PointInfo * >(argp3);
  ecode4 = SWIG_AsVal_size_t(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","init", 4, argv[2] ));
  } 
  arg4 = static_cast< size_t >(val4);
  ecode5 = SWIG_AsVal_bool(argv[3], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "bool","init", 5, argv[3] ));
  } 
  arg5 = static_cast< bool >(val5);
  {
    try
    {
      (arg1)->init((char const *)arg2,(LizardTech::PointInfo const &)*arg3,arg4,arg5);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_TXTPointReader_init__SWIG_3(int argc, VALUE *argv, VALUE self) {
  LizardTech::TXTPointReader *arg1 = (LizardTech::TXTPointReader *) 0 ;
  LizardTech::IO *arg2 = (LizardTech::IO *) 0 ;
  LizardTech::PointInfo *arg3 = 0 ;
  size_t arg4 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  
  if ((argc < 4) || (argc > 4)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__TXTPointReader, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::TXTPointReader *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::TXTPointReader * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_LizardTech__IO, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::IO *","init", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< LizardTech::IO * >(argp2);
  res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "LizardTech::PointInfo const &","init", 3, argv[1] )); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo const &","init", 3, argv[1])); 
  }
  arg3 = reinterpret_cast< LizardTech::PointInfo * >(argp3);
  ecode4 = SWIG_AsVal_size_t(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","init", 4, argv[2] ));
  } 
  arg4 = static_cast< size_t >(val4);
  ecode5 = SWIG_AsVal_bool(argv[3], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "bool","init", 5, argv[3] ));
  } 
  arg5 = static_cast< bool >(val5);
  {
    try
    {
      (arg1)->init(arg2,(LizardTech::PointInfo const &)*arg3,arg4,arg5);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE _wrap_TXTPointReader_init(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[6];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 6) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__TXTPointReader, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__IO, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_TXTPointReader_init__SWIG_3(nargs, args, self);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__TXTPointReader, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__IO, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_TXTPointReader_init__SWIG_1(nargs, args, self);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__TXTPointReader, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_TXTPointReader_init__SWIG_2(nargs, args, self);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__TXTPointReader, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_TXTPointReader_init__SWIG_0(nargs, args, self);
            }
          }
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 6, "TXTPointReader.init", 
    "    void TXTPointReader.init(char const *path, char const *format, size_t header, bool doFullInit)\n"
    "    void TXTPointReader.init(LizardTech::IO *io, char const *format, size_t header, bool doFullInit)\n"
    "    void TXTPointReader.init(char const *path, LizardTech::PointInfo const &fieldInfo, size_t header, bool doFullInit)\n"
    "    void TXTPointReader.init(LizardTech::IO *io, LizardTech::PointInfo const &fieldInfo, size_t header, bool doFullInit)\n");
  
  return Qnil;
}


SWIGINTERN VALUE
_wrap_TXTPointReader_initBoundsAndNumPoints(int argc, VALUE *argv, VALUE self) {
  LizardTech::TXTPointReader *arg1 = (LizardTech::TXTPointReader *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__TXTPointReader, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::TXTPointReader *","initBoundsAndNumPoints", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::TXTPointReader * >(argp1);
  {
    try
    {
      (arg1)->initBoundsAndNumPoints();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_TXTPointReader_parseFormat__SWIG_0(int argc, VALUE *argv, VALUE self) {
  char *arg1 = (char *) 0 ;
  LizardTech::PointInfo *arg2 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","LizardTech::TXTPointReader::parseFormat", 1, argv[0] ));
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointInfo &","LizardTech::TXTPointReader::parseFormat", 2, argv[1] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo &","LizardTech::TXTPointReader::parseFormat", 2, argv[1])); 
  }
  arg2 = reinterpret_cast< LizardTech::PointInfo * >(argp2);
  {
    try
    {
      LizardTech::TXTPointReader::parseFormat((char const *)arg1,*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return Qnil;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_TXTPointReader_parseFormat__SWIG_1(int argc, VALUE *argv, VALUE self) {
  char *arg1 = (char *) 0 ;
  LizardTech::PointInfo *arg2 = 0 ;
  LizardTech::PointInfo *arg3 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","LizardTech::TXTPointReader::parseFormat", 1, argv[0] ));
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointInfo &","LizardTech::TXTPointReader::parseFormat", 2, argv[1] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo &","LizardTech::TXTPointReader::parseFormat", 2, argv[1])); 
  }
  arg2 = reinterpret_cast< LizardTech::PointInfo * >(argp2);
  res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "LizardTech::PointInfo const &","LizardTech::TXTPointReader::parseFormat", 3, argv[2] )); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo const &","LizardTech::TXTPointReader::parseFormat", 3, argv[2])); 
  }
  arg3 = reinterpret_cast< LizardTech::PointInfo * >(argp3);
  {
    try
    {
      LizardTech::TXTPointReader::parseFormat((char const *)arg1,*arg2,(LizardTech::PointInfo const &)*arg3);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return Qnil;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return Qnil;
}


SWIGINTERN VALUE _wrap_TXTPointReader_parseFormat(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[3];
  int ii;
  
  argc = nargs;
  if (argc > 3) SWIG_fail;
  for (ii = 0; (ii < argc); ++ii) {
    argv[ii] = args[ii];
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_TXTPointReader_parseFormat__SWIG_0(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_TXTPointReader_parseFormat__SWIG_1(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 3, "TXTPointReader.parseFormat", 
    "    void TXTPointReader.parseFormat(char const *format, LizardTech::PointInfo &fieldInfo)\n"
    "    void TXTPointReader.parseFormat(char const *format, LizardTech::PointInfo &fieldInfo, LizardTech::PointInfo const &pointInfo)\n");
  
  return Qnil;
}


SWIGINTERN VALUE
_wrap_TXTPointReader_parseQuantization(int argc, VALUE *argv, VALUE self) {
  char *arg1 = (char *) 0 ;
  LizardTech::PointInfo *arg2 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","LizardTech::TXTPointReader::parseQuantization", 1, argv[0] ));
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointInfo &","LizardTech::TXTPointReader::parseQuantization", 2, argv[1] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo &","LizardTech::TXTPointReader::parseQuantization", 2, argv[1])); 
  }
  arg2 = reinterpret_cast< LizardTech::PointInfo * >(argp2);
  {
    try
    {
      LizardTech::TXTPointReader::parseQuantization((char const *)arg1,*arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return Qnil;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return Qnil;
}


SWIGINTERN void delete_LizardTech_TXTPointReader(LizardTech::TXTPointReader *self){
       //::fprintf(stderr, "in ~" #TXTPointReader "\n");
       self->release();
     }
SWIGINTERN void
free_LizardTech_TXTPointReader(LizardTech::TXTPointReader *arg1) {
    delete_LizardTech_TXTPointReader(arg1);
}

#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
_wrap_TXTPointReader_allocate(VALUE self) {
#else
  SWIGINTERN VALUE
  _wrap_TXTPointReader_allocate(int argc, VALUE *argv, VALUE self) {
#endif
    
    
    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LizardTech__TXTPointReader);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
    rb_obj_call_init(vresult, argc, argv);
#endif
    return vresult;
  }
  

SWIGINTERN VALUE
_wrap_new_TXTPointReader(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "LidarDSDK::TXTPointReader";
  LizardTech::TXTPointReader *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (LizardTech::TXTPointReader *)new_LizardTech_TXTPointReader();
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  
  return self;
fail:
  return Qnil;
}


static swig_class SwigClassTXTPointWriter;

SWIGINTERN VALUE
_wrap_TXTPointWriter_init__SWIG_0(int argc, VALUE *argv, VALUE self) {
  LizardTech::TXTPointWriter *arg1 = (LizardTech::TXTPointWriter *) 0 ;
  LizardTech::PointSource *arg2 = (LizardTech::PointSource *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__TXTPointWriter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::TXTPointWriter *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::TXTPointWriter * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","init", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< LizardTech::PointSource * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","init", 3, argv[1] ));
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(argv[2], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","init", 4, argv[2] ));
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    try
    {
      (arg1)->init((LizardTech::PointSource const *)arg2,(char const *)arg3,(char const *)arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return Qnil;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_TXTPointWriter_init__SWIG_1(int argc, VALUE *argv, VALUE self) {
  LizardTech::TXTPointWriter *arg1 = (LizardTech::TXTPointWriter *) 0 ;
  LizardTech::PointSource *arg2 = (LizardTech::PointSource *) 0 ;
  LizardTech::IO *arg3 = (LizardTech::IO *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__TXTPointWriter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::TXTPointWriter *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::TXTPointWriter * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","init", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< LizardTech::PointSource * >(argp2);
  res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_LizardTech__IO, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "LizardTech::IO *","init", 3, argv[1] )); 
  }
  arg3 = reinterpret_cast< LizardTech::IO * >(argp3);
  res4 = SWIG_AsCharPtrAndSize(argv[2], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","init", 4, argv[2] ));
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    try
    {
      (arg1)->init((LizardTech::PointSource const *)arg2,arg3,(char const *)arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return Qnil;
fail:
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_TXTPointWriter_init__SWIG_2(int argc, VALUE *argv, VALUE self) {
  LizardTech::TXTPointWriter *arg1 = (LizardTech::TXTPointWriter *) 0 ;
  LizardTech::PointSource *arg2 = (LizardTech::PointSource *) 0 ;
  char *arg3 = (char *) 0 ;
  LizardTech::PointInfo *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__TXTPointWriter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::TXTPointWriter *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::TXTPointWriter * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","init", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< LizardTech::PointSource * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","init", 3, argv[1] ));
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_ConvertPtr(argv[2], &argp4, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "LizardTech::PointInfo const &","init", 4, argv[2] )); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo const &","init", 4, argv[2])); 
  }
  arg4 = reinterpret_cast< LizardTech::PointInfo * >(argp4);
  {
    try
    {
      (arg1)->init((LizardTech::PointSource const *)arg2,(char const *)arg3,(LizardTech::PointInfo const &)*arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_TXTPointWriter_init__SWIG_3(int argc, VALUE *argv, VALUE self) {
  LizardTech::TXTPointWriter *arg1 = (LizardTech::TXTPointWriter *) 0 ;
  LizardTech::PointSource *arg2 = (LizardTech::PointSource *) 0 ;
  LizardTech::IO *arg3 = (LizardTech::IO *) 0 ;
  LizardTech::PointInfo *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__TXTPointWriter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::TXTPointWriter *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::TXTPointWriter * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_LizardTech__PointSource, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::PointSource const *","init", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< LizardTech::PointSource * >(argp2);
  res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_LizardTech__IO, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "LizardTech::IO *","init", 3, argv[1] )); 
  }
  arg3 = reinterpret_cast< LizardTech::IO * >(argp3);
  res4 = SWIG_ConvertPtr(argv[2], &argp4, SWIGTYPE_p_LizardTech__PointInfo,  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "LizardTech::PointInfo const &","init", 4, argv[2] )); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "LizardTech::PointInfo const &","init", 4, argv[2])); 
  }
  arg4 = reinterpret_cast< LizardTech::PointInfo * >(argp4);
  {
    try
    {
      (arg1)->init((LizardTech::PointSource const *)arg2,arg3,(LizardTech::PointInfo const &)*arg4);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE _wrap_TXTPointWriter_init(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[5];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 5) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__TXTPointWriter, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__PointSource, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_LizardTech__IO, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_TXTPointWriter_init__SWIG_3(nargs, args, self);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__TXTPointWriter, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__PointSource, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_LizardTech__IO, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_TXTPointWriter_init__SWIG_1(nargs, args, self);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__TXTPointWriter, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__PointSource, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_LizardTech__PointInfo, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_TXTPointWriter_init__SWIG_2(nargs, args, self);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__TXTPointWriter, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__PointSource, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_TXTPointWriter_init__SWIG_0(nargs, args, self);
          }
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 5, "TXTPointWriter.init", 
    "    void TXTPointWriter.init(LizardTech::PointSource const *src, char const *path, char const *format)\n"
    "    void TXTPointWriter.init(LizardTech::PointSource const *src, LizardTech::IO *io, char const *format)\n"
    "    void TXTPointWriter.init(LizardTech::PointSource const *src, char const *path, LizardTech::PointInfo const &fieldInfo)\n"
    "    void TXTPointWriter.init(LizardTech::PointSource const *src, LizardTech::IO *io, LizardTech::PointInfo const &fieldInfo)\n");
  
  return Qnil;
}


SWIGINTERN void delete_LizardTech_TXTPointWriter(LizardTech::TXTPointWriter *self){
       //::fprintf(stderr, "in ~" #TXTPointWriter "\n");
       self->release();
     }
SWIGINTERN void
free_LizardTech_TXTPointWriter(LizardTech::TXTPointWriter *arg1) {
    delete_LizardTech_TXTPointWriter(arg1);
}

#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
_wrap_TXTPointWriter_allocate(VALUE self) {
#else
  SWIGINTERN VALUE
  _wrap_TXTPointWriter_allocate(int argc, VALUE *argv, VALUE self) {
#endif
    
    
    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LizardTech__TXTPointWriter);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
    rb_obj_call_init(vresult, argc, argv);
#endif
    return vresult;
  }
  

SWIGINTERN VALUE
_wrap_new_TXTPointWriter(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "LidarDSDK::TXTPointWriter";
  LizardTech::TXTPointWriter *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (LizardTech::TXTPointWriter *)new_LizardTech_TXTPointWriter();
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  
  return self;
fail:
  return Qnil;
}


static swig_class SwigClassVersion;

SWIGINTERN VALUE
_wrap_Version_getSDKMajorVersion(int argc, VALUE *argv, VALUE self) {
  int result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (int)LizardTech::Version::getSDKMajorVersion();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_int(static_cast< int >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Version_getSDKMinorVersion(int argc, VALUE *argv, VALUE self) {
  int result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (int)LizardTech::Version::getSDKMinorVersion();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_int(static_cast< int >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Version_getSDKVersionAge(int argc, VALUE *argv, VALUE self) {
  int result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (int)LizardTech::Version::getSDKVersionAge();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_int(static_cast< int >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Version_getSDKBuildNumber(int argc, VALUE *argv, VALUE self) {
  int result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (int)LizardTech::Version::getSDKBuildNumber();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_From_int(static_cast< int >(result));
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Version_getSDKVersionString(int argc, VALUE *argv, VALUE self) {
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (char *)LizardTech::Version::getSDKVersionString();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_FromCharPtr((const char *)result);
  return vresult;
fail:
  return Qnil;
}


SWIGINTERN VALUE
_wrap_Version_getSDKBuildDate(int argc, VALUE *argv, VALUE self) {
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (char *)LizardTech::Version::getSDKBuildDate();
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  vresult = SWIG_FromCharPtr((const char *)result);
  return vresult;
fail:
  return Qnil;
}


#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
_wrap_Version_allocate(VALUE self) {
#else
  SWIGINTERN VALUE
  _wrap_Version_allocate(int argc, VALUE *argv, VALUE self) {
#endif
    
    
    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LizardTech__Version);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
    rb_obj_call_init(vresult, argc, argv);
#endif
    return vresult;
  }
  

SWIGINTERN VALUE
_wrap_new_Version(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "LidarDSDK::Version";
  LizardTech::Version *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (LizardTech::Version *)new LizardTech::Version();
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return self;
fail:
  return Qnil;
}


SWIGINTERN void
free_LizardTech_Version(LizardTech::Version *arg1) {
    delete arg1;
}

static swig_class SwigClassMG4PointReader;

SWIGINTERN VALUE
_wrap_MG4PointReader_init__SWIG_0(int argc, VALUE *argv, VALUE self) {
  LizardTech::MG4PointReader *arg1 = (LizardTech::MG4PointReader *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__MG4PointReader, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::MG4PointReader *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::MG4PointReader * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","init", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try
    {
      (arg1)->init((char const *)arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return Qnil;
}


SWIGINTERN VALUE
_wrap_MG4PointReader_init__SWIG_1(int argc, VALUE *argv, VALUE self) {
  LizardTech::MG4PointReader *arg1 = (LizardTech::MG4PointReader *) 0 ;
  LizardTech::IO *arg2 = (LizardTech::IO *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LizardTech__MG4PointReader, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "LizardTech::MG4PointReader *","init", 1, self )); 
  }
  arg1 = reinterpret_cast< LizardTech::MG4PointReader * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_LizardTech__IO, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "LizardTech::IO *","init", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< LizardTech::IO * >(argp2);
  {
    try
    {
      (arg1)->init(arg2);
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}


SWIGINTERN VALUE _wrap_MG4PointReader_init(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[3];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 3) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__MG4PointReader, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_LizardTech__IO, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_MG4PointReader_init__SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_LizardTech__MG4PointReader, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_MG4PointReader_init__SWIG_0(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 3, "MG4PointReader.init", 
    "    void MG4PointReader.init(char const *path)\n"
    "    void MG4PointReader.init(LizardTech::IO *io)\n");
  
  return Qnil;
}


SWIGINTERN void delete_LizardTech_MG4PointReader(LizardTech::MG4PointReader *self){
       //::fprintf(stderr, "in ~" #MG4PointReader "\n");
       self->release();
     }
SWIGINTERN void
free_LizardTech_MG4PointReader(LizardTech::MG4PointReader *arg1) {
    delete_LizardTech_MG4PointReader(arg1);
}

#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
_wrap_MG4PointReader_allocate(VALUE self) {
#else
  SWIGINTERN VALUE
  _wrap_MG4PointReader_allocate(int argc, VALUE *argv, VALUE self) {
#endif
    
    
    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LizardTech__MG4PointReader);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
    rb_obj_call_init(vresult, argc, argv);
#endif
    return vresult;
  }
  

SWIGINTERN VALUE
_wrap_new_MG4PointReader(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "LidarDSDK::MG4PointReader";
  LizardTech::MG4PointReader *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try
    {
      result = (LizardTech::MG4PointReader *)new_LizardTech_MG4PointReader();
      DATA_PTR(self) = result;
    }
    catch(std::exception &err)
    {
      SWIG_exception(SWIG_RuntimeError, err.what());
    }
    catch(...)
    {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  
  return self;
fail:
  return Qnil;
}



/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static void *_p_LizardTech__TXTPointReaderTo_p_LizardTech__PointReader(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::PointReader *)  ((LizardTech::TXTPointReader *) x));
}
static void *_p_LizardTech__MG4PointReaderTo_p_LizardTech__PointReader(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::PointReader *)  ((LizardTech::MG4PointReader *) x));
}
static void *_p_LizardTech__SimplePointWriterTo_p_LizardTech__PointWriter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::PointWriter *)  ((LizardTech::SimplePointWriter *) x));
}
static void *_p_LizardTech__TXTPointWriterTo_p_LizardTech__PointWriter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::PointWriter *) (LizardTech::SimplePointWriter *) ((LizardTech::TXTPointWriter *) x));
}
static void *_p_LizardTech__TXTPointWriterTo_p_LizardTech__SimplePointWriter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::SimplePointWriter *)  ((LizardTech::TXTPointWriter *) x));
}
static void *_p_LizardTech__PercentProgressDelegateTo_p_LizardTech__ProgressDelegate(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::ProgressDelegate *)  ((LizardTech::PercentProgressDelegate *) x));
}
static void *_p_LizardTech__ChannelDataTo_p_LizardTech__ChannelInfo(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::ChannelInfo *)  ((LizardTech::ChannelData *) x));
}
static void *_p_LizardTech__PointReaderTo_p_LizardTech__PointSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::PointSource *)  ((LizardTech::PointReader *) x));
}
static void *_p_LizardTech__TXTPointReaderTo_p_LizardTech__PointSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::PointSource *) (LizardTech::PointReader *) ((LizardTech::TXTPointReader *) x));
}
static void *_p_LizardTech__MG4PointReaderTo_p_LizardTech__PointSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::PointSource *) (LizardTech::PointReader *) ((LizardTech::MG4PointReader *) x));
}
static void *_p_LizardTech__FileIOTo_p_LizardTech__Object(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::Object *) (LizardTech::IO *) ((LizardTech::FileIO *) x));
}
static void *_p_LizardTech__IOTo_p_LizardTech__Object(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::Object *)  ((LizardTech::IO *) x));
}
static void *_p_LizardTech__PointSourceTo_p_LizardTech__Object(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::Object *)  ((LizardTech::PointSource *) x));
}
static void *_p_LizardTech__PointReaderTo_p_LizardTech__Object(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::Object *) (LizardTech::PointSource *) ((LizardTech::PointReader *) x));
}
static void *_p_LizardTech__TXTPointReaderTo_p_LizardTech__Object(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::Object *) (LizardTech::PointSource *)(LizardTech::PointReader *) ((LizardTech::TXTPointReader *) x));
}
static void *_p_LizardTech__MG4PointReaderTo_p_LizardTech__Object(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::Object *) (LizardTech::PointSource *)(LizardTech::PointReader *) ((LizardTech::MG4PointReader *) x));
}
static void *_p_LizardTech__PointIteratorTo_p_LizardTech__Object(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::Object *)  ((LizardTech::PointIterator *) x));
}
static void *_p_LizardTech__PointWriterTo_p_LizardTech__Object(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::Object *)  ((LizardTech::PointWriter *) x));
}
static void *_p_LizardTech__SimplePointWriterTo_p_LizardTech__Object(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::Object *) (LizardTech::PointWriter *) ((LizardTech::SimplePointWriter *) x));
}
static void *_p_LizardTech__TXTPointWriterTo_p_LizardTech__Object(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::Object *) (LizardTech::PointWriter *)(LizardTech::SimplePointWriter *) ((LizardTech::TXTPointWriter *) x));
}
static void *_p_LizardTech__FileIOTo_p_LizardTech__IO(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((LizardTech::IO *)  ((LizardTech::FileIO *) x));
}
static swig_type_info _swigt__p_LizardTech__Bounds = {"_p_LizardTech__Bounds", "LizardTech::Bounds *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__ChannelData = {"_p_LizardTech__ChannelData", "LizardTech::ChannelData *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__ChannelInfo = {"_p_LizardTech__ChannelInfo", "LizardTech::ChannelInfo *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__DataTypeUtils = {"_p_LizardTech__DataTypeUtils", "LizardTech::DataTypeUtils *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__FileIO = {"_p_LizardTech__FileIO", "LizardTech::FileIO *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__IO = {"_p_LizardTech__IO", "LizardTech::IO *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__MG4PointReader = {"_p_LizardTech__MG4PointReader", "LizardTech::MG4PointReader *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__Metadata = {"_p_LizardTech__Metadata", "LizardTech::Metadata *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__Object = {"_p_LizardTech__Object", "LizardTech::Object *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__PercentProgressDelegate = {"_p_LizardTech__PercentProgressDelegate", "LizardTech::PercentProgressDelegate *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__PointData = {"_p_LizardTech__PointData", "LizardTech::PointData *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__PointInfo = {"_p_LizardTech__PointInfo", "LizardTech::PointInfo *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__PointIterator = {"_p_LizardTech__PointIterator", "LizardTech::PointIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__PointReader = {"_p_LizardTech__PointReader", "LizardTech::PointReader *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__PointSource = {"_p_LizardTech__PointSource", "LizardTech::PointSource *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__PointWriter = {"_p_LizardTech__PointWriter", "LizardTech::PointWriter *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__ProgressDelegate = {"_p_LizardTech__ProgressDelegate", "LizardTech::ProgressDelegate *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__Range = {"_p_LizardTech__Range", "LizardTech::Range *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__SimplePointWriter = {"_p_LizardTech__SimplePointWriter", "LizardTech::SimplePointWriter *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__TXTPointReader = {"_p_LizardTech__TXTPointReader", "LizardTech::TXTPointReader *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__TXTPointWriter = {"_p_LizardTech__TXTPointWriter", "LizardTech::TXTPointWriter *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LizardTech__Version = {"_p_LizardTech__Version", "LizardTech::Version *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_count_type = {"_p_count_type", "count_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "int *|lt_int32 *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_long_long = {"_p_long_long", "lt_int64 *|long long *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_offset_type = {"_p_offset_type", "offset_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_short = {"_p_short", "lt_int16 *|short *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|lt_int8 *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|lt_uint8 *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "lt_uint32 *|unsigned int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "lt_uint64 *|unsigned long long *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "lt_uint16 *|unsigned short *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_wchar_t = {"_p_wchar_t", "wchar_t *", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_LizardTech__Bounds,
  &_swigt__p_LizardTech__ChannelData,
  &_swigt__p_LizardTech__ChannelInfo,
  &_swigt__p_LizardTech__DataTypeUtils,
  &_swigt__p_LizardTech__FileIO,
  &_swigt__p_LizardTech__IO,
  &_swigt__p_LizardTech__MG4PointReader,
  &_swigt__p_LizardTech__Metadata,
  &_swigt__p_LizardTech__Object,
  &_swigt__p_LizardTech__PercentProgressDelegate,
  &_swigt__p_LizardTech__PointData,
  &_swigt__p_LizardTech__PointInfo,
  &_swigt__p_LizardTech__PointIterator,
  &_swigt__p_LizardTech__PointReader,
  &_swigt__p_LizardTech__PointSource,
  &_swigt__p_LizardTech__PointWriter,
  &_swigt__p_LizardTech__ProgressDelegate,
  &_swigt__p_LizardTech__Range,
  &_swigt__p_LizardTech__SimplePointWriter,
  &_swigt__p_LizardTech__TXTPointReader,
  &_swigt__p_LizardTech__TXTPointWriter,
  &_swigt__p_LizardTech__Version,
  &_swigt__p_char,
  &_swigt__p_count_type,
  &_swigt__p_double,
  &_swigt__p_int,
  &_swigt__p_long_long,
  &_swigt__p_offset_type,
  &_swigt__p_p_char,
  &_swigt__p_short,
  &_swigt__p_signed_char,
  &_swigt__p_size_t,
  &_swigt__p_unsigned_char,
  &_swigt__p_unsigned_int,
  &_swigt__p_unsigned_long_long,
  &_swigt__p_unsigned_short,
  &_swigt__p_wchar_t,
};

static swig_cast_info _swigc__p_LizardTech__Bounds[] = {  {&_swigt__p_LizardTech__Bounds, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__ChannelData[] = {  {&_swigt__p_LizardTech__ChannelData, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__ChannelInfo[] = {  {&_swigt__p_LizardTech__ChannelInfo, 0, 0, 0},  {&_swigt__p_LizardTech__ChannelData, _p_LizardTech__ChannelDataTo_p_LizardTech__ChannelInfo, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__DataTypeUtils[] = {  {&_swigt__p_LizardTech__DataTypeUtils, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__FileIO[] = {  {&_swigt__p_LizardTech__FileIO, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__IO[] = {  {&_swigt__p_LizardTech__IO, 0, 0, 0},  {&_swigt__p_LizardTech__FileIO, _p_LizardTech__FileIOTo_p_LizardTech__IO, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__MG4PointReader[] = {  {&_swigt__p_LizardTech__MG4PointReader, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__Metadata[] = {  {&_swigt__p_LizardTech__Metadata, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__Object[] = {  {&_swigt__p_LizardTech__IO, _p_LizardTech__IOTo_p_LizardTech__Object, 0, 0},  {&_swigt__p_LizardTech__FileIO, _p_LizardTech__FileIOTo_p_LizardTech__Object, 0, 0},  {&_swigt__p_LizardTech__PointSource, _p_LizardTech__PointSourceTo_p_LizardTech__Object, 0, 0},  {&_swigt__p_LizardTech__PointReader, _p_LizardTech__PointReaderTo_p_LizardTech__Object, 0, 0},  {&_swigt__p_LizardTech__TXTPointReader, _p_LizardTech__TXTPointReaderTo_p_LizardTech__Object, 0, 0},  {&_swigt__p_LizardTech__MG4PointReader, _p_LizardTech__MG4PointReaderTo_p_LizardTech__Object, 0, 0},  {&_swigt__p_LizardTech__PointIterator, _p_LizardTech__PointIteratorTo_p_LizardTech__Object, 0, 0},  {&_swigt__p_LizardTech__Object, 0, 0, 0},  {&_swigt__p_LizardTech__PointWriter, _p_LizardTech__PointWriterTo_p_LizardTech__Object, 0, 0},  {&_swigt__p_LizardTech__SimplePointWriter, _p_LizardTech__SimplePointWriterTo_p_LizardTech__Object, 0, 0},  {&_swigt__p_LizardTech__TXTPointWriter, _p_LizardTech__TXTPointWriterTo_p_LizardTech__Object, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__PercentProgressDelegate[] = {  {&_swigt__p_LizardTech__PercentProgressDelegate, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__PointData[] = {  {&_swigt__p_LizardTech__PointData, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__PointInfo[] = {  {&_swigt__p_LizardTech__PointInfo, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__PointIterator[] = {  {&_swigt__p_LizardTech__PointIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__PointReader[] = {  {&_swigt__p_LizardTech__PointReader, 0, 0, 0},  {&_swigt__p_LizardTech__TXTPointReader, _p_LizardTech__TXTPointReaderTo_p_LizardTech__PointReader, 0, 0},  {&_swigt__p_LizardTech__MG4PointReader, _p_LizardTech__MG4PointReaderTo_p_LizardTech__PointReader, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__PointSource[] = {  {&_swigt__p_LizardTech__PointSource, 0, 0, 0},  {&_swigt__p_LizardTech__PointReader, _p_LizardTech__PointReaderTo_p_LizardTech__PointSource, 0, 0},  {&_swigt__p_LizardTech__TXTPointReader, _p_LizardTech__TXTPointReaderTo_p_LizardTech__PointSource, 0, 0},  {&_swigt__p_LizardTech__MG4PointReader, _p_LizardTech__MG4PointReaderTo_p_LizardTech__PointSource, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__PointWriter[] = {  {&_swigt__p_LizardTech__PointWriter, 0, 0, 0},  {&_swigt__p_LizardTech__SimplePointWriter, _p_LizardTech__SimplePointWriterTo_p_LizardTech__PointWriter, 0, 0},  {&_swigt__p_LizardTech__TXTPointWriter, _p_LizardTech__TXTPointWriterTo_p_LizardTech__PointWriter, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__ProgressDelegate[] = {  {&_swigt__p_LizardTech__ProgressDelegate, 0, 0, 0},  {&_swigt__p_LizardTech__PercentProgressDelegate, _p_LizardTech__PercentProgressDelegateTo_p_LizardTech__ProgressDelegate, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__Range[] = {  {&_swigt__p_LizardTech__Range, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__SimplePointWriter[] = {  {&_swigt__p_LizardTech__SimplePointWriter, 0, 0, 0},  {&_swigt__p_LizardTech__TXTPointWriter, _p_LizardTech__TXTPointWriterTo_p_LizardTech__SimplePointWriter, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__TXTPointReader[] = {  {&_swigt__p_LizardTech__TXTPointReader, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__TXTPointWriter[] = {  {&_swigt__p_LizardTech__TXTPointWriter, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LizardTech__Version[] = {  {&_swigt__p_LizardTech__Version, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_count_type[] = {  {&_swigt__p_count_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_long_long[] = {  {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_offset_type[] = {  {&_swigt__p_offset_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_short[] = {  {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_signed_char[] = {  {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_size_t[] = {  {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_int[] = {  {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_long_long[] = {  {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_short[] = {  {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_wchar_t[] = {  {&_swigt__p_wchar_t, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_LizardTech__Bounds,
  _swigc__p_LizardTech__ChannelData,
  _swigc__p_LizardTech__ChannelInfo,
  _swigc__p_LizardTech__DataTypeUtils,
  _swigc__p_LizardTech__FileIO,
  _swigc__p_LizardTech__IO,
  _swigc__p_LizardTech__MG4PointReader,
  _swigc__p_LizardTech__Metadata,
  _swigc__p_LizardTech__Object,
  _swigc__p_LizardTech__PercentProgressDelegate,
  _swigc__p_LizardTech__PointData,
  _swigc__p_LizardTech__PointInfo,
  _swigc__p_LizardTech__PointIterator,
  _swigc__p_LizardTech__PointReader,
  _swigc__p_LizardTech__PointSource,
  _swigc__p_LizardTech__PointWriter,
  _swigc__p_LizardTech__ProgressDelegate,
  _swigc__p_LizardTech__Range,
  _swigc__p_LizardTech__SimplePointWriter,
  _swigc__p_LizardTech__TXTPointReader,
  _swigc__p_LizardTech__TXTPointWriter,
  _swigc__p_LizardTech__Version,
  _swigc__p_char,
  _swigc__p_count_type,
  _swigc__p_double,
  _swigc__p_int,
  _swigc__p_long_long,
  _swigc__p_offset_type,
  _swigc__p_p_char,
  _swigc__p_short,
  _swigc__p_signed_char,
  _swigc__p_size_t,
  _swigc__p_unsigned_char,
  _swigc__p_unsigned_int,
  _swigc__p_unsigned_long_long,
  _swigc__p_unsigned_short,
  _swigc__p_wchar_t,
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is tough by the requirement that no dynamic 
 * memory is used. Also, since swig_type_info structures store pointers to 
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization. 
 * The idea is that swig generates all the structures that are needed. 
 * The runtime then collects these partially filled structures. 
 * The SWIG_InitializeModule function takes these initial arrays out of 
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned staticly to an initial 
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast linked list. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it 
 * adding the casts to the list. The one last trick we need to do is making
 * sure the type pointer in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded. 
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the 
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the linked list (because the cast->type) pointer will
 *     be correct.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#if 0
} /* c-mode */
#endif
#endif

#if 0
#define SWIGRUNTIME_DEBUG
#endif


SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int found, init;
  (void *)clientdata;

  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }

  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
    module_head = &swig_module;
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    found=0;
    iter=module_head;
    do {
      if (iter==&swig_module) {
        found=1;
        break;
      }
      iter=iter->next;
    } while (iter!= module_head);

    /* if the is found in the list, then all is done and we may leave */
    if (found) return;
    /* otherwise we must add out module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }

  /* When multiple interpeters are used, a module could have already been initialized in
     a different interpreter, but not yet have a pointer in this interpreter.
     In this case, we do not want to continue adding types... everything should be
     set up already */
  if (init == 0) return;

  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *ret;
    swig_cast_info *cast;
  
#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
#endif

    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
	type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }

    /* Insert casting types */
    cast = swig_module.cast_initial[i];
    while (cast->type) {
    
      /* Don't need to add information already in the list */
      ret = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
#ifdef SWIGRUNTIME_DEBUG
	if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
#endif
      }
      if (ret) {
	if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
	  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
#endif
	  cast->type = ret;
	  ret = 0;
	} else {
	  /* Check for casting already in the list */
	  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
#ifdef SWIGRUNTIME_DEBUG
	  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
#endif
	  if (!ocast) ret = 0;
	}
      }

      if (!ret) {
#ifdef SWIGRUNTIME_DEBUG
	printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = cast;
      }
      cast++;
    }
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;

#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
  printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  swig_cast_info *equiv;
  static int init_run = 0;

  if (init_run) return;
  init_run = 1;

  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      equiv = swig_module.types[i]->cast;
      while (equiv) {
        if (!equiv->converter) {
          if (equiv->type && !equiv->type->clientdata)
            SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
        }
        equiv = equiv->next;
      }
    }
  }
}

#ifdef __cplusplus
#if 0
{ /* c-mode */
#endif
}
#endif

/*

*/
#ifdef __cplusplus
extern "C"
#endif
SWIGEXPORT void Init_LidarDSDK(void) {
  size_t i;
  
  SWIG_InitRuntime();
  mLidarDSDK = rb_define_module("LidarDSDK");
  
  SWIG_InitializeModule(0);
  for (i = 0; i < swig_module.size; i++) {
    SWIG_define_class(swig_module.types[i]);
  }
  
  SWIG_RubyInitializeTrackings();
  
  SwigClassRange.klass = rb_define_class_under(mLidarDSDK, "Range", rb_cObject);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__Range, (void *) &SwigClassRange);
  rb_define_alloc_func(SwigClassRange.klass, _wrap_Range_allocate);
  rb_define_method(SwigClassRange.klass, "initialize", VALUEFUNC(_wrap_new_Range), -1);
  rb_define_method(SwigClassRange.klass, "min=", VALUEFUNC(_wrap_Range_min_set), -1);
  rb_define_method(SwigClassRange.klass, "min", VALUEFUNC(_wrap_Range_min_get), -1);
  rb_define_method(SwigClassRange.klass, "max=", VALUEFUNC(_wrap_Range_max_set), -1);
  rb_define_method(SwigClassRange.klass, "max", VALUEFUNC(_wrap_Range_max_get), -1);
  rb_define_method(SwigClassRange.klass, "==", VALUEFUNC(_wrap_Range___eq__), -1);
  rb_define_method(SwigClassRange.klass, "contains", VALUEFUNC(_wrap_Range_contains), -1);
  rb_define_method(SwigClassRange.klass, "overlaps", VALUEFUNC(_wrap_Range_overlaps), -1);
  rb_define_method(SwigClassRange.klass, "empty", VALUEFUNC(_wrap_Range_empty), -1);
  rb_define_method(SwigClassRange.klass, "length", VALUEFUNC(_wrap_Range_length), -1);
  rb_define_method(SwigClassRange.klass, "shift", VALUEFUNC(_wrap_Range_shift), -1);
  rb_define_method(SwigClassRange.klass, "scale", VALUEFUNC(_wrap_Range_scale), -1);
  rb_define_method(SwigClassRange.klass, "clip", VALUEFUNC(_wrap_Range_clip), -1);
  rb_define_method(SwigClassRange.klass, "grow", VALUEFUNC(_wrap_Range_grow), -1);
  SwigClassRange.mark = 0;
  SwigClassRange.destroy = (void (*)(void *)) free_LizardTech_Range;
  SwigClassRange.trackObjects = 0;
  
  SwigClassBounds.klass = rb_define_class_under(mLidarDSDK, "Bounds", rb_cObject);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__Bounds, (void *) &SwigClassBounds);
  rb_define_alloc_func(SwigClassBounds.klass, _wrap_Bounds_allocate);
  rb_define_method(SwigClassBounds.klass, "initialize", VALUEFUNC(_wrap_new_Bounds), -1);
  rb_define_method(SwigClassBounds.klass, "x=", VALUEFUNC(_wrap_Bounds_x_set), -1);
  rb_define_method(SwigClassBounds.klass, "x", VALUEFUNC(_wrap_Bounds_x_get), -1);
  rb_define_method(SwigClassBounds.klass, "y=", VALUEFUNC(_wrap_Bounds_y_set), -1);
  rb_define_method(SwigClassBounds.klass, "y", VALUEFUNC(_wrap_Bounds_y_get), -1);
  rb_define_method(SwigClassBounds.klass, "z=", VALUEFUNC(_wrap_Bounds_z_set), -1);
  rb_define_method(SwigClassBounds.klass, "z", VALUEFUNC(_wrap_Bounds_z_get), -1);
  rb_define_singleton_method(SwigClassBounds.klass, "Huge", VALUEFUNC(_wrap_Bounds_Huge), -1);
  rb_define_method(SwigClassBounds.klass, "==", VALUEFUNC(_wrap_Bounds___eq__), -1);
  rb_define_method(SwigClassBounds.klass, "contains", VALUEFUNC(_wrap_Bounds_contains), -1);
  rb_define_method(SwigClassBounds.klass, "overlaps", VALUEFUNC(_wrap_Bounds_overlaps), -1);
  rb_define_method(SwigClassBounds.klass, "empty", VALUEFUNC(_wrap_Bounds_empty), -1);
  rb_define_method(SwigClassBounds.klass, "volume", VALUEFUNC(_wrap_Bounds_volume), -1);
  rb_define_method(SwigClassBounds.klass, "shift", VALUEFUNC(_wrap_Bounds_shift), -1);
  rb_define_method(SwigClassBounds.klass, "scale", VALUEFUNC(_wrap_Bounds_scale), -1);
  rb_define_method(SwigClassBounds.klass, "clip", VALUEFUNC(_wrap_Bounds_clip), -1);
  rb_define_method(SwigClassBounds.klass, "grow", VALUEFUNC(_wrap_Bounds_grow), -1);
  rb_define_singleton_method(SwigClassBounds.klass, "overlapFraction", VALUEFUNC(_wrap_Bounds_overlapFraction), -1);
  SwigClassBounds.mark = 0;
  SwigClassBounds.destroy = (void (*)(void *)) free_LizardTech_Bounds;
  SwigClassBounds.trackObjects = 0;
  rb_define_const(mLidarDSDK, "DATATYPE_INVALID", SWIG_From_int(static_cast< int >(LizardTech::DATATYPE_INVALID)));
  rb_define_const(mLidarDSDK, "DATATYPE_UINT8", SWIG_From_int(static_cast< int >(LizardTech::DATATYPE_UINT8)));
  rb_define_const(mLidarDSDK, "DATATYPE_SINT8", SWIG_From_int(static_cast< int >(LizardTech::DATATYPE_SINT8)));
  rb_define_const(mLidarDSDK, "DATATYPE_UINT16", SWIG_From_int(static_cast< int >(LizardTech::DATATYPE_UINT16)));
  rb_define_const(mLidarDSDK, "DATATYPE_SINT16", SWIG_From_int(static_cast< int >(LizardTech::DATATYPE_SINT16)));
  rb_define_const(mLidarDSDK, "DATATYPE_UINT32", SWIG_From_int(static_cast< int >(LizardTech::DATATYPE_UINT32)));
  rb_define_const(mLidarDSDK, "DATATYPE_SINT32", SWIG_From_int(static_cast< int >(LizardTech::DATATYPE_SINT32)));
  rb_define_const(mLidarDSDK, "DATATYPE_UINT64", SWIG_From_int(static_cast< int >(LizardTech::DATATYPE_UINT64)));
  rb_define_const(mLidarDSDK, "DATATYPE_SINT64", SWIG_From_int(static_cast< int >(LizardTech::DATATYPE_SINT64)));
  rb_define_const(mLidarDSDK, "DATATYPE_FLOAT32", SWIG_From_int(static_cast< int >(LizardTech::DATATYPE_FLOAT32)));
  rb_define_const(mLidarDSDK, "DATATYPE_FLOAT64", SWIG_From_int(static_cast< int >(LizardTech::DATATYPE_FLOAT64)));
  
  SwigClassDataTypeUtils.klass = rb_define_class_under(mLidarDSDK, "DataTypeUtils", rb_cObject);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__DataTypeUtils, (void *) &SwigClassDataTypeUtils);
  rb_define_alloc_func(SwigClassDataTypeUtils.klass, _wrap_DataTypeUtils_allocate);
  rb_define_method(SwigClassDataTypeUtils.klass, "initialize", VALUEFUNC(_wrap_new_DataTypeUtils), -1);
  rb_define_singleton_method(SwigClassDataTypeUtils.klass, "isSigned", VALUEFUNC(_wrap_DataTypeUtils_isSigned), -1);
  rb_define_singleton_method(SwigClassDataTypeUtils.klass, "isFloat", VALUEFUNC(_wrap_DataTypeUtils_isFloat), -1);
  rb_define_singleton_method(SwigClassDataTypeUtils.klass, "byteWidth", VALUEFUNC(_wrap_DataTypeUtils_byteWidth), -1);
  rb_define_singleton_method(SwigClassDataTypeUtils.klass, "toString", VALUEFUNC(_wrap_DataTypeUtils_toString), -1);
  rb_define_singleton_method(SwigClassDataTypeUtils.klass, "toDataType", VALUEFUNC(_wrap_DataTypeUtils_toDataType), -1);
  SwigClassDataTypeUtils.mark = 0;
  SwigClassDataTypeUtils.destroy = (void (*)(void *)) free_LizardTech_DataTypeUtils;
  SwigClassDataTypeUtils.trackObjects = 0;
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_X", SWIG_FromCharPtr("X"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_Y", SWIG_FromCharPtr("Y"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_Z", SWIG_FromCharPtr("Z"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_Intensity", SWIG_FromCharPtr("Intensity"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_ReturnNum", SWIG_FromCharPtr("ReturnNum"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_NumReturns", SWIG_FromCharPtr("NumReturns"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_ScanDir", SWIG_FromCharPtr("ScanDir"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_EdgeFlightLine", SWIG_FromCharPtr("EdgeFlightLine"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_ScannerChannel", SWIG_FromCharPtr("ScannerChannel"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_ClassId", SWIG_FromCharPtr("ClassId"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_ClassFlags", SWIG_FromCharPtr("ClassFlags"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_ScanAngle", SWIG_FromCharPtr("ScanAngle"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_UserData", SWIG_FromCharPtr("UserData"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_SourceId", SWIG_FromCharPtr("SourceId"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_GPSTime_Week", SWIG_FromCharPtr("GPSTime"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_GPSTime_Adjusted", SWIG_FromCharPtr("GPSTime_Adjusted"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_Red", SWIG_FromCharPtr("Red"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_Green", SWIG_FromCharPtr("Green"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_Blue", SWIG_FromCharPtr("Blue"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_NearInfrared", SWIG_FromCharPtr("NearInfrared"));
  rb_define_const(mLidarDSDK, "CHANNEL_NAME_Skip", SWIG_FromCharPtr("@Skip"));
  
  SwigClassChannelInfo.klass = rb_define_class_under(mLidarDSDK, "ChannelInfo", rb_cObject);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__ChannelInfo, (void *) &SwigClassChannelInfo);
  rb_define_alloc_func(SwigClassChannelInfo.klass, _wrap_ChannelInfo_allocate);
  rb_define_method(SwigClassChannelInfo.klass, "initialize", VALUEFUNC(_wrap_new_ChannelInfo), -1);
  rb_define_method(SwigClassChannelInfo.klass, "init", VALUEFUNC(_wrap_ChannelInfo_init), -1);
  rb_define_method(SwigClassChannelInfo.klass, "getName", VALUEFUNC(_wrap_ChannelInfo_getName), -1);
  rb_define_method(SwigClassChannelInfo.klass, "getDataType", VALUEFUNC(_wrap_ChannelInfo_getDataType), -1);
  rb_define_method(SwigClassChannelInfo.klass, "getBits", VALUEFUNC(_wrap_ChannelInfo_getBits), -1);
  rb_define_method(SwigClassChannelInfo.klass, "getQuantization", VALUEFUNC(_wrap_ChannelInfo_getQuantization), -1);
  rb_define_method(SwigClassChannelInfo.klass, "setQuantization", VALUEFUNC(_wrap_ChannelInfo_setQuantization), -1);
  rb_define_method(SwigClassChannelInfo.klass, "==", VALUEFUNC(_wrap_ChannelInfo___eq__), -1);
  SwigClassChannelInfo.mark = 0;
  SwigClassChannelInfo.destroy = (void (*)(void *)) free_LizardTech_ChannelInfo;
  SwigClassChannelInfo.trackObjects = 0;
  
  SwigClassPointInfo.klass = rb_define_class_under(mLidarDSDK, "PointInfo", rb_cObject);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__PointInfo, (void *) &SwigClassPointInfo);
  rb_define_alloc_func(SwigClassPointInfo.klass, _wrap_PointInfo_allocate);
  rb_define_method(SwigClassPointInfo.klass, "initialize", VALUEFUNC(_wrap_new_PointInfo), -1);
  rb_define_method(SwigClassPointInfo.klass, "init", VALUEFUNC(_wrap_PointInfo_init), -1);
  rb_define_method(SwigClassPointInfo.klass, "getNumChannels", VALUEFUNC(_wrap_PointInfo_getNumChannels), -1);
  rb_define_method(SwigClassPointInfo.klass, "hasChannel", VALUEFUNC(_wrap_PointInfo_hasChannel), -1);
  rb_define_method(SwigClassPointInfo.klass, "getChannel", VALUEFUNC(_wrap_PointInfo_getChannel), -1);
  rb_define_method(SwigClassPointInfo.klass, "getChannelIndex", VALUEFUNC(_wrap_PointInfo_getChannelIndex), -1);
  rb_define_method(SwigClassPointInfo.klass, "hasValidXYZ", VALUEFUNC(_wrap_PointInfo_hasValidXYZ), -1);
  rb_define_method(SwigClassPointInfo.klass, "==", VALUEFUNC(_wrap_PointInfo___eq__), -1);
  SwigClassPointInfo.mark = 0;
  SwigClassPointInfo.destroy = (void (*)(void *)) free_LizardTech_PointInfo;
  SwigClassPointInfo.trackObjects = 0;
  
  SwigClassChannelData.klass = rb_define_class_under(mLidarDSDK, "ChannelData", ((swig_class *) SWIGTYPE_p_LizardTech__ChannelInfo->clientdata)->klass);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__ChannelData, (void *) &SwigClassChannelData);
  rb_define_alloc_func(SwigClassChannelData.klass, _wrap_ChannelData_allocate);
  rb_define_method(SwigClassChannelData.klass, "initialize", VALUEFUNC(_wrap_new_ChannelData), -1);
  rb_define_method(SwigClassChannelData.klass, "init", VALUEFUNC(_wrap_ChannelData_init), -1);
  rb_define_method(SwigClassChannelData.klass, "getNumSamples", VALUEFUNC(_wrap_ChannelData_getNumSamples), -1);
  rb_define_singleton_method(SwigClassChannelData.klass, "copy", VALUEFUNC(_wrap_ChannelData_copy), -1);
  rb_define_singleton_method(SwigClassChannelData.klass, "convert", VALUEFUNC(_wrap_ChannelData_convert), -1);
  rb_define_method(SwigClassChannelData.klass, "resize", VALUEFUNC(_wrap_ChannelData_resize), -1);
  rb_define_method(SwigClassChannelData.klass, "setOffset", VALUEFUNC(_wrap_ChannelData_setOffset), -1);
  rb_define_method(SwigClassChannelData.klass, "setData", VALUEFUNC(_wrap_ChannelData_setData), -1);
  rb_define_method(SwigClassChannelData.klass, "getValue", VALUEFUNC(_wrap_ChannelData_getValue), -1);
  SwigClassChannelData.mark = 0;
  SwigClassChannelData.destroy = (void (*)(void *)) free_LizardTech_ChannelData;
  SwigClassChannelData.trackObjects = 0;
  
  SwigClassPointData.klass = rb_define_class_under(mLidarDSDK, "PointData", rb_cObject);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__PointData, (void *) &SwigClassPointData);
  rb_define_alloc_func(SwigClassPointData.klass, _wrap_PointData_allocate);
  rb_define_method(SwigClassPointData.klass, "initialize", VALUEFUNC(_wrap_new_PointData), -1);
  rb_define_method(SwigClassPointData.klass, "init", VALUEFUNC(_wrap_PointData_init), -1);
  rb_define_method(SwigClassPointData.klass, "getNumChannels", VALUEFUNC(_wrap_PointData_getNumChannels), -1);
  rb_define_method(SwigClassPointData.klass, "getNumSamples", VALUEFUNC(_wrap_PointData_getNumSamples), -1);
  rb_define_method(SwigClassPointData.klass, "hasChannel", VALUEFUNC(_wrap_PointData_hasChannel), -1);
  rb_define_method(SwigClassPointData.klass, "getChannel", VALUEFUNC(_wrap_PointData_getChannel), -1);
  rb_define_singleton_method(SwigClassPointData.klass, "copy", VALUEFUNC(_wrap_PointData_copy), -1);
  rb_define_singleton_method(SwigClassPointData.klass, "merge", VALUEFUNC(_wrap_PointData_merge), -1);
  rb_define_method(SwigClassPointData.klass, "resize", VALUEFUNC(_wrap_PointData_resize), -1);
  rb_define_method(SwigClassPointData.klass, "setOffset", VALUEFUNC(_wrap_PointData_setOffset), -1);
  SwigClassPointData.mark = 0;
  SwigClassPointData.destroy = (void (*)(void *)) free_LizardTech_PointData;
  SwigClassPointData.trackObjects = 0;
  
  SwigClassObject.klass = rb_define_class_under(mLidarDSDK, "Object", rb_cObject);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__Object, (void *) &SwigClassObject);
  rb_undef_alloc_func(SwigClassObject.klass);
  rb_define_method(SwigClassObject.klass, "retain", VALUEFUNC(_wrap_Object_retain), -1);
  rb_define_method(SwigClassObject.klass, "release", VALUEFUNC(_wrap_Object_release), -1);
  SwigClassObject.mark = 0;
  SwigClassObject.trackObjects = 0;
  
  SwigClassIO.klass = rb_define_class_under(mLidarDSDK, "IO", ((swig_class *) SWIGTYPE_p_LizardTech__Object->clientdata)->klass);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__IO, (void *) &SwigClassIO);
  rb_undef_alloc_func(SwigClassIO.klass);
  rb_define_method(SwigClassIO.klass, "open", VALUEFUNC(_wrap_IO_open), -1);
  rb_define_method(SwigClassIO.klass, "close", VALUEFUNC(_wrap_IO_close), -1);
  rb_define_method(SwigClassIO.klass, "pread", VALUEFUNC(_wrap_IO_pread), -1);
  rb_define_method(SwigClassIO.klass, "pwrite", VALUEFUNC(_wrap_IO_pwrite), -1);
  rb_define_method(SwigClassIO.klass, "size", VALUEFUNC(_wrap_IO_size), -1);
  rb_define_method(SwigClassIO.klass, "truncate", VALUEFUNC(_wrap_IO_truncate), -1);
  rb_define_method(SwigClassIO.klass, "unlink", VALUEFUNC(_wrap_IO_unlink), -1);
  SwigClassIO.mark = 0;
  SwigClassIO.destroy = (void (*)(void *)) free_LizardTech_IO;
  SwigClassIO.trackObjects = 0;
  
  SwigClassFileIO.klass = rb_define_class_under(mLidarDSDK, "FileIO", ((swig_class *) SWIGTYPE_p_LizardTech__IO->clientdata)->klass);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__FileIO, (void *) &SwigClassFileIO);
  rb_define_alloc_func(SwigClassFileIO.klass, _wrap_FileIO_allocate);
  rb_define_method(SwigClassFileIO.klass, "initialize", VALUEFUNC(_wrap_new_FileIO), -1);
  rb_define_method(SwigClassFileIO.klass, "init", VALUEFUNC(_wrap_FileIO_init), -1);
  SwigClassFileIO.mark = 0;
  SwigClassFileIO.destroy = (void (*)(void *)) free_LizardTech_FileIO;
  SwigClassFileIO.trackObjects = 0;
  rb_define_const(mLidarDSDK, "METADATA_KEY_FileSourceID", SWIG_FromCharPtr("FileSourceID"));
  rb_define_const(mLidarDSDK, "METADATA_KEY_ProjectID", SWIG_FromCharPtr("ProjectID"));
  rb_define_const(mLidarDSDK, "METADATA_KEY_SystemID", SWIG_FromCharPtr("SystemID"));
  rb_define_const(mLidarDSDK, "METADATA_KEY_GeneratingSoftware", SWIG_FromCharPtr("GeneratingSoftware"));
  rb_define_const(mLidarDSDK, "METADATA_KEY_FileCreationDate", SWIG_FromCharPtr("FileCreationDate"));
  rb_define_const(mLidarDSDK, "METADATA_KEY_PointRecordsByReturnCount", SWIG_FromCharPtr("PointRecordsByReturnCount"));
  rb_define_const(mLidarDSDK, "METADATA_KEY_PreCompressionPointCount", SWIG_FromCharPtr("PreCompressionPointCount"));
  rb_define_const(mLidarDSDK, "METADATA_KEY_LASBBox", SWIG_FromCharPtr("LAS_BoundingBox"));
  rb_define_const(mLidarDSDK, "METADATA_DATATYPE_INVALID", SWIG_From_int(static_cast< int >(LizardTech::METADATA_DATATYPE_INVALID)));
  rb_define_const(mLidarDSDK, "METADATA_DATATYPE_STRING", SWIG_From_int(static_cast< int >(LizardTech::METADATA_DATATYPE_STRING)));
  rb_define_const(mLidarDSDK, "METADATA_DATATYPE_BLOB", SWIG_From_int(static_cast< int >(LizardTech::METADATA_DATATYPE_BLOB)));
  rb_define_const(mLidarDSDK, "METADATA_DATATYPE_REAL_ARRAY", SWIG_From_int(static_cast< int >(LizardTech::METADATA_DATATYPE_REAL_ARRAY)));
  
  SwigClassMetadata.klass = rb_define_class_under(mLidarDSDK, "Metadata", rb_cObject);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__Metadata, (void *) &SwigClassMetadata);
  rb_define_alloc_func(SwigClassMetadata.klass, _wrap_Metadata_allocate);
  rb_define_method(SwigClassMetadata.klass, "initialize", VALUEFUNC(_wrap_new_Metadata), -1);
  rb_define_method(SwigClassMetadata.klass, "getNumRecords", VALUEFUNC(_wrap_Metadata_getNumRecords), -1);
  rb_define_method(SwigClassMetadata.klass, "has", VALUEFUNC(_wrap_Metadata_has), -1);
  rb_define_method(SwigClassMetadata.klass, "getKeyIndex", VALUEFUNC(_wrap_Metadata_getKeyIndex), -1);
  rb_define_method(SwigClassMetadata.klass, "getKey", VALUEFUNC(_wrap_Metadata_getKey), -1);
  rb_define_method(SwigClassMetadata.klass, "getDescription", VALUEFUNC(_wrap_Metadata_getDescription), -1);
  rb_define_method(SwigClassMetadata.klass, "getDataType", VALUEFUNC(_wrap_Metadata_getDataType), -1);
  rb_define_method(SwigClassMetadata.klass, "getValue", VALUEFUNC(_wrap_Metadata_getValue), -1);
  rb_define_method(SwigClassMetadata.klass, "getValueLength", VALUEFUNC(_wrap_Metadata_getValueLength), -1);
  rb_define_method(SwigClassMetadata.klass, "add", VALUEFUNC(_wrap_Metadata_add), -1);
  rb_define_method(SwigClassMetadata.klass, "remove", VALUEFUNC(_wrap_Metadata_remove), -1);
  rb_define_method(SwigClassMetadata.klass, "sort", VALUEFUNC(_wrap_Metadata_sort), -1);
  SwigClassMetadata.mark = 0;
  SwigClassMetadata.destroy = (void (*)(void *)) free_LizardTech_Metadata;
  SwigClassMetadata.trackObjects = 0;
  rb_define_module_function(mLidarDSDK, "disown_ProgressDelegate", VALUEFUNC(_wrap_disown_ProgressDelegate), -1);
  
  SwigClassProgressDelegate.klass = rb_define_class_under(mLidarDSDK, "ProgressDelegate", rb_cObject);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__ProgressDelegate, (void *) &SwigClassProgressDelegate);
  rb_define_alloc_func(SwigClassProgressDelegate.klass, _wrap_ProgressDelegate_allocate);
  rb_define_protected_method(SwigClassProgressDelegate.klass, "initialize", VALUEFUNC(_wrap_new_ProgressDelegate), -1);
  rb_define_method(SwigClassProgressDelegate.klass, "reportProgress", VALUEFUNC(_wrap_ProgressDelegate_reportProgress), -1);
  rb_define_method(SwigClassProgressDelegate.klass, "getCancelled", VALUEFUNC(_wrap_ProgressDelegate_getCancelled), -1);
  rb_define_method(SwigClassProgressDelegate.klass, "setTotal", VALUEFUNC(_wrap_ProgressDelegate_setTotal), -1);
  rb_define_method(SwigClassProgressDelegate.klass, "updateCompleted", VALUEFUNC(_wrap_ProgressDelegate_updateCompleted), -1);
  rb_define_method(SwigClassProgressDelegate.klass, "getProgress", VALUEFUNC(_wrap_ProgressDelegate_getProgress), -1);
  rb_define_method(SwigClassProgressDelegate.klass, "warning", VALUEFUNC(_wrap_ProgressDelegate_warning), -1);
  rb_define_method(SwigClassProgressDelegate.klass, "displayWarning", VALUEFUNC(_wrap_ProgressDelegate_displayWarning), -1);
  SwigClassProgressDelegate.mark = 0;
  SwigClassProgressDelegate.destroy = (void (*)(void *)) free_LizardTech_ProgressDelegate;
  SwigClassProgressDelegate.trackObjects = 0;
  
  SwigClassPercentProgressDelegate.klass = rb_define_class_under(mLidarDSDK, "PercentProgressDelegate", ((swig_class *) SWIGTYPE_p_LizardTech__ProgressDelegate->clientdata)->klass);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__PercentProgressDelegate, (void *) &SwigClassPercentProgressDelegate);
  rb_define_alloc_func(SwigClassPercentProgressDelegate.klass, _wrap_PercentProgressDelegate_allocate);
  rb_define_method(SwigClassPercentProgressDelegate.klass, "initialize", VALUEFUNC(_wrap_new_PercentProgressDelegate), -1);
  rb_define_method(SwigClassPercentProgressDelegate.klass, "setCancelled", VALUEFUNC(_wrap_PercentProgressDelegate_setCancelled), -1);
  SwigClassPercentProgressDelegate.mark = 0;
  SwigClassPercentProgressDelegate.destroy = (void (*)(void *)) free_LizardTech_PercentProgressDelegate;
  SwigClassPercentProgressDelegate.trackObjects = 0;
  
  SwigClassPointIterator.klass = rb_define_class_under(mLidarDSDK, "PointIterator", ((swig_class *) SWIGTYPE_p_LizardTech__Object->clientdata)->klass);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__PointIterator, (void *) &SwigClassPointIterator);
  rb_undef_alloc_func(SwigClassPointIterator.klass);
  rb_define_method(SwigClassPointIterator.klass, "getNextPoints", VALUEFUNC(_wrap_PointIterator_getNextPoints), -1);
  SwigClassPointIterator.mark = 0;
  SwigClassPointIterator.destroy = (void (*)(void *)) free_LizardTech_PointIterator;
  SwigClassPointIterator.trackObjects = 0;
  
  SwigClassPointSource.klass = rb_define_class_under(mLidarDSDK, "PointSource", ((swig_class *) SWIGTYPE_p_LizardTech__Object->clientdata)->klass);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__PointSource, (void *) &SwigClassPointSource);
  rb_undef_alloc_func(SwigClassPointSource.klass);
  rb_define_method(SwigClassPointSource.klass, "getPointInfo", VALUEFUNC(_wrap_PointSource_getPointInfo), -1);
  rb_define_method(SwigClassPointSource.klass, "getNumChannels", VALUEFUNC(_wrap_PointSource_getNumChannels), -1);
  rb_define_method(SwigClassPointSource.klass, "hasChannel", VALUEFUNC(_wrap_PointSource_hasChannel), -1);
  rb_define_method(SwigClassPointSource.klass, "getChannel", VALUEFUNC(_wrap_PointSource_getChannel), -1);
  rb_define_method(SwigClassPointSource.klass, "getNumPoints", VALUEFUNC(_wrap_PointSource_getNumPoints), -1);
  rb_define_method(SwigClassPointSource.klass, "getWKT", VALUEFUNC(_wrap_PointSource_getWKT), -1);
  rb_define_method(SwigClassPointSource.klass, "loadMetadata", VALUEFUNC(_wrap_PointSource_loadMetadata), -1);
  rb_define_method(SwigClassPointSource.klass, "getBounds", VALUEFUNC(_wrap_PointSource_getBounds), -1);
  rb_define_method(SwigClassPointSource.klass, "getScale", VALUEFUNC(_wrap_PointSource_getScale), -1);
  rb_define_method(SwigClassPointSource.klass, "getOffset", VALUEFUNC(_wrap_PointSource_getOffset), -1);
  rb_define_method(SwigClassPointSource.klass, "getNumClassIdNames", VALUEFUNC(_wrap_PointSource_getNumClassIdNames), -1);
  rb_define_method(SwigClassPointSource.klass, "getClassIdNames", VALUEFUNC(_wrap_PointSource_getClassIdNames), -1);
  rb_define_method(SwigClassPointSource.klass, "getTotalWork", VALUEFUNC(_wrap_PointSource_getTotalWork), -1);
  rb_define_method(SwigClassPointSource.klass, "createIterator", VALUEFUNC(_wrap_PointSource_createIterator), -1);
  rb_define_method(SwigClassPointSource.klass, "read", VALUEFUNC(_wrap_PointSource_read), -1);
  SwigClassPointSource.mark = 0;
  SwigClassPointSource.destroy = (void (*)(void *)) free_LizardTech_PointSource;
  SwigClassPointSource.trackObjects = 0;
  
  SwigClassPointReader.klass = rb_define_class_under(mLidarDSDK, "PointReader", ((swig_class *) SWIGTYPE_p_LizardTech__PointSource->clientdata)->klass);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__PointReader, (void *) &SwigClassPointReader);
  rb_undef_alloc_func(SwigClassPointReader.klass);
  rb_define_method(SwigClassPointReader.klass, "overrideWKT", VALUEFUNC(_wrap_PointReader_overrideWKT), -1);
  rb_define_method(SwigClassPointReader.klass, "getFileFormatString", VALUEFUNC(_wrap_PointReader_getFileFormatString), -1);
  SwigClassPointReader.mark = 0;
  SwigClassPointReader.destroy = (void (*)(void *)) free_LizardTech_PointReader;
  SwigClassPointReader.trackObjects = 0;
  
  SwigClassPointWriter.klass = rb_define_class_under(mLidarDSDK, "PointWriter", ((swig_class *) SWIGTYPE_p_LizardTech__Object->clientdata)->klass);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__PointWriter, (void *) &SwigClassPointWriter);
  rb_undef_alloc_func(SwigClassPointWriter.klass);
  rb_define_method(SwigClassPointWriter.klass, "setMetadata", VALUEFUNC(_wrap_PointWriter_setMetadata), -1);
  rb_define_method(SwigClassPointWriter.klass, "getMetadata", VALUEFUNC(_wrap_PointWriter_getMetadata), -1);
  rb_define_method(SwigClassPointWriter.klass, "setQuantization", VALUEFUNC(_wrap_PointWriter_setQuantization), -1);
  rb_define_method(SwigClassPointWriter.klass, "getScale", VALUEFUNC(_wrap_PointWriter_getScale), -1);
  rb_define_method(SwigClassPointWriter.klass, "getOffset", VALUEFUNC(_wrap_PointWriter_getOffset), -1);
  rb_define_method(SwigClassPointWriter.klass, "write", VALUEFUNC(_wrap_PointWriter_write), -1);
  rb_define_method(SwigClassPointWriter.klass, "setChunckSize", VALUEFUNC(_wrap_PointWriter_setChunckSize), -1);
  rb_define_method(SwigClassPointWriter.klass, "supportedChannels", VALUEFUNC(_wrap_PointWriter_supportedChannels), -1);
  SwigClassPointWriter.mark = 0;
  SwigClassPointWriter.destroy = (void (*)(void *)) free_LizardTech_PointWriter;
  SwigClassPointWriter.trackObjects = 0;
  
  SwigClassSimplePointWriter.klass = rb_define_class_under(mLidarDSDK, "SimplePointWriter", ((swig_class *) SWIGTYPE_p_LizardTech__PointWriter->clientdata)->klass);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__SimplePointWriter, (void *) &SwigClassSimplePointWriter);
  rb_undef_alloc_func(SwigClassSimplePointWriter.klass);
  rb_define_method(SwigClassSimplePointWriter.klass, "writeBegin", VALUEFUNC(_wrap_SimplePointWriter_writeBegin), -1);
  rb_define_method(SwigClassSimplePointWriter.klass, "writePoints", VALUEFUNC(_wrap_SimplePointWriter_writePoints), -1);
  rb_define_method(SwigClassSimplePointWriter.klass, "writeEnd", VALUEFUNC(_wrap_SimplePointWriter_writeEnd), -1);
  SwigClassSimplePointWriter.mark = 0;
  SwigClassSimplePointWriter.destroy = (void (*)(void *)) free_LizardTech_SimplePointWriter;
  SwigClassSimplePointWriter.trackObjects = 0;
  
  SwigClassTXTPointReader.klass = rb_define_class_under(mLidarDSDK, "TXTPointReader", ((swig_class *) SWIGTYPE_p_LizardTech__PointReader->clientdata)->klass);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__TXTPointReader, (void *) &SwigClassTXTPointReader);
  rb_define_alloc_func(SwigClassTXTPointReader.klass, _wrap_TXTPointReader_allocate);
  rb_define_method(SwigClassTXTPointReader.klass, "initialize", VALUEFUNC(_wrap_new_TXTPointReader), -1);
  rb_define_method(SwigClassTXTPointReader.klass, "init", VALUEFUNC(_wrap_TXTPointReader_init), -1);
  rb_define_method(SwigClassTXTPointReader.klass, "initBoundsAndNumPoints", VALUEFUNC(_wrap_TXTPointReader_initBoundsAndNumPoints), -1);
  rb_define_singleton_method(SwigClassTXTPointReader.klass, "parseFormat", VALUEFUNC(_wrap_TXTPointReader_parseFormat), -1);
  rb_define_singleton_method(SwigClassTXTPointReader.klass, "parseQuantization", VALUEFUNC(_wrap_TXTPointReader_parseQuantization), -1);
  SwigClassTXTPointReader.mark = 0;
  SwigClassTXTPointReader.destroy = (void (*)(void *)) free_LizardTech_TXTPointReader;
  SwigClassTXTPointReader.trackObjects = 0;
  
  SwigClassTXTPointWriter.klass = rb_define_class_under(mLidarDSDK, "TXTPointWriter", ((swig_class *) SWIGTYPE_p_LizardTech__SimplePointWriter->clientdata)->klass);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__TXTPointWriter, (void *) &SwigClassTXTPointWriter);
  rb_define_alloc_func(SwigClassTXTPointWriter.klass, _wrap_TXTPointWriter_allocate);
  rb_define_method(SwigClassTXTPointWriter.klass, "initialize", VALUEFUNC(_wrap_new_TXTPointWriter), -1);
  rb_define_method(SwigClassTXTPointWriter.klass, "init", VALUEFUNC(_wrap_TXTPointWriter_init), -1);
  SwigClassTXTPointWriter.mark = 0;
  SwigClassTXTPointWriter.destroy = (void (*)(void *)) free_LizardTech_TXTPointWriter;
  SwigClassTXTPointWriter.trackObjects = 0;
  
  SwigClassVersion.klass = rb_define_class_under(mLidarDSDK, "Version", rb_cObject);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__Version, (void *) &SwigClassVersion);
  rb_define_alloc_func(SwigClassVersion.klass, _wrap_Version_allocate);
  rb_define_method(SwigClassVersion.klass, "initialize", VALUEFUNC(_wrap_new_Version), -1);
  rb_define_singleton_method(SwigClassVersion.klass, "getSDKMajorVersion", VALUEFUNC(_wrap_Version_getSDKMajorVersion), -1);
  rb_define_singleton_method(SwigClassVersion.klass, "getSDKMinorVersion", VALUEFUNC(_wrap_Version_getSDKMinorVersion), -1);
  rb_define_singleton_method(SwigClassVersion.klass, "getSDKVersionAge", VALUEFUNC(_wrap_Version_getSDKVersionAge), -1);
  rb_define_singleton_method(SwigClassVersion.klass, "getSDKBuildNumber", VALUEFUNC(_wrap_Version_getSDKBuildNumber), -1);
  rb_define_singleton_method(SwigClassVersion.klass, "getSDKVersionString", VALUEFUNC(_wrap_Version_getSDKVersionString), -1);
  rb_define_singleton_method(SwigClassVersion.klass, "getSDKBuildDate", VALUEFUNC(_wrap_Version_getSDKBuildDate), -1);
  SwigClassVersion.mark = 0;
  SwigClassVersion.destroy = (void (*)(void *)) free_LizardTech_Version;
  SwigClassVersion.trackObjects = 0;
  
  SwigClassMG4PointReader.klass = rb_define_class_under(mLidarDSDK, "MG4PointReader", ((swig_class *) SWIGTYPE_p_LizardTech__PointReader->clientdata)->klass);
  SWIG_TypeClientData(SWIGTYPE_p_LizardTech__MG4PointReader, (void *) &SwigClassMG4PointReader);
  rb_define_alloc_func(SwigClassMG4PointReader.klass, _wrap_MG4PointReader_allocate);
  rb_define_method(SwigClassMG4PointReader.klass, "initialize", VALUEFUNC(_wrap_new_MG4PointReader), -1);
  rb_define_method(SwigClassMG4PointReader.klass, "init", VALUEFUNC(_wrap_MG4PointReader_init), -1);
  SwigClassMG4PointReader.mark = 0;
  SwigClassMG4PointReader.destroy = (void (*)(void *)) free_LizardTech_MG4PointReader;
  SwigClassMG4PointReader.trackObjects = 0;
}

