Home | History | Annotate | Download | only in include
      1 /*---------------------------------------------------------------------------*
      2  *  Int8ArrayListImpl.h  *
      3  *                                                                           *
      4  *  Copyright 2007, 2008 Nuance Communciations, Inc.                               *
      5  *                                                                           *
      6  *  Licensed under the Apache License, Version 2.0 (the 'License');          *
      7  *  you may not use this file except in compliance with the License.         *
      8  *                                                                           *
      9  *  You may obtain a copy of the License at                                  *
     10  *      http://www.apache.org/licenses/LICENSE-2.0                           *
     11  *                                                                           *
     12  *  Unless required by applicable law or agreed to in writing, software      *
     13  *  distributed under the License is distributed on an 'AS IS' BASIS,        *
     14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
     15  *  See the License for the specific language governing permissions and      *
     16  *  limitations under the License.                                           *
     17  *                                                                           *
     18  *---------------------------------------------------------------------------*/
     19 
     20 #ifndef __INT8ARRAYLISTIMPL_H
     21 #define __INT8ARRAYLISTIMPL_H
     22 
     23 
     24 
     25 #include "ESR_ReturnCode.h"
     26 #include "ESR_SharedPrefix.h"
     27 
     28 /**
     29  * Int8ArrayList implementation.
     30  */
     31 typedef struct Int8ArrayListImpl_t
     32 {
     33   /**
     34    * Interface functions that must be implemented.
     35    */
     36   Int8ArrayList Interface;
     37   /**
     38    * Int8ArrayList contents.
     39    */
     40   asr_int8_t* contents;
     41   /**
     42    * Virtual number of allocated element slots.
     43    */
     44   size_t virtualSize;
     45   /**
     46    * Actual number of allocated element slots.
     47    */
     48   size_t actualSize;
     49 }
     50 Int8ArrayListImpl;
     51 
     52 
     53 /**
     54  * Default implementation.
     55  */
     56 ESR_SHARED_API ESR_ReturnCode Int8ArrayList_Add(Int8ArrayList* self, const asr_int8_t element);
     57 
     58 /**
     59  * Default implementation.
     60  */
     61 ESR_SHARED_API ESR_ReturnCode Int8ArrayList_Remove(Int8ArrayList* self, const asr_int8_t element);
     62 
     63 /**
     64  * Default implementation.
     65  */
     66 ESR_SHARED_API ESR_ReturnCode Int8ArrayList_RemoveAll(Int8ArrayList* self);
     67 
     68 /**
     69  * Default implementation.
     70  */
     71 ESR_SHARED_API ESR_ReturnCode Int8ArrayList_Contains(Int8ArrayList* self, const asr_int8_t element, ESR_BOOL* exists);
     72 
     73 /**
     74  * Default implementation.
     75  */
     76 ESR_SHARED_API ESR_ReturnCode Int8ArrayList_Get(Int8ArrayList* self, size_t index, asr_int8_t* element);
     77 
     78 /**
     79  * Default implementation.
     80  */
     81 ESR_SHARED_API ESR_ReturnCode Int8ArrayList_Set(Int8ArrayList* self, size_t index, const asr_int8_t element);
     82 
     83 /**
     84  * Default implementation.
     85  */
     86 ESR_SHARED_API ESR_ReturnCode Int8ArrayList_GetSize(Int8ArrayList* self, size_t* size);
     87 
     88 /**
     89  * Default implementation.
     90  */
     91 ESR_SHARED_API ESR_ReturnCode Int8ArrayList_ToStaticArray(Int8ArrayList* self, asr_int8_t** newArray);
     92 
     93 /**
     94  * Default implementation.
     95  */
     96 ESR_SHARED_API ESR_ReturnCode Int8ArrayList_Clone(Int8ArrayList* self, Int8ArrayList* clone);
     97 
     98 /**
     99  * Default implementation.
    100  */
    101 ESR_SHARED_API ESR_ReturnCode Int8ArrayList_Destroy(Int8ArrayList* self);
    102 
    103 #endif /* __INT8ARRAYLISTIMPL_H */
    104