CWS-TOOLING: integrate CWS os146
[LibreOffice.git] / rsc / inc / rscclobj.hxx
blob75277813a8cb35f51b2d48c694d78e10f1e66a6a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef _RSCCLOBJ_HXX
28 #define _RSCCLOBJ_HXX
30 #include <rsctree.hxx>
31 #include <rscdef.hxx>
32 #include <rscall.h>
34 /****************** C L A S S E S ****************************************/
35 class RscTypCont;
37 /*********** R s c I n c o n s i s t e n t *******************************/
38 class RscInconsistent {
39 public:
40 RscId aFirstId; //Paar von inkonsistenten Id's
41 RscId aSecondId;
42 RscInconsistent( const RscId & rFirst, const RscId & rSecond ){
43 aFirstId = rFirst;
44 aSecondId = rSecond;
48 DECLARE_LIST( RscInconsList, RscInconsistent * )
50 /******************* O b j N o d e ***************************************/
51 class ObjNode : public IdNode{
52 RscId aRscId; // Id der Resource
53 CLASS_DATA pRscObj;// pointer to a resourceobject
54 sal_uLong lFileKey;// Dateischluessel
55 protected:
56 using NameNode::Search;
58 public:
59 using NameNode::Insert;
61 ObjNode( const RscId & rId, CLASS_DATA pData, sal_uLong lKey );
62 ObjNode * DelObjNode( RscTop * pClass, sal_uLong lFileKey );
63 sal_uInt32 GetId() const;
64 RscId GetRscId(){ return( aRscId ); }
65 sal_uLong GetFileKey(){ return lFileKey; };
66 ObjNode* Search( const RscId &rName ) const{
67 // search the index in the b-tree
68 return( (ObjNode *)IdNode::Search( rName ) );
70 sal_Bool Insert( ObjNode* pTN ){
71 // insert a new node in the b-tree
72 return( IdNode::Insert( (IdNode *)pTN ) );
74 CLASS_DATA GetRscObj(){
75 // get the Object from this Node
76 return( pRscObj );
78 sal_Bool IsConsistent( RscInconsList * pList = NULL );
81 /******************* R e f N o d e ***************************************/
82 class RefNode : public IdNode{
83 Atom nTypNameId; // index of a Name in a hashtabel
84 protected:
85 using NameNode::Search;
87 public:
88 using NameNode::Insert;
90 ObjNode* pObjBiTree; // Zeiger auf Objektbaum
91 RefNode( Atom nTyp );
92 sal_uInt32 GetId() const;
93 RefNode* Search( Atom typ ) const{
94 // search the index in the b-tree
95 return( (RefNode *)IdNode::Search( typ ) );
97 sal_Bool Insert( RefNode* pTN ){
98 // insert a new node in the b-tree
99 return( IdNode::Insert( (IdNode *)pTN ) );
101 sal_Bool PutObjNode( ObjNode * pPutObject );
103 // insert new node in b-tree pObjBiTree
104 ObjNode * GetObjNode( const RscId &rRscId );
106 ObjNode * GetObjNode(){
107 // hole pObjBiTree
108 return( pObjBiTree );
112 #endif // _RSCCLOBJ_HXX