xref: /trunk/main/connectivity/source/inc/dbase/DIndexPage.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
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.
14  *
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).
20  *
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.
25  *
26  ************************************************************************/
27 
28 #ifndef _CONNECTIVITY_DBASE_INDEXPAGE_HXX_
29 #define _CONNECTIVITY_DBASE_INDEXPAGE_HXX_
30 
31 //#ifndef _REF_HXX
32 //#include <tools/ref.hxx>
33 //#endif
34 #include <vos/ref.hxx>
35 #include <tools/stream.hxx>
36 #ifndef _VECTOR_
37 #include <vector>
38 #endif
39 //#ifndef _CONNECTIVITY_FILE_FCODE_HXX_
40 //#include "file/fcode.hxx"
41 //#endif
42 //#ifndef _CONNECTIVITY_DBASE_INDEXNODE_HXX_
43 //#include "dbase/dindexnode.hxx"
44 //#endif
45 
46 #if 0
47 namespace connectivity
48 {
49     namespace dbase
50     {
51         //==================================================================
52         // Index Seitenverweis
53         //==================================================================
54         //  SV_DECL_REF(ONDXPage); // Basisklasse da weitere Informationen gehalten werden muessen
55 
56         class ONDXPage;
57         typedef vos::ORef<ONDXPage>         ONDXPagePtr_BASE;
58 
59         class ONDXPagePtr : public ONDXPagePtr_BASE //ONDXPageRef
60         {
61             friend  SvStream& operator << (SvStream &rStream, const ONDXPagePtr&);
62             friend  SvStream& operator >> (SvStream &rStream, ONDXPagePtr&);
63 
64             sal_uInt32  nPagePos;       // Position in der Indexdatei
65 
66         public:
67             ONDXPagePtr(sal_uInt32 nPos = 0):nPagePos(nPos){}
68             ONDXPagePtr(const ONDXPagePtr& rRef);
69             ONDXPagePtr(ONDXPage* pRefPage);
70 
71             ONDXPagePtr& operator=(const ONDXPagePtr& rRef);
72             ONDXPagePtr& operator=(ONDXPage* pPageRef);
73 
74             sal_uInt32 GetPagePos() const {return nPagePos;}
75             sal_Bool HasPage() const {return nPagePos != 0;}
76             sal_Bool Is() const { return isValid(); }
77             void Clear()
78             {
79                 unbind();
80             }
81         };
82 
83         SvStream& operator << (SvStream &rStream, const ONDXPagePtr&);
84         SvStream& operator >> (SvStream &rStream, ONDXPagePtr&);
85     }
86 }
87 #endif
88 #endif // _CONNECTIVITY_DBASE_INDEXPAGE_HXX_
89 
90