/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.0
 *
 * 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.
 * ----------------------------------------------------------------------------- */

#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 defined(__GNUC__)
#  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#    ifndef GCC_HASCLASSVISIBILITY
#      define GCC_HASCLASSVISIBILITY
#    endif
#  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

/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
#endif

/* Intel's compiler complains if a variable which was never initialised is
 * cast to void, which is a common idiom which we use to indicate that we
 * are aware a variable isn't used.  So we just silence that warning.
 * See: https://github.com/swig/swig/issues/192 for more discussion.
 */
#ifdef __INTEL_COMPILER
# pragma warning disable 592
#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




/* Contract support */
#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) { \
swig::fortran_store_exception(SWIG_ValueError, msg); return nullreturn; }


#include <stdexcept>


#include <string>


#include <algorithm>


// External fortran-owned data that we save to

extern "C" {

extern int ierr;
extern char serr[1024];

}


namespace swig
{
// Stored exception message (XXX: is this safe if main() is fortran?)
std::string fortran_last_exception_msg;

// Call this function before any new action
void fortran_check_unhandled_exception()
{
    if (::ierr != 0)
    {
        throw std::runtime_error(
                "An unhandled exception occurred: "
                + fortran_last_exception_msg);
    }
}

// Save an exception to the fortran error code and string
void fortran_store_exception(int code, const char *msg)
{
    ::ierr = code;

    // Save the message to a std::string first
    fortran_last_exception_msg = msg;

    std::size_t msg_size = std::min<std::size_t>(
            fortran_last_exception_msg.size(),
            1024);

    // Copy to space-padded Fortran string
    char* dst = serr;
    dst = std::copy(fortran_last_exception_msg.begin(),
                    fortran_last_exception_msg.begin() + msg_size,
                    dst);
    std::fill(dst, serr + 1024, ' ');
}
} // end namespace swig


#include "Teuchos_Exceptions.hpp"


#include "Teuchos_RCP.hpp"


#include "Teuchos_ParameterList.hpp"


#include <sstream>


namespace swig
{
void string_size_check(size_t src, size_t dst)
{
    if (dst < src)
    {
        std::ostringstream os;
        os << "String size too small: " << dst << " < " << src;
        throw std::range_error(os.str());
    }
}

void string_copyout(const std::string& str, char* s, size_t count)
{
    string_size_check(str.size(), count);

    s = std::copy(str.begin(), str.end(), s);
    std::fill_n(s, count - str.size(), ' ');
}
}


SWIGINTERN void std_string_set(std::string *self,std::string::size_type pos,std::string::value_type v){
        // TODO: check range
        (*self)[pos] = v;
    }
SWIGINTERN std::string::value_type std_string_get(std::string *self,std::string::size_type pos){
        // TODO: check range
        return (*self)[pos];
    }
SWIGINTERN void std_string_assign_from(std::string *self,std::string::const_pointer s,std::string::size_type count){
        self->assign(s, s + count);
    }
SWIGINTERN void std_string_copy_to(std::string *self,std::string::pointer s,std::string::size_type count){
        swig::string_copyout(*self, s, count);
    }

namespace swig
{
void array_size_check(size_t src, size_t dst)
{
    if (dst < src)
    {
        std::ostringstream os;
        os << "Array size mismatch: " << src << " != " << dst;
        throw std::range_error(os.str());
    }
}
}


SWIGINTERN Teuchos::ParameterList *new_Teuchos_ParameterList(char const *STRING,int SIZE){
    return new Teuchos::ParameterList(std::string(STRING, SIZE));
}

struct SWIG_null_deleter {
  void operator() (void const *) const {
  }
};
#define SWIG_NO_NULL_DELETER_0 , SWIG_null_deleter()
#define SWIG_NO_NULL_DELETER_1
#define SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW
#define SWIG_NO_NULL_DELETER_SWIG_POINTER_OWN

SWIGINTERN void Teuchos_ParameterList_get_scalar_Sl_double_Sg___SWIG_0(Teuchos::ParameterList *self,char const *STRING,int SIZE,double &value){
    value = self->get<double>(std::string(STRING, SIZE));
}
SWIGINTERN void Teuchos_ParameterList_set_scalar_Sl_double_Sg___SWIG_0(Teuchos::ParameterList *self,char const *STRING,int SIZE,double const &value){
    self->set(std::string(STRING, SIZE), value);
}
SWIGINTERN void Teuchos_ParameterList_get_scalar_Sl_int_Sg___SWIG_1(Teuchos::ParameterList *self,char const *STRING,int SIZE,int &value){
    value = self->get<int>(std::string(STRING, SIZE));
}
SWIGINTERN void Teuchos_ParameterList_set_scalar_Sl_int_Sg___SWIG_1(Teuchos::ParameterList *self,char const *STRING,int SIZE,int const &value){
    self->set(std::string(STRING, SIZE), value);
}
SWIGINTERN void Teuchos_ParameterList_get_scalar_Sl_Teuchos_ParameterList_Sg___SWIG_2(Teuchos::ParameterList *self,char const *STRING,int SIZE,Teuchos::ParameterList &value){
    value = self->get<Teuchos::ParameterList>(std::string(STRING, SIZE));
}
SWIGINTERN void Teuchos_ParameterList_set_scalar_Sl_Teuchos_ParameterList_Sg___SWIG_2(Teuchos::ParameterList *self,char const *STRING,int SIZE,Teuchos::ParameterList const &value){
    self->set(std::string(STRING, SIZE), value);
}
SWIGINTERN void Teuchos_ParameterList_set__SWIG_3(Teuchos::ParameterList *self,char const *STRING,int SIZE,char const *VALSTRING,int VALSIZE){
    self->set(std::string(STRING, SIZE),
               std::string(VALSTRING, VALSIZE));
}
SWIGINTERN void Teuchos_ParameterList_get__SWIG_3(Teuchos::ParameterList *self,char const *STRING,int SIZE,char *VALSTRING,int VALSIZE){
    const std::string& value
        = self->get<std::string>(std::string(STRING, SIZE));
    swig::string_copyout(value, VALSTRING, VALSIZE);
}
SWIGINTERN void Teuchos_ParameterList_set_array_Sl_double_Sg___SWIG_4(Teuchos::ParameterList *self,char const *STRING,int SIZE,double const *ARRAY,int ARRAYSIZE){
    typedef Teuchos::Array<double> ArrayT;
    self->set(std::string(STRING, SIZE),
               ArrayT(ARRAY, ARRAY + ARRAYSIZE));
}
SWIGINTERN void Teuchos_ParameterList_get_array_Sl_double_Sg___SWIG_4(Teuchos::ParameterList *self,char const *STRING,int SIZE,double *ARRAY,int ARRAYSIZE){
    typedef Teuchos::Array<double> ArrayT;
    const ArrayT& arr
        = self->get<ArrayT>(std::string(STRING, SIZE));

    swig::array_size_check(arr.size(), ARRAYSIZE);
    std::copy(arr.begin(), arr.end(), ARRAY);
}
SWIGINTERN void Teuchos_ParameterList_set_array_Sl_int_Sg___SWIG_5(Teuchos::ParameterList *self,char const *STRING,int SIZE,int const *ARRAY,int ARRAYSIZE){
    typedef Teuchos::Array<int> ArrayT;
    self->set(std::string(STRING, SIZE),
               ArrayT(ARRAY, ARRAY + ARRAYSIZE));
}
SWIGINTERN void Teuchos_ParameterList_get_array_Sl_int_Sg___SWIG_5(Teuchos::ParameterList *self,char const *STRING,int SIZE,int *ARRAY,int ARRAYSIZE){
    typedef Teuchos::Array<int> ArrayT;
    const ArrayT& arr
        = self->get<ArrayT>(std::string(STRING, SIZE));

    swig::array_size_check(arr.size(), ARRAYSIZE);
    std::copy(arr.begin(), arr.end(), ARRAY);
}
SWIGINTERN int Teuchos_ParameterList_get_length(Teuchos::ParameterList *self,char const *STRING,int SIZE){
    std::string key(STRING, SIZE);



     if (self->isType<std::string >(key)) return self->get<std::string >(key).size();;
     if (self->isType<Teuchos::Array<int> >(key)) return self->get<Teuchos::Array<int> >(key).size();
     if (self->isType<Teuchos::Array<double> >(key)) return self->get<Teuchos::Array<double> >(key).size();


    // No type found
    return -1;
}
SWIGINTERN void Teuchos_ParameterList_remove(Teuchos::ParameterList *self,char const *STRING,int SIZE){
    self->remove(std::string(STRING, SIZE));
}
SWIGINTERN bool Teuchos_ParameterList_is_parameter(Teuchos::ParameterList const *self,char const *STRING,int SIZE){
    return self->isParameter(std::string(STRING, SIZE));
}

