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



#include <stdlib.h>
#include <string.h>
#include <stdio.h>


#include "example.h"


#ifdef __cplusplus
extern "C" {
#endif

SWIGEXPORT Shape * Delphi_new_Shape() {
  Shape * cresult = 0 ;
  Shape *result = 0 ;
  
  result = (Shape *)new Shape();
  *(Shape **)&cresult = result; 
  return cresult;
}


SWIGEXPORT void Delphi_delete_Shape(Shape * pasarg0) {
  Shape *arg1 = (Shape *) 0 ;
  
  arg1 = *(Shape **)&pasarg0; 
  delete arg1;
}


SWIGEXPORT void Delphi_Shape_x_set(Shape * pasarg0, double pasarg1) {
  Shape *arg1 = (Shape *) 0 ;
  double arg2 ;
  
  arg1 = *(Shape **)&pasarg0; 
  arg2 = (double)pasarg1;
  if (arg1) (arg1)->x = arg2;
}


SWIGEXPORT double Delphi_Shape_x_get(Shape * pasarg0) {
  double cresult = 0 ;
  Shape *arg1 = (Shape *) 0 ;
  double result;
  
  arg1 = *(Shape **)&pasarg0; 
  result = (double) ((arg1)->x);
  cresult = result; 
  return cresult;
}


SWIGEXPORT void Delphi_Shape_y_set(Shape * pasarg0, double pasarg1) {
  Shape *arg1 = (Shape *) 0 ;
  double arg2 ;
  
  arg1 = *(Shape **)&pasarg0; 
  arg2 = (double)pasarg1;
  if (arg1) (arg1)->y = arg2;
}


SWIGEXPORT double Delphi_Shape_y_get(Shape * pasarg0) {
  double cresult = 0 ;
  Shape *arg1 = (Shape *) 0 ;
  double result;
  
  arg1 = *(Shape **)&pasarg0; 
  result = (double) ((arg1)->y);
  cresult = result; 
  return cresult;
}


SWIGEXPORT void Delphi_Shape_testbool(Shape * pasarg0, bool pasarg1) {
  Shape *arg1 = (Shape *) 0 ;
  bool arg2 ;
  
  arg1 = *(Shape **)&pasarg0; 
  arg2 = (bool)pasarg1;
  (arg1)->testbool(arg2);
}


SWIGEXPORT void Delphi_Shape_move(Shape * pasarg0, double pasarg1, double pasarg2) {
  Shape *arg1 = (Shape *) 0 ;
  double arg2 ;
  double arg3 ;
  
  arg1 = *(Shape **)&pasarg0; 
  arg2 = (double)pasarg1;
  arg3 = (double)pasarg2;
  (arg1)->move(arg2,arg3);
}


SWIGEXPORT double Delphi_Shape_area(Shape * pasarg0) {
  double cresult = 0 ;
  Shape *arg1 = (Shape *) 0 ;
  double result;
  
  arg1 = *(Shape **)&pasarg0; 
  result = (double)(arg1)->area();
  cresult = result; 
  return cresult;
}


SWIGEXPORT double Delphi_Shape_perimeter(Shape * pasarg0) {
  double cresult = 0 ;
  Shape *arg1 = (Shape *) 0 ;
  double result;
  
  arg1 = *(Shape **)&pasarg0; 
  result = (double)(arg1)->perimeter();
  cresult = result; 
  return cresult;
}


SWIGEXPORT void Delphi_Shape_nshapes_set(int pasarg0) {
  int arg1 ;
  
  arg1 = (int)pasarg0;
  Shape::nshapes = arg1;
}


SWIGEXPORT int Delphi_Shape_nshapes_get() {
  int cresult = 0 ;
  int result;
  
  result = (int)Shape::nshapes;
  cresult = result; 
  return cresult;
}


SWIGEXPORT Circle * Delphi_new_Circle(double pasarg0) {
  Circle * cresult = 0 ;
  double arg1 ;
  Circle *result = 0 ;
  
  arg1 = (double)pasarg0;
  result = (Circle *)new Circle(arg1);
  *(Circle **)&cresult = result; 
  return cresult;
}


SWIGEXPORT double Delphi_Circle_area(Circle * pasarg0) {
  double cresult = 0 ;
  Circle *arg1 = (Circle *) 0 ;
  double result;
  
  arg1 = *(Circle **)&pasarg0; 
  result = (double)(arg1)->area();
  cresult = result; 
  return cresult;
}


SWIGEXPORT double Delphi_Circle_perimeter(Circle * pasarg0) {
  double cresult = 0 ;
  Circle *arg1 = (Circle *) 0 ;
  double result;
  
  arg1 = *(Circle **)&pasarg0; 
  result = (double)(arg1)->perimeter();
  cresult = result; 
  return cresult;
}


SWIGEXPORT void Delphi_delete_Circle(Circle * pasarg0) {
  Circle *arg1 = (Circle *) 0 ;
  
  arg1 = *(Circle **)&pasarg0; 
  delete arg1;
}


SWIGEXPORT Square * Delphi_new_Square(double pasarg0) {
  Square * cresult = 0 ;
  double arg1 ;
  Square *result = 0 ;
  
  arg1 = (double)pasarg0;
  result = (Square *)new Square(arg1);
  *(Square **)&cresult = result; 
  return cresult;
}


SWIGEXPORT double Delphi_Square_area(Square * pasarg0) {
  double cresult = 0 ;
  Square *arg1 = (Square *) 0 ;
  double result;
  
  arg1 = *(Square **)&pasarg0; 
  result = (double)(arg1)->area();
  cresult = result; 
  return cresult;
}


SWIGEXPORT double Delphi_Square_perimeter(Square * pasarg0) {
  double cresult = 0 ;
  Square *arg1 = (Square *) 0 ;
  double result;
  
  arg1 = *(Square **)&pasarg0; 
  result = (double)(arg1)->perimeter();
  cresult = result; 
  return cresult;
}


SWIGEXPORT void Delphi_delete_Square(Square * pasarg0) {
  Square *arg1 = (Square *) 0 ;
  
  arg1 = *(Square **)&pasarg0; 
  delete arg1;
}


#ifdef __cplusplus
}
#endif

