xref: /aoo4110/main/soltools/inc/gilacces.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef SOLTOOLS_GILACCES_HXX
25 #define SOLTOOLS_GILACCES_HXX
26 
27 
28 
29 class GenericInfoParseTypes
30 {
31   public:
32     enum E_Error
33     {
34         ok = 0,
35         cannot_open,
36         unexpected_eof,
37         syntax_error,
38         unexpected_list_end
39     };
40 };
41 
42 
43 
44 /** This class is an abstract interface for a service, which
45     builds a memory structure out of a generic information
46     structure, read from a file or other stream.
47 
48     There may be different implementations, which build different kinds
49     of memory structures.
50 */
51 class GenericInfoList_Builder
52 {
53   public:
54     typedef unsigned long   UINT32;
55 
~GenericInfoList_Builder()56     virtual             ~GenericInfoList_Builder() {}
57 
58     virtual void        AddKey(
59                             const char *        i_sKey,
60                             UINT32              i_nKeyLength,
61                             const char *        i_sValue,
62                             UINT32              i_nValueLength,
63                             const char *        i_sComment,
64                             UINT32              i_nCommentLength ) = 0;
65 
66     virtual void        OpenList() = 0;
67     virtual void        CloseList() = 0;
68 };
69 
70 
71 /** This class is an abstract interface for a service, which
72     returns the values of a generic information tree out of
73     a memory structure.
74 
75     There may be different implementations, which browse different
76     kinds of memory structures.
77 */
78 class GenericInfoList_Browser
79 {
80   public:
~GenericInfoList_Browser()81     virtual             ~GenericInfoList_Browser() {}
82 
83     virtual bool        Start_CurList() = 0;
84     virtual bool        NextOf_CurList() = 0;
85 
86     virtual void        Get_CurKey(
87                             char *              o_rKey ) const = 0;
88     virtual void        Get_CurValue(
89                             char *              o_rValue ) const = 0;
90     virtual void        Get_CurComment(
91                             char *              o_rComment ) const = 0;
92     virtual bool        HasSubList_CurKey() const = 0;
93 
94     virtual void        Push_CurList() = 0;
95     virtual void        Pop_CurList() = 0;
96 };
97 
98 
99 #endif
100 
101