1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: hfi_hierarchy.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef ADC_DISPLAY_HFI_HIERARCHY_HXX
32 #define ADC_DISPLAY_HFI_HIERARCHY_HXX
38 #include <ary/idl/i_comrela.hxx>
39 #include <ary/idl/i_types4idl.hxx>
51 class HF_IdlInterface
;
52 class HtmlEnvironment_Idl
;
56 /** Represents a node in an pyramidic inheritance hierarchy which shall be
57 displayed in text mode.
62 typedef ary::idl::CodeEntity CE
;
63 typedef ary::idl::Type TYPE
;
64 typedef ary::idl::Gate GATE
;
65 typedef ary::idl::Ce_id Ce_id
;
66 typedef ary::idl::Type_id Type_id
;
69 The constructor recursively calls further constructors of
70 HF_IdlBaseNode for the bases of ->i_rType, if ->i_rType matches to a
72 So it builds up a complete hierarchy tree of all base classes
78 intt i_nPositionOffset
,
79 HF_IdlBaseNode
& io_rDerived
);
82 /** Recursively fills ->o_rPositionList with the instances of base
83 classes in the order in which they will be displayed.
85 void FillPositionList(
86 std::vector
< const HF_IdlBaseNode
* > &
87 o_rPositionList
) const;
89 Type_id
Type() const { return nType
; }
90 intt
BaseCount() const { return nCountBases
; }
91 intt
Position() const { return nPosition
; }
92 int Xpos() const { return 3*Position(); }
93 int Ypos() const { return 2*Position(); }
94 const HF_IdlBaseNode
* Derived() const { return pDerived
; }
97 typedef std::vector
< DYN HF_IdlBaseNode
* > BaseList
;
101 const GATE
& i_rGate
);
108 HF_IdlBaseNode
* pDerived
;
111 void Write_BaseHierarchy(
112 csi::xml::Element
& o_rOut
,
113 HtmlEnvironment_Idl
&
115 const ary::idl::CodeEntity
&
119 csi::xml::Element
& o_rOut
,
120 HtmlEnvironment_Idl
&
122 const ary::idl::CodeEntity
&