xref: /aoo41x/main/xml2cmp/source/xcd/xmltree.hxx (revision cdf0e10c)
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 X2C_XMLTREE_HXX
29 #define X2C_XMLTREE_HXX
30 
31 
32 
33 // USED SERVICES
34 	// BASE CLASSES
35 #include "xmlelem.hxx"
36 	// COMPONENTS
37 #include "../support/sistr.hxx"
38 #include "../support/list.hxx"
39 	// PARAMETERS
40 
41 
42 class CompDescrList;
43 
44 class ModuleDescription : public SequenceElement
45 {
46   public:
47 						ModuleDescription();
48 
49 	const Simstr &		ModuleName() const;
50 	void	            Get_SupportedServices(    /// @return also the children of component-description.
51 							List< const MultipleTextElement * > &
52 												o_rServices ) const;
53 	void				Get_Types(
54 							List< const MultipleTextElement * > &
55 												o_rTypes ) const;
56 	void				Get_ServiceDependencies(
57 							List< const MultipleTextElement * > &
58 												o_rServices ) const;
59   private:
60 	SglTextElement *	pModuleName;
61 	CompDescrList *		pCdList;
62 	MultipleTextElement *
63 						pTypes;
64 	MultipleTextElement *
65 						pServiceDependencies;
66 };
67 
68 
69 class ComponentDescription : public SequenceElement
70 {
71   public:
72 						ComponentDescription();
73 
74 	const Simstr &		ComponentName() const	{ return pComponentName->Data(); }
75 	const MultipleTextElement &
76 						SupportedServices() const
77 												{ return *pSupportedServices; }
78 	const MultipleTextElement &
79 						Types() const           { return *pTypes; }
80 	const MultipleTextElement &
81 						ServiceDependencies() const
82 												{ return *pServiceDependencies; }
83   private:
84 	SglTextElement *	pComponentName;
85 	MultipleTextElement *
86 						pSupportedServices;
87 	MultipleTextElement *
88 						pTypes;
89 	MultipleTextElement *
90 						pServiceDependencies;
91 };
92 
93 class CompDescrList : public ListElement
94 {
95   public:
96 						CompDescrList();
97 	virtual void        Write2Html(
98 							HtmlCreator &		io_rHC ) const;
99 	virtual XmlElement *
100 						Create_and_Add_NewElement();
101 
102 	void				Get_SupportedServices(
103 							List< const MultipleTextElement * > &
104 												o_rResult ) const;
105 	void				Get_Types(
106 							List< const MultipleTextElement * > &
107 												o_rResult ) const;
108 	void				Get_ServiceDependencies(
109 							List< const MultipleTextElement * > &
110 												o_rResult ) const;
111   private:
112 	List< ComponentDescription * >
113 						aCDs;
114 };
115 
116 class MdName : public SglTextElement
117 {
118   public:
119 						MdName();
120 	virtual void        Write2Html(
121 							HtmlCreator &		io_rHC ) const;
122 };
123 
124 class CdName : public SglTextElement
125 {
126   public:
127 						CdName();
128 	virtual void        Write2Html(
129 							HtmlCreator &		io_rHC ) const;
130 };
131 
132 class SupportedService : public MultipleTextElement
133 {
134   public:
135 						SupportedService();
136 
137 	virtual void        Insert2Index(
138 	                    	Index & 	        o_rIndex ) const;
139 };
140 
141 
142 // IMPLEMENTATION
143 
144 
145 #endif
146 
147