Salome HOME
updated copyright message
[tools/yacsgen.git] / Examples / cppgui1 / components.py
index 13c53811a1798cb5833700e02f8b39b868fbcdf0..b0a90c4035f688bef29bc76d321c2264400713a9 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2014  EDF R&D
+# Copyright (C) 2009-2023  EDF
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -18,7 +18,7 @@
 #
 
 #import context from ..
-execfile("../context.py")
+exec(compile(open("../context.py").read(), "../context.py", 'exec'))
 
 import os
 from module_generator import *
@@ -41,12 +41,12 @@ public:
   virtual bool Load(SALOMEDS::SComponent_ptr theComponent, const SALOMEDS::TMPFile& theStream, const char* theURL, bool isMultiFile){return 0;};
   virtual bool LoadASCII(SALOMEDS::SComponent_ptr theComponent, const SALOMEDS::TMPFile& theStream, const char* theURL, bool isMultiFile){return 0;};
   virtual void Close(SALOMEDS::SComponent_ptr IORSComponent){};
-  virtual char* ComponentDataType(){return "cppcompos";};
+  virtual char* ComponentDataType(){return (char*)"cppcompos";};
   virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, const char* IORString, CORBA::Boolean isMultiFile, CORBA::Boolean isASCII){return 0;};
   virtual char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, const char* aLocalPersistentID, CORBA::Boolean isMultiFile,
                                        CORBA::Boolean isASCII){return 0;};
   virtual bool  CanPublishInStudy(CORBA::Object_ptr theIOR){return 0;};
-  virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,SALOMEDS::SObject_ptr theSObject,CORBA::Object_ptr theObject,
+  virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::SObject_ptr theSObject,CORBA::Object_ptr theObject,
                                                const char* theName){return 0;};
   virtual CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject){return 0;};
   virtual SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID){return 0;};
@@ -103,7 +103,6 @@ c1=CPPComponent("cppcompos",services=[
                        defs="//def1",body=body,
                  ),
           ],
-         includes="-I/usr/include",
          idls=["*.idl"],
          interfacedefs=idldefs,
          inheritedinterface="Idl_A",
@@ -119,9 +118,9 @@ modul=Module("cppcompos",components=[c1],prefix="./install",
 
 g=Generator(modul,context)
 g.generate()
-g.bootstrap()
+#g.configure("-DTBB_INCLUDE_DIR=/opt/tbb/2018.u6/include  -DTBB_ROOT=/opt/tbb/2018.u6/")
 g.configure()
 g.make()
 g.install()
-g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR}, sys_modules=SYS_MODULES)