1 # Copyright (C) 2009-2013 EDF R&D
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 from string import Template
23 from compat import Template,set
28 #ifndef _${module}_IDL_
29 #define _${module}_IDL_
31 #include "DSC_Engines.idl"
32 #include "SALOME_Exception.idl"
33 #include "SALOME_PACOExtension.idl"
34 #include "SALOME_Component.idl"
35 #include "SALOME_Comm.idl"
36 #include "SALOME_Parametric.idl"
42 typedef sequence<string> stringvec;
43 typedef sequence<double> dblevec;
44 typedef sequence<long> intvec;
45 typedef Engines::dataref dataref;
55 interface ${component}:${inheritedinterface} Engines::Superv_Component
60 interface=Template(interface)
62 parallel_interface="""
63 interface ${component} : Engines::Parallel_DSC
68 parallel_interface=Template(parallel_interface)
74 <PaCO_Interface_description>
76 <Name>${module}_ORB</Name>
79 </PaCO_Interface_description>
85 <Name>${component}</Name>
88 xml_interface = Template(xml_interface)
92 <Name>${service_name}</Name>
93 <Type>distributed</Type>
95 xml_service = Template(xml_service)
98 include $$(top_srcdir)/adm_local/make_common_starter.am
100 BUILT_SOURCES = ${module}SK.cc ${PACO_BUILT_SOURCES} ${other_sks}
101 IDL_FILES=${module}.idl ${other_idls}
103 lib_LTLIBRARIES = libSalomeIDL${module}.la
104 salomeidl_DATA = $$(IDL_FILES) ${PACO_salomeidl_DATA}
105 libSalomeIDL${module}_la_SOURCES =
106 nodist_libSalomeIDL${module}_la_SOURCES = ${module}SK.cc ${other_sks}
107 nodist_salomeinclude_HEADERS= ${module}.hh ${PACO_SALOMEINCLUDE_HEADERS}
108 libSalomeIDL${module}_la_CXXFLAGS = -I. $$(SALOME_INCLUDES)
109 libSalomeIDL${module}_la_LIBADD = $$(SALOME_IDL_LIBS)
110 ##########################################################
112 \t$$(OMNIORB_IDL) -bcxx $$(OMNIORB_IDLCXXFLAGS) $$(IDL_INCLUDES) $$<
114 \t$$(OMNIORB_IDL) $$(OMNIORB_IDLPYFLAGS) $$(IDL_INCLUDES) ${PACO_INCLUDES} $$<
115 %PaCO.hxx %PaCO.cxx : %.idl %.xml
116 \t$$(OMNIORB_IDL) -I@KERNEL_ROOT_DIR@/idl/salome -p@PACOPATH@/lib/python -bpaco -Wb$$(top_srcdir)/idl/$$*.xml,$$(srcdir):@PACOPATH@/idl:@KERNEL_ROOT_DIR@/idl/salome $$(top_srcdir)/idl/$$*.idl
118 CLEANFILES = *.hh *SK.cc *.py *.hxx *.cxx
120 EXTRA_DIST = $$(IDL_FILES)
122 install-data-local: $$(IDL_FILES)
123 \t$$(INSTALL) -d $$(DESTDIR)$$(salomepythondir)
124 \tls $$^ | while read file; do \\
125 \t$$(OMNIORB_IDL) $$(OMNIORB_IDLPYFLAGS) $$(IDL_INCLUDES) -C$$(DESTDIR)$$(salomepythondir) $$$$file ; \\
129 \trm -rf $$(DESTDIR)$$(salomepythondir)/*
132 idlMakefile=Template(idlMakefile)
135 idlMakefilePaCO_BUILT_SOURCES = "${module}PaCO.cxx "
136 idlMakefilePaCO_nodist_salomeinclude_HEADERS = "${module}PaCO.hxx "
137 idlMakefilePaCO_BUILT_SOURCES = Template(idlMakefilePaCO_BUILT_SOURCES)
138 idlMakefilePaCO_nodist_salomeinclude_HEADERS = Template(idlMakefilePaCO_nodist_salomeinclude_HEADERS)
139 idlMakefilePACO_INCLUDES = "-I@PACOPATH@/idl"
140 idlMakefilePACO_salomepython_DATA = "${module}PaCO_idl.py"
141 idlMakefilePACO_salomepython_DATA = Template(idlMakefilePACO_salomepython_DATA)
142 idlMakefilePACO_salomeidl_DATA = "${module}PaCO.idl"
143 idlMakefilePACO_salomeidl_DATA = Template(idlMakefilePACO_salomeidl_DATA)
147 catalog="""<?xml version='1.0' encoding='us-ascii' ?>
149 <!-- XML component catalog -->
152 <!-- Path prefix information -->
157 <!-- Commonly used types -->
159 <objref name="pyobj" id="python:obj:1.0"/>
160 <objref name="file" id="file"/>
163 <!-- Component list -->
169 catalog=Template(catalog)
173 <!-- Component identification -->
174 <component-name>${component}</component-name>
175 <component-username>${component}</component-username>
176 <component-type>Data</component-type>
177 <component-author>${author}</component-author>
178 <component-version>1.0</component-version>
179 <component-comment></component-comment>
180 <component-multistudy>0</component-multistudy>
181 <component-impltype>${impltype}</component-impltype>
182 <component-implname>${implname}</component-implname>
183 <component-interface-list>
184 <component-interface-name>${component}</component-interface-name>
185 <component-interface-comment></component-interface-comment>
186 <component-service-list>
188 </component-service-list>
189 </component-interface-list>
191 cataCompo=Template(cataCompo)
193 cataService=""" <component-service>
194 <!-- service-identification -->
195 <service-name>${service}</service-name>
196 <service-author>${author}</service-author>
197 <service-version>1.0</service-version>
198 <service-comment></service-comment>
199 <service-by-default>0</service-by-default>
200 <!-- service-connexion -->
210 </component-service>"""
211 cataService=Template(cataService)
213 cataInparam=""" <inParameter>
214 <inParameter-name>${name}</inParameter-name>
215 <inParameter-type>${type}</inParameter-type>
217 cataInparam=Template(cataInparam)
219 cataOutparam=""" <outParameter>
220 <outParameter-name>${name}</outParameter-name>
221 <outParameter-type>${type}</outParameter-type>
223 cataOutparam=Template(cataOutparam)
225 cataInStream=""" <inParameter>
226 <inParameter-name>${name}</inParameter-name>
227 <inParameter-type>${type}</inParameter-type>
228 <inParameter-dependency>${dep}</inParameter-dependency>
230 cataInStream=Template(cataInStream)
232 cataOutStream=""" <outParameter>
233 <outParameter-name>${name}</outParameter-name>
234 <outParameter-type>${type}</outParameter-type>
235 <outParameter-dependency>${dep}</outParameter-dependency>
237 cataOutStream=Template(cataOutStream)
239 cataInParallelStream=""" <inParameter>
240 <inParameter-name>${name}</inParameter-name>
241 <inParameter-type>${type}</inParameter-type>
243 cataInParallelStream=Template(cataInParallelStream)
245 cataOutParallelStream=""" <outParameter>
246 <outParameter-name>${name}</outParameter-name>
247 <outParameter-type>${type}</outParameter-type>
249 cataOutParallelStream=Template(cataOutParallelStream)