• Home
  • Raw
  • Download

Lines Matching refs:this

51 typedef pico_status_t (* picodata_cbPutItemMethod) (register picodata_CharBuffer this,
55 typedef pico_status_t (* picodata_cbGetItemMethod) (register picodata_CharBuffer this,
59 typedef pico_status_t (* picodata_cbSubResetMethod) (register picodata_CharBuffer this);
60 typedef pico_status_t (* picodata_cbSubDeallocateMethod) (register picodata_CharBuffer this, picoos…
81 static pico_status_t data_cbPutItem(register picodata_CharBuffer this,
85 static pico_status_t data_cbGetItem(register picodata_CharBuffer this,
89 pico_status_t picodata_cbReset(register picodata_CharBuffer this) in picodata_cbReset() argument
91 this->rear = 0; in picodata_cbReset()
92 this->front = 0; in picodata_cbReset()
93 this->len = 0; in picodata_cbReset()
94 if (NULL != this->subObj) { in picodata_cbReset()
95 return this->subReset(this); in picodata_cbReset()
106 picodata_CharBuffer this; in picodata_newCharBuffer() local
108 this = (picodata_CharBuffer) picoos_allocate(mm, sizeof(*this)); in picodata_newCharBuffer()
110 if (NULL == this) { in picodata_newCharBuffer()
113 this->buf = picoos_allocate(mm, size); in picodata_newCharBuffer()
114 if (NULL == this->buf) { in picodata_newCharBuffer()
115 picoos_deallocate(mm, (void*) &this); in picodata_newCharBuffer()
118 this->size = size; in picodata_newCharBuffer()
119 this->common = common; in picodata_newCharBuffer()
121 this->getItem = data_cbGetItem; in picodata_newCharBuffer()
122 this->putItem = data_cbPutItem; in picodata_newCharBuffer()
124 this->subReset = NULL; in picodata_newCharBuffer()
125 this->subDeallocate = NULL; in picodata_newCharBuffer()
126 this->subObj = NULL; in picodata_newCharBuffer()
128 picodata_cbReset(this); in picodata_newCharBuffer()
129 return this; in picodata_newCharBuffer()
133 picodata_CharBuffer *this) in picodata_disposeCharBuffer() argument
135 if (NULL != (*this)) { in picodata_disposeCharBuffer()
137 if (NULL != (*this)->subObj) { in picodata_disposeCharBuffer()
138 (*this)->subDeallocate(*this,mm); in picodata_disposeCharBuffer()
140 picoos_deallocate(mm,(void*)&(*this)->buf); in picodata_disposeCharBuffer()
141 picoos_deallocate(mm,(void*)this); in picodata_disposeCharBuffer()
145 pico_status_t picodata_cbPutCh(register picodata_CharBuffer this, in picodata_cbPutCh() argument
148 if (this->len < this->size) { in picodata_cbPutCh()
149 this->buf[this->rear++] = ch; in picodata_cbPutCh()
150 this->rear %= this->size; in picodata_cbPutCh()
151 this->len++; in picodata_cbPutCh()
159 picoos_int16 picodata_cbGetCh(register picodata_CharBuffer this) in picodata_cbGetCh() argument
162 if (this->len > 0) { in picodata_cbGetCh()
163 ch = this->buf[this->front++]; in picodata_cbGetCh()
164 this->front %= this->size; in picodata_cbGetCh()
165 this->len--; in picodata_cbGetCh()
176 static pico_status_t data_cbGetItem(register picodata_CharBuffer this, in data_cbGetItem() argument
182 if (this->len < PICODATA_ITEM_HEADSIZE) { /* item not in cb? */ in data_cbGetItem()
184 if (this->len == 0) { /* is cb empty? */ in data_cbGetItem()
192 *blen = PICODATA_ITEM_HEADSIZE + (picoos_uint8)(this->buf[((this->front) + in data_cbGetItem()
193 PICODATA_ITEMIND_LEN) % this->size]); in data_cbGetItem()
198 if (this->buf[this->front] != PICODATA_ITEM_FRAME) { in data_cbGetItem()
200 this->buf[this->front])); in data_cbGetItem()
202 this->front++; in data_cbGetItem()
203 this->front %= this->size; in data_cbGetItem()
204 this->len--; in data_cbGetItem()
211 if (*blen > this->len) { /* item in cb not complete? */ in data_cbGetItem()
213 "blen=%d, len=%d", *blen, this->len)); in data_cbGetItem()
227 this->front++; in data_cbGetItem()
228 this->front %= this->size; in data_cbGetItem()
229 this->len--; in data_cbGetItem()
236 buf[i] = (picoos_uint8)(this->buf[this->front++]); in data_cbGetItem()
237 this->front %= this->size; in data_cbGetItem()
238 this->len--; in data_cbGetItem()
261 static pico_status_t data_cbPutItem(register picodata_CharBuffer this, in data_cbPutItem() argument
273 if (*blen > (this->size - this->len)) { /* cb not enough space? */ in data_cbPutItem()
302 this->buf[this->rear++] = (picoos_char)buf[i]; in data_cbPutItem()
303 this->rear %= this->size; in data_cbPutItem()
304 this->len++; in data_cbPutItem()
321 pico_status_t picodata_cbGetItem(register picodata_CharBuffer this, in picodata_cbGetItem() argument
325 return this->getItem(this, buf, blenmax, blen, FALSE); in picodata_cbGetItem()
328 pico_status_t picodata_cbGetSpeechData(register picodata_CharBuffer this, in picodata_cbGetSpeechData() argument
333 return this->getItem(this, buf, blenmax, blen, TRUE); in picodata_cbGetSpeechData()
337 pico_status_t picodata_cbPutItem(register picodata_CharBuffer this, in picodata_cbPutItem() argument
342 return this->putItem(this,buf,blenmax,blen); in picodata_cbPutItem()
346 picoos_uint8 picodata_cbGetFrontItemType(register picodata_CharBuffer this) in picodata_cbGetFrontItemType() argument
348 return this->buf[this->front]; in picodata_cbGetFrontItemType()
577 static pico_status_t puSimpleInitialize (register picodata_ProcessingUnit this, picoos_int32 resetM… in puSimpleInitialize() argument
581 static pico_status_t puSimpleTerminate (register picodata_ProcessingUnit this) { in puSimpleTerminate() argument
585 static picodata_step_result_t puSimpleStep (register picodata_ProcessingUnit this, in puSimpleStep() argument
592 while ((result == PICO_OK) && (ch = picodata_cbGetCh(this->cbIn)) != PICO_EOF) { in puSimpleStep()
593 result = picodata_cbPutCh(this->cbOut,(picoos_char) ch); in puSimpleStep()
614 picodata_ProcessingUnit this = (picodata_ProcessingUnit) picoos_allocate(mm, sizeof(*this)); in picodata_newProcessingUnit() local
615 if (this == NULL) { in picodata_newProcessingUnit()
619 this->common = common; in picodata_newProcessingUnit()
620 this->cbIn = cbIn; in picodata_newProcessingUnit()
621 this->cbOut = cbOut; in picodata_newProcessingUnit()
622 this->voice = voice; in picodata_newProcessingUnit()
623 this->initialize = puSimpleInitialize; in picodata_newProcessingUnit()
624 this->terminate = puSimpleTerminate; in picodata_newProcessingUnit()
625 this->step = puSimpleStep; in picodata_newProcessingUnit()
626 this->subDeallocate = NULL; in picodata_newProcessingUnit()
627 this->subObj = NULL; in picodata_newProcessingUnit()
628 return this; in picodata_newProcessingUnit()
633 picodata_ProcessingUnit * this) in picodata_disposeProcessingUnit() argument
635 if (NULL != (*this)) { in picodata_disposeProcessingUnit()
637 if (NULL != (*this)->subObj) { in picodata_disposeProcessingUnit()
638 (*this)->subDeallocate(*this,mm); in picodata_disposeProcessingUnit()
640 picoos_deallocate(mm,(void *)this); in picodata_disposeProcessingUnit()
646 picodata_CharBuffer picodata_getCbIn(picodata_ProcessingUnit this) in picodata_getCbIn() argument
648 if (NULL == this) { in picodata_getCbIn()
649 picoos_emRaiseException(this->common->em,PICO_ERR_NULLPTR_ACCESS,NULL,NULL); in picodata_getCbIn()
652 return this->cbIn; in picodata_getCbIn()
656 picodata_CharBuffer picodata_getCbOut(picodata_ProcessingUnit this) in picodata_getCbOut() argument
658 if (NULL == this) { in picodata_getCbOut()
659 picoos_emRaiseException(this->common->em,PICO_ERR_NULLPTR_ACCESS,NULL,NULL); in picodata_getCbOut()
662 return this->cbOut; in picodata_getCbOut()
666 pico_status_t picodata_setCbIn(picodata_ProcessingUnit this, picodata_CharBuffer cbIn) in picodata_setCbIn() argument
668 if (NULL == this) { in picodata_setCbIn()
669 picoos_emRaiseException(this->common->em,PICO_ERR_NULLPTR_ACCESS,NULL,NULL); in picodata_setCbIn()
672 this->cbIn = cbIn; in picodata_setCbIn()
678 pico_status_t picodata_setCbOut(picodata_ProcessingUnit this, picodata_CharBuffer cbOut) in picodata_setCbOut() argument
680 if (NULL == this) { in picodata_setCbOut()
681 picoos_emRaiseException(this->common->em,PICO_ERR_NULLPTR_ACCESS,NULL,NULL); in picodata_setCbOut()
684 this->cbOut = cbOut; in picodata_setCbOut()