#include "Teuchos_XMLParameterListCoreHelpers.hpp"


void load_from_xml(const Teuchos::RCP<Teuchos::ParameterList>& plist,
                   const char* STRING, int SIZE)
{
    Teuchos::updateParametersFromXmlFile(std::string(STRING, SIZE),
                                         Teuchos::inOutArg(*plist));
}

void save_to_xml(const Teuchos::ParameterList& plist,
                 const char* STRING, int SIZE)
{
    Teuchos::writeParameterListToXmlFile(plist, std::string(STRING, SIZE));
}

#ifdef __cplusplus
extern "C" {
#endif
SWIGEXPORT void* swigc_new_string__SWIG_0() {
  void* fresult = 0 ;
  std::string *result = 0 ;
  
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      result = (std::string *)new std::string();
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return 0; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return 0; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return 0; 
      } while(0);
    }
  }
  fresult = result; 
  return fresult;
}


SWIGEXPORT void* swigc_new_string__SWIG_1( const char*  farg1, int* farg2) {
  void* fresult = 0 ;
  std::string::const_pointer arg1 = (std::string::const_pointer) 0 ;
  std::string::size_type arg2 ;
  std::string *result = 0 ;
  
  arg1 = (std::string::const_pointer)farg1; 
  arg2 = *farg2;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      result = (std::string *)new std::string(arg1,arg2);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return 0; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return 0; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return 0; 
      } while(0);
    }
  }
  fresult = result; 
  return fresult;
}


SWIGEXPORT void swigc_string_resize(void* farg1, int* farg2) {
  std::string *arg1 = (std::string *) 0 ;
  std::string::size_type arg2 ;
  
  arg1 = (std::string *)(farg1); 
  arg2 = *farg2;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      (arg1)->resize(arg2);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_string_clear(void* farg1) {
  std::string *arg1 = (std::string *) 0 ;
  
  arg1 = (std::string *)(farg1); 
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      (arg1)->clear();
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT int swigc_string_size(void* farg1) {
  int fresult = 0 ;
  std::string *arg1 = (std::string *) 0 ;
  std::string::size_type result;
  
  arg1 = (std::string *)(farg1); 
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      result = (std::string::size_type)((std::string const *)arg1)->size();
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return 0; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return 0; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return 0; 
      } while(0);
    }
  }
  fresult = result;
  return fresult;
}


SWIGEXPORT int swigc_string_length(void* farg1) {
  int fresult = 0 ;
  std::string *arg1 = (std::string *) 0 ;
  std::string::size_type result;
  
  arg1 = (std::string *)(farg1); 
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      result = (std::string::size_type)((std::string const *)arg1)->length();
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return 0; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return 0; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return 0; 
      } while(0);
    }
  }
  fresult = result;
  return fresult;
}


SWIGEXPORT void swigc_string_set(void* farg1, int* farg2,  char  farg3) {
  std::string *arg1 = (std::string *) 0 ;
  std::string::size_type arg2 ;
  std::string::value_type arg3 ;
  
  arg1 = (std::string *)(farg1); 
  arg2 = *farg2;
  arg3 = farg3; 
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      std_string_set(arg1,arg2,arg3);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT  char  swigc_string_get(void* farg1, int* farg2) {
  char  fresult = 0 ;
  std::string *arg1 = (std::string *) 0 ;
  std::string::size_type arg2 ;
  std::string::value_type result;
  
  arg1 = (std::string *)(farg1); 
  arg2 = *farg2;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      result = (std::string::value_type)std_string_get(arg1,arg2);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return 0; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return 0; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return 0; 
      } while(0);
    }
  }
  fresult = result; 
  return fresult;
}


