/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version: 1.3.21
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


Class name: ExternalSquare extends: ExternalShape fields: swigCPtrForExternalSquare {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (ExampleClassNI exampleClassNI_SWIGExternalSquareToExternalShape: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForExternalSquare := newCPtr.
  ]

  Method [ getCPtrForExternalSquare
    ^swigCPtrForExternalSquare
  ]


  Function [ new
    self noDefaultConstructorError
  ]

  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

  Method [ delete 
    (swigCMemoryOwn and:[ swigCPtrForExternalSquare ~~ 0 ]) ifTrue:[
      swigCMemoryOwn := false.
      ExampleClassNI exampleClassNI_delete_ExternalSquare: swigCPtrForExternalSquare.
    ].
    swigCPtrForExternalSquare := 0.
    super delete.
  ]

  Function[ getCPtr: obj
     obj isNil ifTrue:[^0].
     ^obj getCPtrForExternalSquare
  ]

  Function [ fromWidth: fromWidth
    ^self fromPointer: (ExampleClassNI exampleClassNI_new_ExternalSquare: fromWidth) memoryOwn: true
  ]

  Method [ area 
    ^ExampleClassNI exampleClassNI_ExternalSquare_area: swigCPtrForExternalSquare 
  ]

  Method [ perimeter 
    ^ExampleClassNI exampleClassNI_ExternalSquare_perimeter: swigCPtrForExternalSquare 
  ]

}
