bump product version to 5.0.4.1
[LibreOffice.git] / rsc / inc / rscclobj.hxx
blob674b6b1964864ab5ae8d419a5b36f8064b5f7797
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
23 #include <rscdef.hxx>
24 #include <rscall.h>
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
32 protected:
33 using NameNode::Search;
35 public:
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
55 return pRscObj;
57 bool IsConsistent();
60 /******************* R e f N o d e ***************************************/
61 class RefNode : public IdNode
63 Atom nTypNameId; // index of a Name in a hashtabel
64 protected:
65 using NameNode::Search;
67 public:
68 using NameNode::Insert;
70 ObjNode* pObjBiTree; // Zeiger auf Objektbaum
71 RefNode( Atom nTyp );
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()
88 // hole pObjBiTree
89 return pObjBiTree;
93 #endif // INCLUDED_RSC_INC_RSCCLOBJ_HXX
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */