24
|
1 |
/*
|
|
2 |
* Copyright (c) 2003 - 2004 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
/***************************************************************************
|
|
20 |
** File: cxml_vector.h
|
|
21 |
** Purpose: Provides the interface to vector utils
|
|
22 |
**************************************************************************/
|
|
23 |
|
|
24 |
#ifndef CXML_VECTOR_H
|
|
25 |
#define CXML_VECTOR_H
|
|
26 |
|
|
27 |
#ifdef __cplusplus
|
|
28 |
extern "C" {
|
|
29 |
#endif
|
|
30 |
|
|
31 |
/*
|
|
32 |
** Includes
|
|
33 |
*/
|
|
34 |
#include "cxml_internal.h"
|
|
35 |
|
|
36 |
struct CXML_Vector_s {
|
|
37 |
CXML_Vector_Metric_t elementSize;
|
|
38 |
CXML_Vector_Metric_t capacity;
|
|
39 |
CXML_Vector_Metric_t size;
|
|
40 |
CXML_Vector_Metric_t segmentSize;
|
|
41 |
CXML_Uint8** segmentList;
|
|
42 |
CXML_Vector_Metric_t segmentListSize;
|
|
43 |
CXML_Vector_Metric_t numSegments;
|
|
44 |
};
|
|
45 |
|
|
46 |
CXML_Vector_t*
|
|
47 |
CXML_Vector_Construct(CXML_Vector_Metric_t elementSize,
|
|
48 |
CXML_Vector_Metric_t segmentSize);
|
|
49 |
|
|
50 |
void CXML_Vector_Destruct(CXML_Vector_t* vector);
|
|
51 |
|
|
52 |
CXML_Uint8*
|
|
53 |
CXML_Vector_AddressAt(const CXML_Vector_t* thisObj,
|
|
54 |
CXML_Vector_Metric_t index);
|
|
55 |
|
|
56 |
void**
|
|
57 |
CXML_Vector_InsertAt(CXML_Vector_t* thisObj,
|
|
58 |
void* element,
|
|
59 |
CXML_Vector_Metric_t where,
|
|
60 |
void* sentinel);
|
|
61 |
|
|
62 |
NW_Status_t
|
|
63 |
CXML_Vector_RemoveAt(CXML_Vector_t* thisObj,
|
|
64 |
CXML_Vector_Metric_t index);
|
|
65 |
|
|
66 |
void**
|
|
67 |
CXML_Vector_ElementAt(const CXML_Vector_t* vector,
|
|
68 |
CXML_Vector_Metric_t index);
|
|
69 |
|
|
70 |
CXML_Vector_Metric_t
|
|
71 |
CXML_Vector_GetElementIndex(const CXML_Vector_t* vector,
|
|
72 |
void* target);
|
|
73 |
|
|
74 |
void
|
|
75 |
CXML_Vector_AdjustSegment(CXML_Vector_t* vector);
|
|
76 |
|
|
77 |
#ifdef __cplusplus
|
|
78 |
} /* extern "C" */
|
|
79 |
#endif
|
|
80 |
|
|
81 |
#endif /* CXML_VECTOR_H */
|
|
82 |
|