SWIGEXPORT void swigc_string_assign_from(void* farg1,  const char*  farg2, int* farg3) {
  std::string *arg1 = (std::string *) 0 ;
  std::string::const_pointer arg2 = (std::string::const_pointer) 0 ;
  std::string::size_type arg3 ;
  
  arg1 = (std::string *)(farg1); 
  arg2 = (std::string::const_pointer)farg2; 
  arg3 = *farg3;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      std_string_assign_from(arg1,(char const *)arg2,arg3);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_string_copy_to(void* farg1,  char*  farg2, int* farg3) {
  std::string *arg1 = (std::string *) 0 ;
  std::string::pointer arg2 = (std::string::pointer) 0 ;
  std::string::size_type arg3 ;
  
  arg1 = (std::string *)(farg1); 
  arg2 = (std::string::pointer)farg2; 
  arg3 = *farg3;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      std_string_copy_to(arg1,arg2,arg3);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_delete_string(void* farg1) {
  std::string *arg1 = (std::string *) 0 ;
  
  arg1 = (std::string *)(farg1); 
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      delete arg1;
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_ParameterList_print(void* farg1) {
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  Teuchos::RCP< Teuchos::ParameterList const > *smartarg1 = 0 ;
  
  smartarg1 = (Teuchos::RCP<const Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      ((Teuchos::ParameterList const *)arg1)->print();
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void* swigc_new_ParameterList( const char*  farg1, int* farg2) {
  void* fresult = 0 ;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  Teuchos::ParameterList *result = 0 ;
  
  arg1 = (char *)farg1; 
  arg2 = *farg2;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      result = (Teuchos::ParameterList *)new_Teuchos_ParameterList((char const *)arg1,arg2);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return 0; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return 0; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return 0; 
      } while(0);
    }
  }
  fresult = result ? new Teuchos::RCP< Teuchos::ParameterList >(result SWIG_NO_NULL_DELETER_1) : 0;
  return fresult;
}


SWIGEXPORT void swigc_ParameterList_get__SWIG_0(void* farg1,  const char*  farg2, int* farg3, double* farg4) {
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  double *arg4 = 0 ;
  Teuchos::RCP< Teuchos::ParameterList > *smartarg1 = 0 ;
  
  smartarg1 = (Teuchos::RCP< Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  arg4 = farg4;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      Teuchos_ParameterList_get_scalar_Sl_double_Sg___SWIG_0(arg1,(char const *)arg2,arg3,*arg4);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_ParameterList_set__SWIG_0(void* farg1,  const char*  farg2, int* farg3, double* farg4) {
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  double *arg4 = 0 ;
  Teuchos::RCP< Teuchos::ParameterList > *smartarg1 = 0 ;
  
  smartarg1 = (Teuchos::RCP< Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  arg4 = farg4;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      Teuchos_ParameterList_set_scalar_Sl_double_Sg___SWIG_0(arg1,(char const *)arg2,arg3,(double const &)*arg4);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_ParameterList_get__SWIG_1(void* farg1,  const char*  farg2, int* farg3, int* farg4) {
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  int *arg4 = 0 ;
  Teuchos::RCP< Teuchos::ParameterList > *smartarg1 = 0 ;
  
  smartarg1 = (Teuchos::RCP< Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  arg4 = farg4;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      Teuchos_ParameterList_get_scalar_Sl_int_Sg___SWIG_1(arg1,(char const *)arg2,arg3,*arg4);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_ParameterList_set__SWIG_1(void* farg1,  const char*  farg2, int* farg3, int* farg4) {
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  int *arg4 = 0 ;
  Teuchos::RCP< Teuchos::ParameterList > *smartarg1 = 0 ;
  
  smartarg1 = (Teuchos::RCP< Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  arg4 = farg4;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      Teuchos_ParameterList_set_scalar_Sl_int_Sg___SWIG_1(arg1,(char const *)arg2,arg3,(int const &)*arg4);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_ParameterList_get__SWIG_2(void* farg1,  const char*  farg2, int* farg3, void* farg4) {
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  Teuchos::ParameterList *arg4 = 0 ;
  Teuchos::RCP< Teuchos::ParameterList > *smartarg1 = 0 ;
  
  smartarg1 = (Teuchos::RCP< Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  arg4 = (Teuchos::ParameterList *)(((Teuchos::RCP< Teuchos::ParameterList > *)farg4)
    ? ((Teuchos::RCP< Teuchos::ParameterList > *)farg4)->get()
    :0);
  if (!arg4)
  {
    throw std::logic_error("Attempt to dereference null Teuchos::ParameterList &");
    return ;
  }
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      Teuchos_ParameterList_get_scalar_Sl_Teuchos_ParameterList_Sg___SWIG_2(arg1,(char const *)arg2,arg3,*arg4);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_ParameterList_set__SWIG_2(void* farg1,  const char*  farg2, int* farg3, void* farg4) {
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  Teuchos::ParameterList *arg4 = 0 ;
  Teuchos::RCP< Teuchos::ParameterList > *smartarg1 = 0 ;
  
  smartarg1 = (Teuchos::RCP< Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  arg4 = (Teuchos::ParameterList *)(((Teuchos::RCP<const Teuchos::ParameterList > *)farg4)
    ? ((Teuchos::RCP<const Teuchos::ParameterList > *)farg4)->get()
    :0);
  if (!arg4)
  {
    throw std::logic_error("Attempt to dereference null Teuchos::ParameterList const &");
    return ;
  }
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      Teuchos_ParameterList_set_scalar_Sl_Teuchos_ParameterList_Sg___SWIG_2(arg1,(char const *)arg2,arg3,(Teuchos::ParameterList const &)*arg4);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_ParameterList_set__SWIG_3(void* farg1,  const char*  farg2, int* farg3,  const char*  farg4, int* farg5) {
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  char *arg4 = (char *) 0 ;
  int arg5 ;
  Teuchos::RCP< Teuchos::ParameterList > *smartarg1 = 0 ;
  
  smartarg1 = (Teuchos::RCP< Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  arg4 = (char *)farg4; 
  arg5 = *farg5;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      Teuchos_ParameterList_set__SWIG_3(arg1,(char const *)arg2,arg3,(char const *)arg4,arg5);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_ParameterList_get__SWIG_3(void* farg1,  const char*  farg2, int* farg3,  char*  farg4, int* farg5) {
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  char *arg4 = (char *) 0 ;
  int arg5 ;
  Teuchos::RCP< Teuchos::ParameterList > *smartarg1 = 0 ;
  
  smartarg1 = (Teuchos::RCP< Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  arg4 = (char *)farg4; 
  arg5 = *farg5;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      Teuchos_ParameterList_get__SWIG_3(arg1,(char const *)arg2,arg3,arg4,arg5);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_ParameterList_set__SWIG_4(void* farg1,  const char*  farg2, int* farg3, double* farg4, int* farg5) {
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  double *arg4 = (double *) 0 ;
  int arg5 ;
  Teuchos::RCP< Teuchos::ParameterList > *smartarg1 = 0 ;
  
  smartarg1 = (Teuchos::RCP< Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  arg4 = farg4;
  arg5 = *farg5;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      Teuchos_ParameterList_set_array_Sl_double_Sg___SWIG_4(arg1,(char const *)arg2,arg3,(double const *)arg4,arg5);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_ParameterList_get__SWIG_4(void* farg1,  const char*  farg2, int* farg3, double* farg4, int* farg5) {
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  double *arg4 = (double *) 0 ;
  int arg5 ;
  Teuchos::RCP< Teuchos::ParameterList > *smartarg1 = 0 ;
  
  smartarg1 = (Teuchos::RCP< Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  arg4 = farg4;
  arg5 = *farg5;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      Teuchos_ParameterList_get_array_Sl_double_Sg___SWIG_4(arg1,(char const *)arg2,arg3,arg4,arg5);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_ParameterList_set__SWIG_5(void* farg1,  const char*  farg2, int* farg3, int* farg4, int* farg5) {
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  Teuchos::RCP< Teuchos::ParameterList > *smartarg1 = 0 ;
  
  smartarg1 = (Teuchos::RCP< Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  arg4 = farg4;
  arg5 = *farg5;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      Teuchos_ParameterList_set_array_Sl_int_Sg___SWIG_5(arg1,(char const *)arg2,arg3,(int const *)arg4,arg5);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_ParameterList_get__SWIG_5(void* farg1,  const char*  farg2, int* farg3, int* farg4, int* farg5) {
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  Teuchos::RCP< Teuchos::ParameterList > *smartarg1 = 0 ;
  
  smartarg1 = (Teuchos::RCP< Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  arg4 = farg4;
  arg5 = *farg5;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      Teuchos_ParameterList_get_array_Sl_int_Sg___SWIG_5(arg1,(char const *)arg2,arg3,arg4,arg5);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT int swigc_ParameterList_get_length(void* farg1,  const char*  farg2, int* farg3) {
  int fresult = 0 ;
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  Teuchos::RCP< Teuchos::ParameterList > *smartarg1 = 0 ;
  int result;
  
  smartarg1 = (Teuchos::RCP< Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      result = (int)Teuchos_ParameterList_get_length(arg1,(char const *)arg2,arg3);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return 0; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return 0; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return 0; 
      } while(0);
    }
  }
  fresult = result;
  return fresult;
}


SWIGEXPORT void swigc_ParameterList_remove(void* farg1,  const char*  farg2, int* farg3) {
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  Teuchos::RCP< Teuchos::ParameterList > *smartarg1 = 0 ;
  
  smartarg1 = (Teuchos::RCP< Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      Teuchos_ParameterList_remove(arg1,(char const *)arg2,arg3);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT bool swigc_ParameterList_is_parameter(void* farg1,  const char*  farg2, int* farg3) {
  bool fresult = 0 ;
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  Teuchos::RCP< Teuchos::ParameterList const > *smartarg1 = 0 ;
  bool result;
  
  smartarg1 = (Teuchos::RCP<const Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      result = (bool)Teuchos_ParameterList_is_parameter((Teuchos::ParameterList const *)arg1,(char const *)arg2,arg3);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return 0; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return 0; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return 0; 
      } while(0);
    }
  }
  fresult = result;
  return fresult;
}


SWIGEXPORT void swigc_delete_ParameterList(void* farg1) {
  Teuchos::ParameterList *arg1 = (Teuchos::ParameterList *) 0 ;
  Teuchos::RCP< Teuchos::ParameterList > *smartarg1 = 0 ;
  
  smartarg1 = (Teuchos::RCP< Teuchos::ParameterList > *)farg1;
  arg1 = (Teuchos::ParameterList *)(smartarg1 ? smartarg1->get() : 0);
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      (void)arg1; delete smartarg1;
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_load_from_xml(void * farg1,  const char*  farg2, int* farg3) {
  Teuchos::RCP< Teuchos::ParameterList > *arg1 = 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  Teuchos::RCP< Teuchos::ParameterList > tempnull1 ;
  
  arg1 = farg1 ? (Teuchos::RCP< Teuchos::ParameterList > *)farg1 : &tempnull1;
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      load_from_xml((Teuchos::RCP< Teuchos::ParameterList > const &)*arg1,(char const *)arg2,arg3);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


SWIGEXPORT void swigc_save_to_xml(void* farg1,  const char*  farg2, int* farg3) {
  Teuchos::ParameterList *arg1 = 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  
  arg1 = (Teuchos::ParameterList *)(((Teuchos::RCP<const Teuchos::ParameterList > *)farg1)
    ? ((Teuchos::RCP<const Teuchos::ParameterList > *)farg1)->get()
    :0);
  if (!arg1)
  {
    throw std::logic_error("Attempt to dereference null Teuchos::ParameterList const &");
    return ;
  }
  arg2 = (char *)farg2; 
  arg3 = *farg3;
  {
    // Make sure no unhandled exceptions exist before performing a new action
    swig::fortran_check_unhandled_exception();
    try
    {
      // Attempt the wrapped function call
      save_to_xml((Teuchos::ParameterList const &)*arg1,(char const *)arg2,arg3);
    }
    catch (const std::range_error& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_IndexError, e.what()); return ; 
      } while(0);
    }
    catch (const std::exception& e)
    {
      // Store a C++ exception
      do {
        swig::fortran_store_exception(SWIG_RuntimeError, e.what()); return ; 
      } while(0);
    }
    catch (...)
    {
      do {
        swig::fortran_store_exception(SWIG_UnknownError, "An unknown exception occurred"); return ; 
      } while(0);
    }
  }
}


#ifdef __cplusplus
}
#endif

