xref: /aoo41x/main/xml2cmp/source/inc/lst_str.h (revision 514f4c20)
1*514f4c20SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*514f4c20SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*514f4c20SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*514f4c20SAndrew Rist  * distributed with this work for additional information
6*514f4c20SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*514f4c20SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*514f4c20SAndrew Rist  * "License"); you may not use this file except in compliance
9*514f4c20SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*514f4c20SAndrew Rist  *
11*514f4c20SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*514f4c20SAndrew Rist  *
13*514f4c20SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*514f4c20SAndrew Rist  * software distributed under the License is distributed on an
15*514f4c20SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*514f4c20SAndrew Rist  * KIND, either express or implied.  See the License for the
17*514f4c20SAndrew Rist  * specific language governing permissions and limitations
18*514f4c20SAndrew Rist  * under the License.
19*514f4c20SAndrew Rist  *
20*514f4c20SAndrew Rist  *************************************************************/
21*514f4c20SAndrew Rist 
22*514f4c20SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef CPV_LST_STR_H
25cdf0e10cSrcweir #define CPV_LST_STR_H
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "str.h"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir 
30cdf0e10cSrcweir typedef struct LSElem
31cdf0e10cSrcweir {
32cdf0e10cSrcweir 	Cstring *			pData;
33cdf0e10cSrcweir 	struct LSElem *	pNext;
34cdf0e10cSrcweir } LSElem;
35cdf0e10cSrcweir 
36cdf0e10cSrcweir 
37cdf0e10cSrcweir typedef struct LSIterator
38cdf0e10cSrcweir {
39cdf0e10cSrcweir 	LSElem *       	pElement;
40cdf0e10cSrcweir } LSIterator;
41cdf0e10cSrcweir 
42cdf0e10cSrcweir 
43cdf0e10cSrcweir typedef struct ListCstring
44cdf0e10cSrcweir {
45cdf0e10cSrcweir 	LSElem *			dpStart;
46cdf0e10cSrcweir 	LSElem *			pEnd;
47cdf0e10cSrcweir     Bool                bAutoDeleteData;
48cdf0e10cSrcweir } ListCstring;
49cdf0e10cSrcweir 
50cdf0e10cSrcweir 
51cdf0e10cSrcweir #define ListCstring_THIS  	ListCstring * pThis
52cdf0e10cSrcweir #define LSIterator_THIS	LSIterator * pThis
53cdf0e10cSrcweir #define LSElem_THIS	    LSElem * pThis
54cdf0e10cSrcweir 
55cdf0e10cSrcweir 
56cdf0e10cSrcweir 
57cdf0e10cSrcweir void				ListCstring_CTOR( ListCstring_THIS,
58cdf0e10cSrcweir 						Bool                i_bAutoDeleteData );
59cdf0e10cSrcweir void				ListCstring_DTOR( ListCstring_THIS );
60cdf0e10cSrcweir 
61cdf0e10cSrcweir void				LS_Add( ListCstring_THIS,
62cdf0e10cSrcweir 						Cstring *			i_pData );
63cdf0e10cSrcweir void				LS_Empty( ListCstring_THIS,
64cdf0e10cSrcweir 						Bool				i_bDeleteData );
65cdf0e10cSrcweir void				LS_Append( ListCstring_THIS,
66cdf0e10cSrcweir 						char *				i_sStrings[],
67cdf0e10cSrcweir 						intt                i_nNrOfStrings );
68cdf0e10cSrcweir Bool				LS_IsEmpty( ListCstring_THIS );
69cdf0e10cSrcweir 
70cdf0e10cSrcweir LSIterator			LS_Begin( ListCstring_THIS );
71cdf0e10cSrcweir 
72cdf0e10cSrcweir 
73cdf0e10cSrcweir void				LSIterator_CTOR( LSIterator_THIS,
74cdf0e10cSrcweir 						LSElem *     		i_pElement );
75cdf0e10cSrcweir void				LSI_opp( LSIterator_THIS );  	/** operator++() */
76cdf0e10cSrcweir 
77cdf0e10cSrcweir Bool				LSI_obool( LSIterator_THIS );
78cdf0e10cSrcweir Cstring *			LSI_optr( LSIterator_THIS );  	/** operator->() */
79cdf0e10cSrcweir 
80cdf0e10cSrcweir 
81cdf0e10cSrcweir void				LSElem_CTOR( LSElem_THIS,
82cdf0e10cSrcweir 						Cstring *			i_pData );
83cdf0e10cSrcweir void				LSElem_DTOR( LSElem_THIS );
84cdf0e10cSrcweir 
85cdf0e10cSrcweir Cstring *			LSE_Data( LSElem_THIS );
86cdf0e10cSrcweir LSElem *			LSE_Next( LSElem_THIS );
87cdf0e10cSrcweir 
88cdf0e10cSrcweir void				LSE_SetNext( LSElem_THIS,
89cdf0e10cSrcweir 						LSElem *			i_pNext );
90cdf0e10cSrcweir void				LSE_DeleteData( LSElem_THIS );
91cdf0e10cSrcweir 
92cdf0e10cSrcweir 
93cdf0e10cSrcweir 
94cdf0e10cSrcweir #endif
95cdf0e10cSrcweir 
96