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

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

  Method [ getCPtrForPartial
    ^swigCPtrForPartial
  ]


  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

  Method [ delete 
    (swigCMemoryOwn and:[ swigCPtrForPartial ~~ 0 ]) ifTrue:[
      swigCMemoryOwn := false.
      LorisNI lorisNI_delete_Partial: swigCPtrForPartial.
    ].
    swigCPtrForPartial := 0.
  ]

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

  Function [ new
    ^self fromPointer: (LorisNI lorisNI_new_Partial__SWIG_0) memoryOwn: true
  ]

  Function [ arg0: arg0
    ^self fromPointer: (LorisNI lorisNI_new_Partial__SWIG_1: (Partial getCPtr: arg0)) memoryOwn: true
  ]

  Method [ label 
    ^LorisNI lorisNI_Partial_label: swigCPtrForPartial 
  ]

  Method [ initialPhase 
    ^LorisNI lorisNI_Partial_initialPhase: swigCPtrForPartial 
  ]

  Method [ startTime 
    ^LorisNI lorisNI_Partial_startTime: swigCPtrForPartial 
  ]

  Method [ endTime 
    ^LorisNI lorisNI_Partial_endTime: swigCPtrForPartial 
  ]

  Method [ duration 
    ^LorisNI lorisNI_Partial_duration: swigCPtrForPartial 
  ]

  Method [ numBreakpoints 
    ^LorisNI lorisNI_Partial_numBreakpoints: swigCPtrForPartial 
  ]

  Method [ setLabel: l 
    LorisNI lorisNI_Partial_setLabel: swigCPtrForPartial with: l
  ]

  Method [ frequencyAt: time 
    ^LorisNI lorisNI_Partial_frequencyAt: swigCPtrForPartial with: time
  ]

  Method [ amplitudeAt: time 
    ^LorisNI lorisNI_Partial_amplitudeAt: swigCPtrForPartial with: time
  ]

  Method [ bandwidthAt: time 
    ^LorisNI lorisNI_Partial_bandwidthAt: swigCPtrForPartial with: time
  ]

  Method [ phaseAt: time 
    ^LorisNI lorisNI_Partial_phaseAt: swigCPtrForPartial with: time
  ]

  Method [ iterator 
    |cPtr|
    cPtr := LorisNI lorisNI_Partial_iterator: swigCPtrForPartial .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ PartialIterator fromPointer: cPtr memoryOwn: true ]
  ]

  Method [ remove: pos 
    LorisNI lorisNI_Partial_remove: swigCPtrForPartial with: (BreakpointPosition getCPtr: pos)
  ]

  Method [ first 
    |cPtr|
    cPtr := LorisNI lorisNI_Partial_first: swigCPtrForPartial .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ Breakpoint fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ last 
    |cPtr|
    cPtr := LorisNI lorisNI_Partial_last: swigCPtrForPartial .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ Breakpoint fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ insert: time bp: bp 
    LorisNI lorisNI_Partial_insert: swigCPtrForPartial with: time with: (Breakpoint getCPtr: bp)
  ]

  Method [ findAfter: time 
    |cPtr|
    cPtr := LorisNI lorisNI_Partial_findAfter: swigCPtrForPartial with: time.
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ PartialIterator fromPointer: cPtr memoryOwn: true ]
  ]

  Method [ findNearest: time 
    |cPtr|
    cPtr := LorisNI lorisNI_Partial_findNearest: swigCPtrForPartial with: time.
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ PartialIterator fromPointer: cPtr memoryOwn: true ]
  ]

}
