Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 : #ifndef _RSCCLOBJ_HXX
20 : #define _RSCCLOBJ_HXX
21 :
22 : #include <rsctree.hxx>
23 : #include <rscdef.hxx>
24 : #include <rscall.h>
25 :
26 : /******************* O b j N o d e ***************************************/
27 37712 : class ObjNode : public IdNode{
28 : RscId aRscId; // Id der Resource
29 : CLASS_DATA pRscObj;// pointer to a resourceobject
30 : sal_uLong lFileKey;// Dateischluessel
31 : protected:
32 : using NameNode::Search;
33 :
34 : public:
35 : using NameNode::Insert;
36 :
37 : ObjNode( const RscId & rId, CLASS_DATA pData, sal_uLong lKey );
38 : ObjNode * DelObjNode( RscTop * pClass, sal_uLong lFileKey );
39 : sal_uInt32 GetId() const;
40 18856 : RscId GetRscId(){ return( aRscId ); }
41 18914 : sal_uLong GetFileKey(){ return lFileKey; };
42 22 : ObjNode* Search( const RscId &rName ) const{
43 : // search the index in the b-tree
44 22 : return( (ObjNode *)IdNode::Search( rName ) );
45 : }
46 17470 : sal_Bool Insert( ObjNode* pTN ){
47 : // insert a new node in the b-tree
48 17470 : return( IdNode::Insert( (IdNode *)pTN ) );
49 : }
50 75442 : CLASS_DATA GetRscObj(){
51 : // get the Object from this Node
52 75442 : return( pRscObj );
53 : }
54 : sal_Bool IsConsistent();
55 : };
56 :
57 : /******************* R e f N o d e ***************************************/
58 185879 : class RefNode : public IdNode{
59 : Atom nTypNameId; // index of a Name in a hashtabel
60 : protected:
61 : using NameNode::Search;
62 :
63 : public:
64 : using NameNode::Insert;
65 :
66 : ObjNode* pObjBiTree; // Zeiger auf Objektbaum
67 : RefNode( Atom nTyp );
68 : sal_uInt32 GetId() const;
69 : RefNode* Search( Atom typ ) const{
70 : // search the index in the b-tree
71 : return( (RefNode *)IdNode::Search( typ ) );
72 : };
73 53898 : sal_Bool Insert( RefNode* pTN ){
74 : // insert a new node in the b-tree
75 53898 : return( IdNode::Insert( (IdNode *)pTN ) );
76 : };
77 : sal_Bool PutObjNode( ObjNode * pPutObject );
78 :
79 : // insert new node in b-tree pObjBiTree
80 : ObjNode * GetObjNode( const RscId &rRscId );
81 :
82 163925 : ObjNode * GetObjNode(){
83 : // hole pObjBiTree
84 163925 : return( pObjBiTree );
85 : };
86 : };
87 :
88 : #endif // _RSCCLOBJ_HXX
89 :
90 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|