
Catalog of typemaps used

Note:  Use CSL routines for memory management.

Note: If a typemap is listed as Required, it is explicitly used in an
%apply statement.  This means that it must appear defined in the typemaps
even if it does nothing.

---------------------------------------

argout (double *argout[ANY]) - Required:
  This is used to return a fixed length array from function calls.  The array is allocated
  by the GDAL function and must be CPLFree'd by the caller.

argout (double argout[ANY])-
  Used to return fixed length array from function calls.  The memory is allocated by the caller.
  In a typical typemap implementation, the array is defined on the stack of fixed size.

argout (int *nGCPs, GDAL_GCP const **pGCPs ) -

argout (int *nLen, char **pBuf) -
  Return a character buffer.  Suggested use is to convert to native string
  type.  Typemap needs to deallocate memory.
  FrankW:  Should this be done with free?

argout (char **argout ) - Required -

argout (long *OUTPUT) - Required -

-------------------

in (char **dict) - Required
  Convert a native dictionary/hash type into name value pairs.

in (char **ignorechange) - Required
  Used as in/out argument.  The argument may be modified by the gdal routine.
  In python, the mutated string is not returned to the caller.

in (char **options) -
  Convert a native tuple/list of strings into a char ** using the CSLAddString
  routines.  The converted char ** must be released with CSLDestroy.

in (double argin[ANY]) - Required
  Used to pass a fixed length array of doubles into a gdal function.

in GDALColorEntry* -
  Pass a GDALColorEntry into a function.

in (int *optional_int) - Required -
  Pass an optional integer argument into a function.  If the value is not
  specified by user of binding, pass in the null pointer.

in (int nGCPs, GDAL_GCP const *pGCPs) -
  Pass a fixed length array of GCP pointers into a function.

in (int nList, int *pList) - Required - Pass a fixed length integer
array into a function.

in (int nLen, char *pBuf) - Required - Pass a fixed length character
buffer into a function.

in (tostring argin ) - Required - Converts any argument in the script
types to a string representation.  In python, this functionality
directly calls AsString (i.e. str()) on the object.  This
functionality could be reduced in other languages as long as it's
documented.

in (const char *utf8_path) - Optional -
  Any inputs marked this way should be treated as utf-8, and if the language supports it
  a conversion should be applied.  For many languages the default (the fallback const char *
  handler) will be sufficient.

-------------------

out (char **dict) - Required - The return value is a collection of name/value pairs.  This can be
converted into a native dictionary or hash structure.  Use CPLParseNameValue() to
access the char ** type.

out (CPLErr) - CPLErr is an enum defined in port/cpl_error.h.  This code is returned
by many functions in GDAL core.  Suggested usage is to test the return code an convert
to an exception.

out GDALColorEntry* - Return a GDALColorEntry from a function.

out (IF_FALSE_RETURN_NONE) - Required - This is a typedef'd int.  Must support use in conjunction with
argout typemaps.

out OGRErr -

out (char **CSL) - Required - The return value is a list that is copied
into a list in the target language and then CSLDestroyed

out (retStringAndCPLFree*) - Required - The returned string should be
copied to target language and then CPLFree'd

-------------------

Optional checks against nullness. Some language bindings
map undefined variables into NULLs, which cause core dumps if allowed to
go the C API.

%typemap(check) (const char *pszNewDesc)
%typemap(check) (const char *cap)
%typemap(check) (const char* statement)
%typemap(check) (OGRFeatureShadow *feature)
%typemap(check) (OGRFieldDefnShadow* field_def)
%typemap(check) (OGRFieldDefnShadow* defn)
%typemap(check) OGRGeometryShadow* geom
%typemap(check) OGRGeometryShadow* other
%typemap(check) OGRGeometryShadow* other_disown
%typemap(check) OSRCoordinateTransformationShadow*
%typemap(check) (const char *name)
%typemap(check) (const char *request)
%typemap(check) (char *method)
