/* ----------------------------------------------------------------------------
 * 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: Port extends: SwigProxy fields: swigCPtrForPort, swigCMemoryOwn {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    swigCMemoryOwn := newCMemoryOwn.
    swigCPtrForPort := newCPtr.
  ]

  Method [ getCPtrForPort
    ^swigCPtrForPort
  ]


  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

  Method [ delete 
    (swigCMemoryOwn and:[ swigCPtrForPort ~~ 0 ]) ifTrue:[
      swigCMemoryOwn := false.
      CslNI cslNI_delete_Port: swigCPtrForPort.
    ].
    swigCPtrForPort := 0.
  ]

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

  Function [ new
    ^self fromPointer: (CslNI cslNI_new_Port__SWIG_0) memoryOwn: true
  ]

  Function [ ug: ug
    ^self fromPointer: (CslNI cslNI_new_Port__SWIG_1: (UnitGenerator getCPtr: ug)) memoryOwn: true
  ]

  Function [ value: value
    ^self fromPointer: (CslNI cslNI_new_Port__SWIG_2: value) memoryOwn: true
  ]

  Method [ setMUGen: mUGen 
    CslNI cslNI_set_Port_mUGen: swigCPtrForPort with: (UnitGenerator getCPtr: mUGen)
  ]

  Method [ getMUGen 
    |cPtr|
    cPtr := CslNI cslNI_get_Port_mUGen: swigCPtrForPort .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ UnitGenerator fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ setMBuffer: mBuffer 
    CslNI cslNI_set_Port_mBuffer: swigCPtrForPort with: (Buffer getCPtr: mBuffer)
  ]

  Method [ getMBuffer 
    |cPtr|
    cPtr := CslNI cslNI_get_Port_mBuffer: swigCPtrForPort .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ Buffer fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ setMValue: mValue 
    CslNI cslNI_set_Port_mValue: swigCPtrForPort with: mValue
  ]

  Method [ getMValue 
    ^CslNI cslNI_get_Port_mValue: swigCPtrForPort 
  ]

  Method [ setMValuePtr: mValuePtr 
    CslNI cslNI_set_Port_mValuePtr: swigCPtrForPort with: (SwigTypePfloat getCPtr: mValuePtr)
  ]

  Method [ getMValuePtr 
    |cPtr|
    cPtr := CslNI cslNI_get_Port_mValuePtr: swigCPtrForPort .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ SwigTypePfloat fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ setMPtrIncrement: mPtrIncrement 
    CslNI cslNI_set_Port_mPtrIncrement: swigCPtrForPort with: mPtrIncrement
  ]

  Method [ getMPtrIncrement 
    ^CslNI cslNI_get_Port_mPtrIncrement: swigCPtrForPort 
  ]

  Method [ setMValueIndex: mValueIndex 
    CslNI cslNI_set_Port_mValueIndex: swigCPtrForPort with: mValueIndex
  ]

  Method [ getMValueIndex 
    ^CslNI cslNI_get_Port_mValueIndex: swigCPtrForPort 
  ]

  Method [ checkBuffer 
    CslNI cslNI_Port_checkBuffer: swigCPtrForPort 
  ]

  Method [ nextValue 
    ^CslNI cslNI_Port_nextValue: swigCPtrForPort 
  ]

  Method [ nextFrame: where 
    CslNI cslNI_Port_nextFrame: swigCPtrForPort with: (SwigTypePfloat getCPtr: where)
  ]

  Method [ resetPtr 
    CslNI cslNI_Port_resetPtr: swigCPtrForPort 
  ]

  Method [ isActive 
	^(CslNI cslNI_Port_isActive: swigCPtrForPort ) asBoolean
  ]

  Method [ dump 
    CslNI cslNI_Port_dump: swigCPtrForPort 
  ]

  Method [ isFixed 
	^(CslNI cslNI_Port_isFixed: swigCPtrForPort ) asBoolean
  ]

}
