20 #ifndef _RUNTIMESALOME_HXX_
21 #define _RUNTIMESALOME_HXX_
26 #ifdef _POSIX_C_SOURCE
27 #undef _POSIX_C_SOURCE
35 #include <omniORB4/CORBA.h>
44 PyObject* (*cxxObjRefToPyObjRef)(
const CORBA::Object_ptr cxx_obj,
45 CORBA::Boolean hold_lock);
50 CORBA::Boolean hold_lock);
55 PyObject* (*handleCxxSystemException)(
const CORBA::SystemException& ex);
92 static void setRuntime(
long flags = UsePython+UseCorba+UseXml+UseCpp+UseSalome,
93 int argc = 0,
char* argv[] = NULL);
97 virtual std::string getVersion()
const;
99 virtual void init(
long flags,
int argc,
char* argv[]);
102 virtual InputPort* createInputPort(
const std::string& name,
103 const std::string& impl,
107 virtual OutputPort* createOutputPort(
const std::string& name,
108 const std::string& impl,
117 virtual DataNode* createInDataNode(
const std::string& kind,
const std::string& name);
118 virtual DataNode* createOutDataNode(
const std::string& kind,
const std::string& name);
119 virtual InlineFuncNode* createFuncNode(
const std::string& kind,
const std::string& name);
120 virtual InlineNode* createScriptNode(
const std::string& kind,
const std::string& name);
122 virtual ServiceNode* createRefNode(
const std::string& kind,
const std::string& name);
123 virtual ServiceNode* createCompoNode(
const std::string& kind,
const std::string& name);
124 virtual ServiceInlineNode *createSInlineNode(
const std::string& kind,
const std::string& name);
126 const std::string& kind=
"");
127 virtual Container *createContainer(
const std::string& kind=
"");
128 virtual WhileLoop* createWhileLoop(
const std::string& name);
129 virtual ForLoop* createForLoop(
const std::string& name);
130 virtual OptimizerLoop* createOptimizerLoop(
const std::string& name,
const std::string& algLib,
131 const std::string& factoryName,
bool algInitOnFile,
132 const std::string& kind=
"",
Proc * procForTypes = NULL);
133 virtual Bloc* createBloc(
const std::string& name);
134 virtual Proc* createProc(
const std::string& name);
136 virtual TypeCode * createInterfaceTc(
const std::string&
id,
const std::string& name,
137 std::list<TypeCodeObjref *> ltc);
138 virtual TypeCode * createSequenceTc(
const std::string&
id,
const std::string& name,
TypeCode *content);
139 virtual TypeCodeStruct * createStructTc(
const std::string&
id,
const std::string& name);
142 const std::string& impl,
146 const std::
string& impl,
147 TypeCode * type,
bool init=false) throw (ConversionException);
150 const std::
string& impl,
151 TypeCode * type,
bool init) throw (ConversionException);
154 const std::
string& impl,
155 TypeCode * type,
bool init) throw (ConversionException);
158 TypeCode * type) throw (ConversionException);
161 TypeCode * type) throw (ConversionException);
164 TypeCode * type) throw (ConversionException);
167 TypeCode * type) throw (ConversionException);
170 TypeCode * type) throw (ConversionException);
173 const std::
string& impl,
174 TypeCode * type,
bool init) throw (ConversionException);
177 TypeCode * type) throw (ConversionException);
180 TypeCode * type) throw (ConversionException);
183 TypeCode * type,
bool init) throw (ConversionException);
186 TypeCode * type) throw (ConversionException);
189 TypeCode * type) throw (ConversionException);
192 const std::
string& impl,
193 TypeCode * type,
bool init) throw (ConversionException);
196 TypeCode * type) throw (ConversionException);
199 TypeCode * type) throw (ConversionException);
202 TypeCode * type) throw (ConversionException);
205 TypeCode * type) throw (ConversionException);
208 TypeCode * type) throw (ConversionException);
211 const std::
string& impl,
212 TypeCode * type,
bool init) throw (ConversionException);
215 TypeCode * type) throw (ConversionException);
218 TypeCode * type) throw (ConversionException);
221 TypeCode * type) throw (ConversionException);
224 TypeCode * type) throw (ConversionException);
226 TypeCode * type,
bool init) throw (ConversionException);
230 TypeCode * type) throw (ConversionException);
233 TypeCode * type) throw (ConversionException);
236 TypeCode * type) throw (ConversionException);
239 TypeCode * type) throw (ConversionException);
241 virtual
void* convertNeutral(
TypeCode * type,
Any *data);
242 virtual std::
string convertNeutralAsString(
TypeCode * type,
Any *data);
244 virtual PyObject* convertStringToPyObject(const std::
string& s);
248 CORBA::ORB_ptr getOrb();
249 PyObject * getPyOrb();
250 PyObject * getBuiltins();
251 DynamicAny::DynAnyFactory_ptr getDynFactory();
253 PyObject * get_omnipy();
257 RuntimeSALOME(
long flags,
int argc,
char* argv[]);
262 DynamicAny::DynAnyFactory_var _dynFactory;
266 bool _usePython, _useCorba, _useCpp, _useXml;