xref: /aoo42x/main/rsc/inc/rsckey.hxx (revision f7c60c9c)
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 #ifndef _RSCKEY_HXX
24 #define _RSCKEY_HXX
25 
26 /****************** C l a s s   F o r w a r d s **************************/
27 class RscTop;
28 
29 #include <rscall.h>
30 
31 typedef struct {
32     Atom          nName;
33     sal_uInt32          nTyp;
34     long            yylval;
35 } KEY_STRUCT;
36 
37 class RscNameTable {
38     sal_Bool            bSort;      //soll bei jedem einfuegen sortiert werden?
39     sal_uInt32          nEntries;   //Anzahl der Eintr�ge
40     KEY_STRUCT *    pTable;
41 public:
42             RscNameTable();
43             ~RscNameTable();
44     void    SetSort( sal_Bool bSorted = sal_True );
45     Atom  Put( Atom nName, sal_uInt32 nTyp, long nValue );
46     Atom  Put( Atom nName, sal_uInt32 nTyp );
47     Atom  Put( const char * pName, sal_uInt32 nTyp, long nValue );
48     Atom  Put( const char * pName, sal_uInt32 nTyp );
49     Atom  Put( Atom nName, sal_uInt32 nTyp, RscTop * pClass );
50     Atom  Put( const char * pName, sal_uInt32 nTyp, RscTop * pClass );
51 
52             // sal_True, wurde gefunden
53     sal_Bool    Get( Atom nName, KEY_STRUCT * pEle );
54 };
55 
56 
57 #endif// _RSCKEY_HXX
58