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 .
22 #include <rsctree.hxx>
26 /******************* O b j N o d e ***************************************/
27 class ObjNode
: public IdNode
{
28 RscId aRscId
; // Id der Resource
29 CLASS_DATA pRscObj
;// pointer to a resourceobject
30 sal_uLong lFileKey
;// Dateischluessel
32 using NameNode::Search
;
35 using NameNode::Insert
;
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 RscId
GetRscId(){ return( aRscId
); }
41 sal_uLong
GetFileKey(){ return lFileKey
; };
42 ObjNode
* Search( const RscId
&rName
) const{
43 // search the index in the b-tree
44 return( (ObjNode
*)IdNode::Search( rName
) );
46 sal_Bool
Insert( ObjNode
* pTN
){
47 // insert a new node in the b-tree
48 return( IdNode::Insert( (IdNode
*)pTN
) );
50 CLASS_DATA
GetRscObj(){
51 // get the Object from this Node
54 sal_Bool
IsConsistent();
57 /******************* R e f N o d e ***************************************/
58 class RefNode
: public IdNode
{
59 Atom nTypNameId
; // index of a Name in a hashtabel
61 using NameNode::Search
;
64 using NameNode::Insert
;
66 ObjNode
* pObjBiTree
; // Zeiger auf Objektbaum
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
) );
73 sal_Bool
Insert( RefNode
* pTN
){
74 // insert a new node in the b-tree
75 return( IdNode::Insert( (IdNode
*)pTN
) );
77 sal_Bool
PutObjNode( ObjNode
* pPutObject
);
79 // insert new node in b-tree pObjBiTree
80 ObjNode
* GetObjNode( const RscId
&rRscId
);
82 ObjNode
* GetObjNode(){
88 #endif // _RSCCLOBJ_HXX
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */