Update ooo320-m1
[ooovba.git] / autodoc / source / display / idl / hfi_hierarchy.hxx
blob79ba1fb870d9dd4b699dd94a936f07249f5aafa4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: hfi_hierarchy.hxx,v $
10 * $Revision: 1.6 $
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
34 // USED SERVICES
35 // BASE CLASSES
36 // COMPONENTS
37 // PARAMETERS
38 #include <ary/idl/i_comrela.hxx>
39 #include <ary/idl/i_types4idl.hxx>
42 namespace csi
44 namespace xml
46 class Element;
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.
59 class HF_IdlBaseNode
61 public:
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;
68 /** @descr
69 The constructor recursively calls further constructors of
70 HF_IdlBaseNode for the bases of ->i_rType, if ->i_rType matches to a
71 ->CE.
72 So it builds up a complete hierarchy tree of all base classes
73 of ->i_pEntity.
75 HF_IdlBaseNode(
76 const TYPE & i_rType,
77 const GATE & i_rGate,
78 intt i_nPositionOffset,
79 HF_IdlBaseNode & io_rDerived );
80 ~HF_IdlBaseNode();
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; }
96 private:
97 typedef std::vector< DYN HF_IdlBaseNode* > BaseList;
99 void GatherBases(
100 const CE & i_rCe,
101 const GATE & i_rGate );
103 // DATA
104 Type_id nType;
105 BaseList aBases;
106 intt nCountBases;
107 intt nPosition;
108 HF_IdlBaseNode * pDerived;
111 void Write_BaseHierarchy(
112 csi::xml::Element & o_rOut,
113 HtmlEnvironment_Idl &
114 i_env,
115 const ary::idl::CodeEntity &
116 i_rCe );
118 void Write_Bases(
119 csi::xml::Element & o_rOut,
120 HtmlEnvironment_Idl &
121 i_env,
122 const ary::idl::CodeEntity &
123 i_rCe,
124 std::vector<uintt> &
125 io_setColumns );
127 #endif