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