xref: /trunk/main/xml2cmp/source/inc/lst_str.h (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef CPV_LST_STR_H
29 #define CPV_LST_STR_H
30 
31 #include "str.h"
32 
33 
34 typedef struct LSElem
35 {
36 	Cstring *			pData;
37 	struct LSElem *	pNext;
38 } LSElem;
39 
40 
41 typedef struct LSIterator
42 {
43 	LSElem *       	pElement;
44 } LSIterator;
45 
46 
47 typedef struct ListCstring
48 {
49 	LSElem *			dpStart;
50 	LSElem *			pEnd;
51     Bool                bAutoDeleteData;
52 } ListCstring;
53 
54 
55 #define ListCstring_THIS  	ListCstring * pThis
56 #define LSIterator_THIS	LSIterator * pThis
57 #define LSElem_THIS	    LSElem * pThis
58 
59 
60 
61 void				ListCstring_CTOR( ListCstring_THIS,
62 						Bool                i_bAutoDeleteData );
63 void				ListCstring_DTOR( ListCstring_THIS );
64 
65 void				LS_Add( ListCstring_THIS,
66 						Cstring *			i_pData );
67 void				LS_Empty( ListCstring_THIS,
68 						Bool				i_bDeleteData );
69 void				LS_Append( ListCstring_THIS,
70 						char *				i_sStrings[],
71 						intt                i_nNrOfStrings );
72 Bool				LS_IsEmpty( ListCstring_THIS );
73 
74 LSIterator			LS_Begin( ListCstring_THIS );
75 
76 
77 void				LSIterator_CTOR( LSIterator_THIS,
78 						LSElem *     		i_pElement );
79 void				LSI_opp( LSIterator_THIS );  	/** operator++() */
80 
81 Bool				LSI_obool( LSIterator_THIS );
82 Cstring *			LSI_optr( LSIterator_THIS );  	/** operator->() */
83 
84 
85 void				LSElem_CTOR( LSElem_THIS,
86 						Cstring *			i_pData );
87 void				LSElem_DTOR( LSElem_THIS );
88 
89 Cstring *			LSE_Data( LSElem_THIS );
90 LSElem *			LSE_Next( LSElem_THIS );
91 
92 void				LSE_SetNext( LSElem_THIS,
93 						LSElem *			i_pNext );
94 void				LSE_DeleteData( LSElem_THIS );
95 
96 
97 
98 #endif
99 
100