xref: /aoo42x/main/xml2cmp/source/xcd/xmltree.hxx (revision dd7bc091)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef X2C_XMLTREE_HXX
25 #define X2C_XMLTREE_HXX
26 
27 
28 
29 // USED SERVICES
30 	// BASE CLASSES
31 #include "xmlelem.hxx"
32 	// COMPONENTS
33 #include "../support/sistr.hxx"
34 #include "../support/list.hxx"
35 	// PARAMETERS
36 
37 
38 class CompDescrList;
39 
40 class ModuleDescription : public SequenceElement
41 {
42   public:
43 						ModuleDescription();
44 
45 	const Simstr &		ModuleName() const;
46 	void	            Get_SupportedServices(    /// @return also the children of component-description.
47 							List< const MultipleTextElement * > &
48 												o_rServices ) const;
49 	void				Get_Types(
50 							List< const MultipleTextElement * > &
51 												o_rTypes ) const;
52 	void				Get_ServiceDependencies(
53 							List< const MultipleTextElement * > &
54 												o_rServices ) const;
55   private:
56 	SglTextElement *	pModuleName;
57 	CompDescrList *		pCdList;
58 	MultipleTextElement *
59 						pTypes;
60 	MultipleTextElement *
61 						pServiceDependencies;
62 };
63 
64 
65 class ComponentDescription : public SequenceElement
66 {
67   public:
68 						ComponentDescription();
69 
ComponentName() const70 	const Simstr &		ComponentName() const	{ return pComponentName->Data(); }
71 	const MultipleTextElement &
SupportedServices() const72 						SupportedServices() const
73 												{ return *pSupportedServices; }
74 	const MultipleTextElement &
Types() const75 						Types() const           { return *pTypes; }
76 	const MultipleTextElement &
ServiceDependencies() const77 						ServiceDependencies() const
78 												{ return *pServiceDependencies; }
79   private:
80 	SglTextElement *	pComponentName;
81 	MultipleTextElement *
82 						pSupportedServices;
83 	MultipleTextElement *
84 						pTypes;
85 	MultipleTextElement *
86 						pServiceDependencies;
87 };
88 
89 class CompDescrList : public ListElement
90 {
91   public:
92 						CompDescrList();
93 	virtual void        Write2Html(
94 							HtmlCreator &		io_rHC ) const;
95 	virtual XmlElement *
96 						Create_and_Add_NewElement();
97 
98 	void				Get_SupportedServices(
99 							List< const MultipleTextElement * > &
100 												o_rResult ) const;
101 	void				Get_Types(
102 							List< const MultipleTextElement * > &
103 												o_rResult ) const;
104 	void				Get_ServiceDependencies(
105 							List< const MultipleTextElement * > &
106 												o_rResult ) const;
107   private:
108 	List< ComponentDescription * >
109 						aCDs;
110 };
111 
112 class MdName : public SglTextElement
113 {
114   public:
115 						MdName();
116 	virtual void        Write2Html(
117 							HtmlCreator &		io_rHC ) const;
118 };
119 
120 class CdName : public SglTextElement
121 {
122   public:
123 						CdName();
124 	virtual void        Write2Html(
125 							HtmlCreator &		io_rHC ) const;
126 };
127 
128 class SupportedService : public MultipleTextElement
129 {
130   public:
131 						SupportedService();
132 
133 	virtual void        Insert2Index(
134 	                    	Index & 	        o_rIndex ) const;
135 };
136 
137 
138 // IMPLEMENTATION
139 
140 
141 #endif
142 
143