/* ----------------------------------------------------------------------------
 * 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: InOut extends: UnitGenerator fields: swigCPtrForInOut {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (CslNI cslNI_SWIGInOutToUnitGenerator: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForInOut := newCPtr.
  ]

  Method [ getCPtrForInOut
    ^swigCPtrForInOut
  ]


  Function [ new
    self noDefaultConstructorError
  ]

  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

  Method [ delete 
    (swigCMemoryOwn and:[ swigCPtrForInOut ~~ 0 ]) ifTrue:[
      swigCMemoryOwn := false.
      CslNI cslNI_delete_InOut: swigCPtrForInOut.
    ].
    swigCPtrForInOut := 0.
    super delete.
  ]

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

  Function [ anIO: anIO f: f inChan: inChan outChan: outChan
    ^self fromPointer: (CslNI cslNI_new_InOut__SWIG_0: (IO getCPtr: anIO), f, inChan, outChan) memoryOwn: true
  ]

  Function [ anIO: anIO f: f inChan: inChan
    ^self fromPointer: (CslNI cslNI_new_InOut__SWIG_1: (IO getCPtr: anIO), f, inChan) memoryOwn: true
  ]

  Function [ anIO: anIO f: f
    ^self fromPointer: (CslNI cslNI_new_InOut__SWIG_2: (IO getCPtr: anIO), f) memoryOwn: true
  ]

  Function [ anIO: anIO
    ^self fromPointer: (CslNI cslNI_new_InOut__SWIG_3: (IO getCPtr: anIO)) memoryOwn: true
  ]

  Method [ setInChan: chan 
    CslNI cslNI_InOut_setInChan: swigCPtrForInOut with: chan
  ]

  Method [ setOutChan: chan 
    CslNI cslNI_InOut_setOutChan: swigCPtrForInOut with: chan
  ]

  Method [ nextBuffer: outputBuffer 
    CslNI cslNI_InOut_nextBuffer: swigCPtrForInOut with: (Buffer getCPtr: outputBuffer)
  ]

}
