1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_RSC_INC_RSCCLOBJ_HXX
20 #define INCLUDED_RSC_INC_RSCCLOBJ_HXX
22 #include <rsctree.hxx>
26 /******************* O b j N o d e ***************************************/
27 class ObjNode
: public IdNode
29 RscId aRscId
; // Id der Resource
30 CLASS_DATA pRscObj
;// pointer to a resourceobject
31 sal_uLong lFileKey
;// Dateischluessel
33 using NameNode::Search
;
36 using NameNode::Insert
;
38 ObjNode( const RscId
& rId
, CLASS_DATA pData
, sal_uLong lKey
);
39 ObjNode
* DelObjNode( RscTop
* pClass
, sal_uLong lFileKey
);
40 sal_uInt32
GetId() const SAL_OVERRIDE
;
41 RscId
GetRscId(){ return aRscId
; }
42 sal_uLong
GetFileKey(){ return lFileKey
; };
43 ObjNode
* Search( const RscId
&rName
) const //< search the index in the b-tree
45 return static_cast<ObjNode
*>(IdNode::Search( rName
));
47 bool Insert( ObjNode
* pTN
) //< insert a new node in the b-tree
50 return IdNode::Insert( (IdNode
*)pTN
);
52 CLASS_DATA
GetRscObj() //< get the Object from this Node
60 /******************* R e f N o d e ***************************************/
61 class RefNode
: public IdNode
63 Atom nTypNameId
; // index of a Name in a hashtabel
65 using NameNode::Search
;
68 using NameNode::Insert
;
70 ObjNode
* pObjBiTree
; // Zeiger auf Objektbaum
72 sal_uInt32
GetId() const SAL_OVERRIDE
;
73 RefNode
* Search( Atom typ
) const //< search the index in the b-tree
75 return static_cast<RefNode
*>(IdNode::Search( typ
));
77 bool Insert( RefNode
* pTN
) //< insert a new node in the b-tree
79 return IdNode::Insert( (IdNode
*)pTN
);
81 bool PutObjNode( ObjNode
* pPutObject
);
83 // insert new node in b-tree pObjBiTree
84 ObjNode
* GetObjNode( const RscId
&rRscId
);
86 ObjNode
* GetObjNode()
93 #endif // INCLUDED_RSC_INC_RSCCLOBJ_HXX
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */