Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*************************************************************************
3 : *
4 : * The Contents of this file are made available subject to the terms of
5 : * either of the following licenses
6 : *
7 : * - GNU Lesser General Public License Version 2.1
8 : * - Sun Industry Standards Source License Version 1.1
9 : *
10 : * Sun Microsystems Inc., October, 2000
11 : *
12 : * GNU Lesser General Public License Version 2.1
13 : * =============================================
14 : * Copyright 2000 by Sun Microsystems, Inc.
15 : * 901 San Antonio Road, Palo Alto, CA 94303, USA
16 : *
17 : * This library is free software; you can redistribute it and/or
18 : * modify it under the terms of the GNU Lesser General Public
19 : * License version 2.1, as published by the Free Software Foundation.
20 : *
21 : * This library is distributed in the hope that it will be useful,
22 : * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 : * Lesser General Public License for more details.
25 : *
26 : * You should have received a copy of the GNU Lesser General Public
27 : * License along with this library; if not, write to the Free Software
28 : * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
29 : * MA 02111-1307 USA
30 : *
31 : *
32 : * Sun Industry Standards Source License Version 1.1
33 : * =================================================
34 : * The contents of this file are subject to the Sun Industry Standards
35 : * Source License Version 1.1 (the "License"); You may not use this file
36 : * except in compliance with the License. You may obtain a copy of the
37 : * License at http://www.openoffice.org/license.html.
38 : *
39 : * Software provided under this License is provided on an "AS IS" basis,
40 : * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
41 : * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
42 : * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
43 : * See the License for the specific provisions governing your rights and
44 : * obligations concerning the Software.
45 : *
46 : * The Initial Developer of the Original Code is: IBM Corporation
47 : *
48 : * Copyright: 2008 by IBM Corporation
49 : *
50 : * All Rights Reserved.
51 : *
52 : * Contributor(s): _______________________________________
53 : *
54 : *
55 : ************************************************************************/
56 : /*************************************************************************
57 : * @file
58 : * list related class
59 : ************************************************************************/
60 : /*************************************************************************
61 : * Change History
62 : Jan 2005 Created
63 : ************************************************************************/
64 :
65 : #ifndef LWPDLVLIST_HXX_
66 : #define LWPDLVLIST_HXX_
67 :
68 : #include "lwpatomholder.hxx"
69 : #include "lwpobj.hxx"
70 : /**
71 : * @brief Double Linked Virtual List
72 : */
73 : class LwpDLVList : public LwpObject
74 : {
75 : public:
76 : LwpDLVList(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
77 869 : virtual ~LwpDLVList(){}
78 : protected:
79 : LwpObjectID m_ListPrevious;
80 : LwpObjectID m_ListNext;
81 : protected:
82 : void Read();
83 : public:
84 : inline LwpObjectID* GetNext();
85 : inline LwpObjectID* GetPrevious();
86 : };
87 906 : LwpObjectID* LwpDLVList::GetNext()
88 : {
89 906 : return &m_ListNext;
90 : }
91 461 : LwpObjectID* LwpDLVList::GetPrevious()
92 : {
93 461 : return &m_ListPrevious;
94 : }
95 : /**
96 : * @brief Double Linked Named Family Virtual List
97 : */
98 : class LwpDLNFVList : public LwpDLVList
99 : {
100 : public:
101 : LwpDLNFVList(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
102 319 : virtual ~LwpDLNFVList(){}
103 : protected:
104 : LwpObjectID m_ChildHead;
105 : LwpObjectID m_ChildTail;
106 : LwpObjectID m_Parent;
107 : LwpAtomHolder m_Name;
108 : protected:
109 : void Read();
110 : void ReadName(LwpObjectStream* pObjStrm);
111 : public:
112 : // 01/17/2005
113 : inline LwpAtomHolder* GetName();
114 : //end
115 : inline LwpObjectID* GetChildHead();
116 : inline LwpObjectID* GetChildTail();
117 : inline LwpObjectID* GetParent();
118 : };
119 :
120 145 : LwpAtomHolder* LwpDLNFVList::GetName()
121 : {
122 145 : return &m_Name;
123 : }
124 :
125 371 : LwpObjectID* LwpDLNFVList::GetChildHead()
126 : {
127 371 : return &m_ChildHead;
128 : }
129 :
130 10 : LwpObjectID* LwpDLNFVList::GetChildTail()
131 : {
132 10 : return &m_ChildTail;
133 : }
134 :
135 792 : LwpObjectID* LwpDLNFVList::GetParent()
136 : {
137 792 : return &m_Parent;
138 : }
139 :
140 : class LwpPropList;
141 : /**
142 : * @brief Double Linked Named Family Properties Virtual List
143 : */
144 : class LwpDLNFPVList : public LwpDLNFVList
145 : {
146 : public:
147 : LwpDLNFPVList(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
148 : virtual ~LwpDLNFPVList();
149 : protected:
150 : sal_Bool m_bHasProperties;
151 : LwpPropList* m_pPropList;
152 : protected:
153 : void Read();
154 : void ReadPropertyList(LwpObjectStream* pObjStrm);
155 : public:
156 : inline LwpPropList* GetPropList();
157 : };
158 :
159 0 : LwpPropList* LwpDLNFPVList::GetPropList()
160 : {
161 0 : return m_pPropList;
162 : }
163 :
164 : /**
165 : * @brief Double Linked Virtual List Head Tail
166 : */
167 : class LwpDLVListHeadTail
168 : {
169 : public:
170 142 : LwpDLVListHeadTail(){}
171 : void Read(LwpObjectStream* pObjStrm);
172 : private:
173 : LwpObjectID m_ListHead;
174 : LwpObjectID m_ListTail;
175 : public:
176 : inline LwpObjectID* GetHead();
177 : inline LwpObjectID* GetTail();
178 : };
179 215 : LwpObjectID* LwpDLVListHeadTail::GetHead()
180 : {
181 215 : return &m_ListHead;
182 : }
183 0 : LwpObjectID* LwpDLVListHeadTail::GetTail()
184 : {
185 0 : return &m_ListTail;
186 : }
187 :
188 : /**
189 : * @brief Double Linked Virtual List Head
190 : */
191 : class LwpDLVListHead
192 : {
193 : public:
194 3 : LwpDLVListHead(){}
195 3 : ~LwpDLVListHead(){}
196 : void Read(LwpObjectStream* pObjStrm);
197 : inline LwpObjectID* GetFirst();
198 : protected:
199 : LwpObjectID m_objHead;//LwpDLVList
200 : };
201 0 : LwpObjectID* LwpDLVListHead::GetFirst()
202 : {
203 0 : return &m_objHead;
204 : }
205 :
206 : #endif
207 :
208 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|