/* ----------------------------------------------------------------------------
 * 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: UnitGenerator extends: Model fields: swigCPtrForUnitGenerator {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (CslNI cslNI_SWIGUnitGeneratorToModel: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForUnitGenerator := newCPtr.
  ]

  Method [ getCPtrForUnitGenerator
    ^swigCPtrForUnitGenerator
  ]


  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

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

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

  Function [ rate: rate chans: chans
    ^self fromPointer: (CslNI cslNI_new_UnitGenerator__SWIG_0: rate, chans) memoryOwn: true
  ]

  Function [ rate: rate
    ^self fromPointer: (CslNI cslNI_new_UnitGenerator__SWIG_1: rate) memoryOwn: true
  ]

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

  Method [ frameRate 
    ^CslNI cslNI_UnitGenerator_frameRate: swigCPtrForUnitGenerator 
  ]

  Method [ setFrameRate: rate 
    CslNI cslNI_UnitGenerator_setFrameRate: swigCPtrForUnitGenerator with: rate
  ]

  Method [ numChannels 
    ^CslNI cslNI_UnitGenerator_numChannels: swigCPtrForUnitGenerator 
  ]

  Method [ setNumChannels: ch 
    CslNI cslNI_UnitGenerator_setNumChannels: swigCPtrForUnitGenerator with: ch
  ]

  Method [ copyPolicy 
    ^CslNI cslNI_UnitGenerator_copyPolicy: swigCPtrForUnitGenerator 
  ]

  Method [ setCopyPolicy: ch 
    CslNI cslNI_UnitGenerator_setCopyPolicy: swigCPtrForUnitGenerator with: ch
  ]

  Method [ nextBuffer: outputBuffer 
    CslNI cslNI_UnitGenerator_nextBuffer__SWIG_0: swigCPtrForUnitGenerator with: (Buffer getCPtr: outputBuffer)
  ]

  Method [ nextBuffer: outputBuffer outBufNum: outBufNum 
    CslNI cslNI_UnitGenerator_nextBuffer__SWIG_1: swigCPtrForUnitGenerator with: (Buffer getCPtr: outputBuffer) with: outBufNum
  ]

  Method [ isFixed 
	^(CslNI cslNI_UnitGenerator_isFixed: swigCPtrForUnitGenerator ) asBoolean
  ]

  Method [ isActive 
	^(CslNI cslNI_UnitGenerator_isActive: swigCPtrForUnitGenerator ) asBoolean
  ]

  Method [ addOutput: ugen 
    CslNI cslNI_UnitGenerator_addOutput: swigCPtrForUnitGenerator with: (UnitGenerator getCPtr: ugen)
  ]

  Method [ removeOutput: ugen 
    CslNI cslNI_UnitGenerator_removeOutput: swigCPtrForUnitGenerator with: (UnitGenerator getCPtr: ugen)
  ]

  Method [ outputs 
    ^SwigTypePstdvectorTcslUnitGeneratorpstdallocatorTcslUnitGeneratorptt fromPointer: CslNI cslNI_UnitGenerator_outputs: swigCPtrForUnitGenerator  memoryOwn: true
  ]

  Method [ setValue: theValue 
    CslNI cslNI_UnitGenerator_setValue: swigCPtrForUnitGenerator with: theValue
  ]

  Method [ value 
    ^CslNI cslNI_UnitGenerator_value: swigCPtrForUnitGenerator 
  ]

  Method [ dump 
    CslNI cslNI_UnitGenerator_dump: swigCPtrForUnitGenerator 
  ]

}
