Lines Matching refs:this

93 static pico_status_t ctrlInitialize(register picodata_ProcessingUnit this, picoos_int32 resetMode) {  in ctrlInitialize()  argument
98 if (NULL == this || NULL == this->subObj) { in ctrlInitialize()
101 ctrl = (ctrl_subobj_t *) this->subObj; in ctrlInitialize()
116 …picoos_emRaiseException(this->common->em,status,NULL,(picoos_char*)"problem (re-)initializing the … in ctrlInitialize()
133 static picodata_step_result_t ctrlStep(register picodata_ProcessingUnit this, in ctrlStep() argument
140 register ctrl_subobj_t * ctrl = (ctrl_subobj_t *) this->subObj; in ctrlStep()
236 static pico_status_t ctrlTerminate(register picodata_ProcessingUnit this) { in ctrlTerminate() argument
240 if (NULL == this || NULL == this->subObj) { in ctrlTerminate()
243 ctrl = (ctrl_subobj_t *) this->subObj; in ctrlTerminate()
262 static pico_status_t ctrlSubObjDeallocate(register picodata_ProcessingUnit this, in ctrlSubObjDeallocate() argument
267 if (NULL == this || NULL == this->subObj) { in ctrlSubObjDeallocate()
270 ctrl = (ctrl_subobj_t *) this->subObj; in ctrlSubObjDeallocate()
274 picodata_disposeProcessingUnit(this->common->mm,&ctrl->procUnit[i]); in ctrlSubObjDeallocate()
275 picodata_disposeCharBuffer(this->common->mm, &ctrl->procCbOut[i]); in ctrlSubObjDeallocate()
278 picoos_deallocate(this->common->mm, (void *) &this->subObj); in ctrlSubObjDeallocate()
295 static pico_status_t ctrlAddPU(register picodata_ProcessingUnit this, in ctrlAddPU() argument
304 if (this == NULL) { in ctrlAddPU()
307 ctrl = (ctrl_subobj_t *) this->subObj; in ctrlAddPU()
314 cbIn = this->cbIn; in ctrlAddPU()
321 ctrl->procCbOut[newPU] = this->cbOut; in ctrlAddPU()
325 ctrl->procCbOut[newPU] = picodata_newCharBuffer(this->common->mm, in ctrlAddPU()
326 this->common,bufSize); in ctrlAddPU()
339 ctrl->procUnit[newPU] = picotok_newTokenizeUnit(this->common->mm, in ctrlAddPU()
340 this->common, cbIn, ctrl->procCbOut[newPU], this->voice); in ctrlAddPU()
344 ctrl->procUnit[newPU] = picopr_newPreprocUnit(this->common->mm, in ctrlAddPU()
345 this->common, cbIn, ctrl->procCbOut[newPU], this->voice); in ctrlAddPU()
349 ctrl->procUnit[newPU] = picowa_newWordAnaUnit(this->common->mm, in ctrlAddPU()
350 this->common, cbIn, ctrl->procCbOut[newPU], this->voice); in ctrlAddPU()
354 ctrl->procUnit[newPU] = picosa_newSentAnaUnit(this->common->mm, in ctrlAddPU()
355 this->common, cbIn, ctrl->procCbOut[newPU], this->voice); in ctrlAddPU()
359 ctrl->procUnit[newPU] = picoacph_newAccPhrUnit(this->common->mm, in ctrlAddPU()
360 this->common, cbIn, ctrl->procCbOut[newPU], this->voice); in ctrlAddPU()
364 ctrl->procUnit[newPU] = picospho_newSentPhoUnit(this->common->mm, in ctrlAddPU()
365 this->common, cbIn, ctrl->procCbOut[newPU], this->voice); in ctrlAddPU()
369 ctrl->procUnit[newPU] = picopam_newPamUnit(this->common->mm, in ctrlAddPU()
370 this->common, cbIn, ctrl->procCbOut[newPU], this->voice); in ctrlAddPU()
374 ctrl->procUnit[newPU] = picocep_newCepUnit(this->common->mm, in ctrlAddPU()
375 this->common, cbIn, ctrl->procCbOut[newPU], this->voice); in ctrlAddPU()
380 ctrl->procUnit[newPU] = picosink_newSinkUnit(this->common->mm, in ctrlAddPU()
381 this->common, cbIn, ctrl->procCbOut[newPU], this->voice); in ctrlAddPU()
386 ctrl->procUnit[newPU] = picosig_newSigUnit(this->common->mm, in ctrlAddPU()
387 this->common, cbIn, ctrl->procCbOut[newPU], this->voice); in ctrlAddPU()
391 this->common->mm, this->common, cbIn, in ctrlAddPU()
392 ctrl->procCbOut[newPU], this->voice); in ctrlAddPU()
396 picodata_disposeCharBuffer(this->common->mm,&ctrl->procCbOut[newPU]); in ctrlAddPU()
405 picodata_ProcessingUnit * this);
425 picodata_ProcessingUnit this = picodata_newProcessingUnit(mm, common, cbIn, in picoctrl_newControl() local
427 if (this == NULL) { in picoctrl_newControl()
431 this->initialize = ctrlInitialize; in picoctrl_newControl()
432 this->step = ctrlStep; in picoctrl_newControl()
433 this->terminate = ctrlTerminate; in picoctrl_newControl()
434 this->subDeallocate = ctrlSubObjDeallocate; in picoctrl_newControl()
436 this->subObj = picoos_allocate(mm, sizeof(ctrl_subobj_t)); in picoctrl_newControl()
437 if (this->subObj == NULL) { in picoctrl_newControl()
438 picoos_deallocate(mm, (void **)(void*)&this); in picoctrl_newControl()
442 ctrl = (ctrl_subobj_t *) this->subObj; in picoctrl_newControl()
452 (PICO_OK == ctrlAddPU(this,PICODATA_PUTYPE_TOK, FALSE, /*last*/FALSE)) && in picoctrl_newControl()
453 (PICO_OK == ctrlAddPU(this,PICODATA_PUTYPE_PR, FALSE, FALSE)) && in picoctrl_newControl()
454 (PICO_OK == ctrlAddPU(this,PICODATA_PUTYPE_WA, FALSE, FALSE)) && in picoctrl_newControl()
455 (PICO_OK == ctrlAddPU(this,PICODATA_PUTYPE_SA, FALSE, FALSE)) && in picoctrl_newControl()
456 (PICO_OK == ctrlAddPU(this,PICODATA_PUTYPE_ACPH, FALSE, FALSE)) && in picoctrl_newControl()
457 (PICO_OK == ctrlAddPU(this,PICODATA_PUTYPE_SPHO, FALSE, FALSE)) && in picoctrl_newControl()
458 (PICO_OK == ctrlAddPU(this,PICODATA_PUTYPE_PAM, FALSE, FALSE)) && in picoctrl_newControl()
459 (PICO_OK == ctrlAddPU(this,PICODATA_PUTYPE_CEP, FALSE, FALSE)) && in picoctrl_newControl()
460 (PICO_OK == ctrlAddPU(this,PICODATA_PUTYPE_SIG, FALSE, TRUE)) in picoctrl_newControl()
467 return this; in picoctrl_newControl()
469 picoctrl_disposeControl(this->common->mm,&this); in picoctrl_newControl()
485 picodata_ProcessingUnit * this) in picoctrl_disposeControl() argument
487 picodata_disposeProcessingUnit(mm, this); in picoctrl_disposeControl()
524 pico_status_t picoctrl_engReset(picoctrl_Engine this, picoos_int32 resetMode) in picoctrl_engReset() argument
528 if (NULL == this) { in picoctrl_engReset()
531 picoos_emReset(this->common->em); in picoctrl_engReset()
533 status = this->control->terminate(this->control); in picoctrl_engReset()
535 status = this->control->initialize(this->control, resetMode); in picoctrl_engReset()
538 status = picodata_cbReset(this->cbIn); in picoctrl_engReset()
541 status = picodata_cbReset(this->cbOut); in picoctrl_engReset()
544 … picoos_emRaiseException(this->common->em,status,NULL,(picoos_char*) "problem resetting engine"); in picoctrl_engReset()
558 picoos_int16 picoctrl_isValidEngineHandle(picoctrl_Engine this) in picoctrl_isValidEngineHandle() argument
560 return (this != NULL) && CHECK_MAGIC_NUMBER(this); in picoctrl_isValidEngineHandle()
583 picoctrl_Engine this = (picoctrl_Engine) picoos_allocate(mm, sizeof(*this)); in picoctrl_newEngine() local
587 done = (NULL != this); in picoctrl_newEngine()
590 this->magic = 0; in picoctrl_newEngine()
591 this->common = NULL; in picoctrl_newEngine()
592 this->voice = NULL; in picoctrl_newEngine()
593 this->control = NULL; in picoctrl_newEngine()
594 this->cbIn = NULL; in picoctrl_newEngine()
595 this->cbOut = NULL; in picoctrl_newEngine()
597 this->raw_mem = picoos_allocate(mm, PICOCTRL_DEFAULT_ENGINE_SIZE); in picoctrl_newEngine()
598 if (NULL == this->raw_mem) { in picoctrl_newEngine()
604 engMM = picoos_newMemoryManager(this->raw_mem, PICOCTRL_DEFAULT_ENGINE_SIZE, in picoctrl_newEngine()
609 this->common = picoos_newCommon(engMM); in picoctrl_newEngine()
611 done = (NULL != this->common) && (NULL != engEM); in picoctrl_newEngine()
614 this->common->mm = engMM; in picoctrl_newEngine()
615 this->common->em = engEM; in picoctrl_newEngine()
617 done = (PICO_OK == picorsrc_createVoice(rm,voiceName,&(this->voice))); in picoctrl_newEngine()
622 this->cbIn = picodata_newCharBuffer(this->common->mm, in picoctrl_newEngine()
623 this->common, bSize); in picoctrl_newEngine()
626 this->cbOut = picodata_newCharBuffer(this->common->mm, in picoctrl_newEngine()
627 this->common, bSize); in picoctrl_newEngine()
629 PICODBG_DEBUG(("cbOut has address %i", (picoos_uint32) this->cbOut)); in picoctrl_newEngine()
632 this->control = picoctrl_newControl(this->common->mm, this->common, in picoctrl_newEngine()
633 this->cbIn, this->cbOut, this->voice); in picoctrl_newEngine()
634 done = (NULL != this->cbIn) && (NULL != this->cbOut) in picoctrl_newEngine()
635 && (NULL != this->control); in picoctrl_newEngine()
638 SET_MAGIC_NUMBER(this); in picoctrl_newEngine()
640 if (NULL != this) { in picoctrl_newEngine()
641 if (NULL != this->voice) { in picoctrl_newEngine()
642 picorsrc_releaseVoice(rm,&(this->voice)); in picoctrl_newEngine()
644 if(NULL != this->raw_mem) { in picoctrl_newEngine()
645 picoos_deallocate(mm,&(this->raw_mem)); in picoctrl_newEngine()
647 picoos_deallocate(mm,(void *)&this); in picoctrl_newEngine()
650 return this; in picoctrl_newEngine()
664 picoctrl_Engine * this) in picoctrl_disposeEngine() argument
666 if (NULL != (*this)) { in picoctrl_disposeEngine()
667 if (NULL != (*this)->voice) { in picoctrl_disposeEngine()
668 picorsrc_releaseVoice(rm,&((*this)->voice)); in picoctrl_disposeEngine()
670 if(NULL != (*this)->control) { in picoctrl_disposeEngine()
671 picoctrl_disposeControl((*this)->common->mm,&((*this)->control)); in picoctrl_disposeEngine()
673 if(NULL != (*this)->raw_mem) { in picoctrl_disposeEngine()
674 picoos_deallocate(mm,&((*this)->raw_mem)); in picoctrl_disposeEngine()
676 (*this)->magic ^= 0xFFFEFDFC; in picoctrl_disposeEngine()
677 picoos_deallocate(mm,(void **)this); in picoctrl_disposeEngine()
689 picoctrl_Engine this in picoctrl_engResetExceptionManager() argument
692 picoos_emReset(this->common->em); in picoctrl_engResetExceptionManager()
704 picoos_Common picoctrl_engGetCommon(picoctrl_Engine this) { in picoctrl_engGetCommon() argument
705 if (NULL == this) { in picoctrl_engGetCommon()
708 return this->common; in picoctrl_engGetCommon()
723 pico_status_t picoctrl_engFeedText(picoctrl_Engine this, in picoctrl_engFeedText() argument
726 if (NULL == this) { in picoctrl_engFeedText()
731 while ((*bytesPut < textSize) && (PICO_OK == picodata_cbPutCh(this->cbIn, text[*bytesPut]))) { in picoctrl_engFeedText()
750 picoctrl_Engine this, in picoctrl_engFetchOutputItemBytes() argument
758 if (NULL == this) { in picoctrl_engFetchOutputItemBytes()
762 stepResult = this->control->step(this->control,/* mode */0,&ui); in picoctrl_engFetchOutputItemBytes()
765 rv = picodata_cbGetSpeechData(this->cbOut, (picoos_uint8 *)buffer, in picoctrl_engFetchOutputItemBytes()
803 picoctrl_Engine this in picoctrl_getLastScheduledPU() argument
807 if (NULL == this || NULL == this->control->subObj) { in picoctrl_getLastScheduledPU()
810 ctrl = (ctrl_subobj_t *) ((*this).control->subObj); in picoctrl_getLastScheduledPU()
824 picoctrl_Engine this in picoctrl_getLastProducedItemType() argument
828 if (NULL == this || NULL == this->control->subObj) { in picoctrl_getLastProducedItemType()
831 ctrl = (ctrl_subobj_t *) ((*this).control->subObj); in picoctrl_getLastProducedItemType()