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