1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: st_gilrw.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SOLTOOLS_ST_GILRW_HXX
32 #define SOLTOOLS_ST_GILRW_HXX
35 #include "gilacces.hxx"
36 #include "st_list.hxx"
39 class List_GenericInfo
;
41 class GenericInfo_Parser
;
43 class ST_InfoListReader
: public GenericInfoParseTypes
,
44 private GenericInfoList_Builder
52 List_GenericInfo
& o_rList
,
53 const Simstr
& i_sFileName
);
56 UINT32
* o_pErrorLine
= 0 ) const;
58 // Interface GenericInfoList_Builder
62 const char * i_sValue
,
63 UINT32 i_nValueLength
,
64 const char * i_sComment
,
65 UINT32 i_nCommentLength
);
67 virtual void OpenList();
68 virtual void CloseList();
71 ST_InfoListReader( const ST_InfoListReader
& );
72 ST_InfoListReader
& operator=( const ST_InfoListReader
& );
78 ST_List
< List_GenericInfo
* >
80 GenericInfo
* pCurKey
;
83 class ST_InfoListWriter
: public GenericInfoParseTypes
,
84 private GenericInfoList_Browser
92 const Simstr
& i_sFileName
,
93 List_GenericInfo
& io_rList
);
96 E_Error
GetLastError() const;
99 // Interface GenericInfoList_Browser
100 virtual bool Start_CurList();
101 virtual bool NextOf_CurList();
103 virtual void Get_CurKey(
104 char * o_rKey
) const;
105 virtual void Get_CurValue(
106 char * o_rValue
) const;
107 virtual void Get_CurComment(
108 char * o_rComment
) const;
109 virtual bool HasSubList_CurKey() const;
111 virtual void Push_CurList();
112 virtual void Pop_CurList();
115 ST_InfoListWriter( const ST_InfoListWriter
& );
116 ST_InfoListWriter
& operator=( const ST_InfoListWriter
& );
122 ST_List
< List_GenericInfo
* >
124 GenericInfo
* pCurKey
;