• Classes
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

xmltest.idl

Go to the documentation of this file.
00001 /*
00002  *    ALMA - Atacama Large Millimiter Array
00003  *    (c) European Southern Observatory, 2002
00004  *    Copyright by ESO (in the framework of the ALMA collaboration),
00005  *    All rights reserved
00006  *
00007  *    This library is free software; you can redistribute it and/or
00008  *    modify it under the terms of the GNU Lesser General Public
00009  *    License as published by the Free Software Foundation; either
00010  *    version 2.1 of the License, or (at your option) any later version.
00011  *
00012  *    This library is distributed in the hope that it will be useful,
00013  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  *    Lesser General Public License for more details.
00016  *
00017  *    You should have received a copy of the GNU Lesser General Public
00018  *    License along with this library; if not, write to the Free Software
00019  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00020  *    MA 02111-1307  USA
00021  */
00022 
00023 #ifndef _XMLTEST_IDL_
00024 #define _XMLTEST_IDL_
00025 
00026 #include <acscommon.idl>
00027 #include <acscomponent.idl>
00028 #include <fakexmlentity.idl>
00029 
00030 #pragma prefix "alma"
00031 
00032 
00033 module xmltest
00034 {
00035 
00036         /*********************************************************
00037          * typedefs for our entity objects
00038          *********************************************************/
00039 
00040         typedef fakexmlentity::XmlEntityStruct ObsProposal; // entity typedef
00041         typedef fakexmlentity::XmlEntityStruct SchedBlock; // entity typedef
00042 
00043         typedef sequence <SchedBlock> SchedBlockSeq; // typedef of sequence of entity typedef
00044 
00045         typedef SchedBlockSeq EvenMoreHiddenEntityClass; // typedef of typedef of sequence of entity typedef
00046 
00047 
00048         /*********************************************************
00049          * example component
00050          *********************************************************/
00051 
00052         interface NonXMLAcsComponent : ACS::ACSComponent
00053         {
00054                 string sayHello();
00055         };
00056 
00057         interface NonXMLIndirectAcsComponent : NonXMLAcsComponent
00058         {
00059         };
00060 
00061         interface XMLAcsComponent : ACS::ACSComponent
00062         {
00063                 string sayHello();
00064                 ObsProposal createObsProposal();
00065         };
00066 
00067         interface XMLNonAcsComponent
00068         {
00069                 string sayHello();
00070                 ObsProposal createObsProposal();
00071         };
00072 
00073 
00074         struct ObsProjectTree
00075         {
00076                 ObsProposal prop;
00077                 SchedBlockSeq schedBlocks;
00078         };
00079 
00080         struct NonXmlStruct 
00081         {
00082                 string mem1;
00083                 boolean mem2;
00084         };
00085         
00086         interface MyBaseInterface;
00087 
00088         interface ReturnInterface : ACS::ACSComponent
00089         {
00090                 typedef sequence <ObsProjectTree> ProjectTreeSeq; // typedef of sequence of struct with entity typedef
00091         
00092                 struct StructInsideInterfaceWithXmlViaMemberStruct 
00093                 {
00094                         NonXmlStruct normalStruct; // non-xml without typedef
00095                         ProjectTreeSeq projectTrees; // xml with typedef
00096                 };
00097                 
00098                 typedef NonXmlStruct NonXmlStructTypedef;
00099                 
00100                 struct StructInsideInterfaceWithXmlViaMemberStruct2 
00101                 {
00102                         NonXmlStructTypedef normalStruct; // non-xml with typedef
00103                         ObsProjectTree projectTree; // xml without typedef
00104                 };
00105                 
00106                 ObsProposal createObsProposal();
00107                 MyBaseInterface createBaseInterface(in long pippo);
00108         };
00109 
00110         // TODO: This interface is currently not recognized as being affected by XML
00111 //      interface XMLIndirectAcsComponent : ReturnInterface
00112 //      {
00113 //              string sayHello();
00114 //      };
00115 
00116         interface MyBaseInterface
00117         {
00118                 attribute float radius;
00119                 void someDumbMethod(in string stupidArg);
00120         };
00121 
00122 
00123         interface IFWithIndirectEntityUsage : ACS::ACSComponent
00124         {
00125                 SchedBlockSeq methodWithEntitySequence();
00126                 void methodWithHiddenEntitySequence(out EvenMoreHiddenEntityClass outThing);
00127         };
00128 
00129 
00130         /* ------------- */
00131         /* | Offshoots | */
00132         /* ------------- */
00133         interface NoXmlOffshoot : ACS::OffShoot
00134         {
00135                 void getNothing();
00136         };
00137 
00138         interface XmlOffshoot : ACS::OffShoot
00139         {
00140                 ObsProposal getObsProposal();
00141                 void setPreferedProposal(in ObsProposal proposal);
00142                 void setProjectTree(in ObsProjectTree tree);
00143         };
00144 
00145         typedef sequence <XmlOffshoot> XmlOffshootSeq; // typedef of sequence of interface
00146         
00147         
00148         /* ------------------------------------ */
00149         /* | Non-AcsComponent using Offshoots | */
00150         /* ------------------------------------ */
00151         interface NonComponentUsingXmlOffshoot {
00152                 XmlOffshoot getOffshoot();
00153         };
00154 
00155         /* --------------------------------- */
00156         /* | AcsComponents using Offshoots | */
00157         /* --------------------------------- */
00158         interface NormalComponentUsingXmlOffshoot : ACS::ACSComponent {
00159                 XmlOffshoot getOffshoot();
00160         };
00161 
00162         
00163         // forward-declare XmlOffshoot2 to test resolution of the interface definition.
00164         interface XmlOffshoot2;
00165         
00166         interface XmlOffshootReferencingOffshoot : ACS::OffShoot {
00167                 void setOtherOffshoot(in XmlOffshoot2 off2);
00168         };
00169         
00170         interface XmlOffshoot2 : ACS::OffShoot
00171         {
00172                 ObsProposal getObsProposal();
00173                 
00174                 // two offshoots referencing each other is currently not allowed (gives IllegalArgumentException)
00175                 //void setOtherOffshoot(in XmlOffshootReferencingOffshoot off);
00176         };
00177 
00178 
00179         interface XmlComponentUsingXmlOffshoot : ACS::ACSComponent {
00180                 ObsProposal createObsProposal();
00181                 XmlOffshoot getOffshoot();
00182         };
00183 
00184         interface NormalComponentUsingNormalOffshoot : ACS::ACSComponent {
00185                 NoXmlOffshoot getOffshoot();
00186         };
00187 
00188         interface XmlComponentUsingNormalOffshoot : ACS::ACSComponent {
00189                 ObsProposal createObsProposal();
00190                 NoXmlOffshoot getOffshoot();
00191         };
00192 };
00193 
00194 #endif

Generated on Fri Apr 15 2016 15:13:14 for ACS-2016.4 IDL interfaces by  doxygen 1.7.0