1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef SOLTOOLS_ST_GILRW_HXX
29 #define SOLTOOLS_ST_GILRW_HXX
32 #include "gilacces.hxx"
33 #include "st_list.hxx"
36 class List_GenericInfo
;
38 class GenericInfo_Parser
;
40 class ST_InfoListReader
: public GenericInfoParseTypes
,
41 private GenericInfoList_Builder
49 List_GenericInfo
& o_rList
,
50 const Simstr
& i_sFileName
);
53 UINT32
* o_pErrorLine
= 0 ) const;
55 // Interface GenericInfoList_Builder
59 const char * i_sValue
,
60 UINT32 i_nValueLength
,
61 const char * i_sComment
,
62 UINT32 i_nCommentLength
);
64 virtual void OpenList();
65 virtual void CloseList();
68 ST_InfoListReader( const ST_InfoListReader
& );
69 ST_InfoListReader
& operator=( const ST_InfoListReader
& );
75 ST_List
< List_GenericInfo
* >
77 GenericInfo
* pCurKey
;
80 class ST_InfoListWriter
: public GenericInfoParseTypes
,
81 private GenericInfoList_Browser
89 const Simstr
& i_sFileName
,
90 List_GenericInfo
& io_rList
);
93 E_Error
GetLastError() const;
96 // Interface GenericInfoList_Browser
97 virtual bool Start_CurList();
98 virtual bool NextOf_CurList();
100 virtual void Get_CurKey(
101 char * o_rKey
) const;
102 virtual void Get_CurValue(
103 char * o_rValue
) const;
104 virtual void Get_CurComment(
105 char * o_rComment
) const;
106 virtual bool HasSubList_CurKey() const;
108 virtual void Push_CurList();
109 virtual void Pop_CurList();
112 ST_InfoListWriter( const ST_InfoListWriter
& );
113 ST_InfoListWriter
& operator=( const ST_InfoListWriter
& );
119 ST_List
< List_GenericInfo
* >
121 GenericInfo
* pCurKey
;