Version: 9.12.0
YACS::ENGINE Namespace Reference

Classes

class  AbstractPoint
 
class  StringOnHeap
 
class  Any
 : Interface for management of storage of data formated dynamically in its TypeCode. Warning virtual inheritance on Any daughter classes NOT supported. More...
 
class  AtomAny
 
class  SeqAlloc
 
class  ComposedAny
 
class  SequenceAny
 
class  ArrayAny
 
class  StructAny
 
class  AnyInputPort
 
class  AnyOutputPort
 
class  BagPoint
 
class  Bloc
 Composed node to group elementary and composed nodes. More...
 
struct  CFDirectionVisTraits
 
struct  CFDirectionVisTraits< true >
 
struct  CFDirectionVisTraits< false >
 
class  BlocPoint
 
class  Catalog
 class for YACS catalogs. More...
 
class  CatalogLoader
 class for YACS catalog loader. More...
 
class  ComplexWeight
 
class  ComponentDefinition
 Base class for component definition. More...
 
class  ComponentInstance
 Base class for all component instances. More...
 
class  ComposedNode
 Base class for all composed nodes. More...
 
class  ConditionInputPort
 
class  Container
 
class  ConversionException
 
class  DataFlowPort
 
class  DataNode
 Class for data parameters specification. More...
 
class  DataPort
 
class  DataStreamPort
 
class  DeploymentTreeOnHeap
 
class  DeploymentTree
 
class  Observer
 Base class for observer in observer pattern. More...
 
class  Dispatcher
 Base class for dispatcher in observer pattern. More...
 
class  DynParaLoop
 Base class for dynamically (fully or semifully) built graphs. More...
 
class  ElementaryNode
 Base class for all calculation nodes. More...
 
class  ElementaryPoint
 
class  Executor
 Threaded Executor. More...
 
class  InterceptorInputPort
 
class  AnySplitOutputPort
 
class  SeqAnyInputPort
 
class  SplitterNode
 
class  FakeNodeForForEachLoop
 
class  ForEachLoopPassedData
 
class  ForEachLoopGen
 
class  ForEachLoop
 Loop node for parametric calculation. More...
 
class  ForEachLoopDyn
 
class  ForkBlocPoint
 
class  ForLoop
 Class for for loop node. More...
 
class  HomogeneousPoolContainer
 
class  InGate
 
class  InlineNode
 Class for calculation node (script) inlined (and executed) in the schema. More...
 
class  InlineFuncNode
 Class for calculation node (function) inlined (and executed) in the schema. More...
 
class  InPort
 
class  InPropertyPort
 class for Input Property Ports More...
 
class  InputDataStreamPort
 
class  InputPort
 Base class for Input Ports. More...
 
class  ProxyPort
 Base class for Proxy Input Ports. More...
 
class  InvalidExtractionException
 
class  LinkedBlocPoint
 
class  LinkInfo
 Class that deal with list of semantics links for high level analysis. More...
 
class  Logger
 Class for logging error messages. More...
 
class  LogRecord
 Class for logging record. More...
 
class  InputPort4DF2DS
 
class  DFToDSForLoop
 
class  OutputPort4DS2DF
 
class  InputDataStreamPort4DS2DF
 
class  DSToDFForLoop
 
class  FakeNodeForLoop
 
class  Loop
 Base class for loop node. More...
 
class  NbBranchesAbstract
 
class  NbBranches
 
class  NoNbBranches
 
struct  ProgressWeight
 
class  NodeStateNameMap
 
class  Node
 Base class for all nodes. More...
 
class  NotSimpleCasePoint
 
class  OptimizerAlgBase
 Base class factorizing common methods for all algorithms interfaces. More...
 
class  OptimizerAlgASync
 Base class to implement in external dynamic lib in case of optimizer non event oriented. More...
 
class  FakeNodeForOptimizerLoop
 
class  OptimizerLoop
 class to build optimization loops More...
 
class  OutGate
 
class  OutPort
 
class  OutputDataStreamPort
 
class  OutputPort
 
class  Resource
 
class  ResourceIterator
 
class  PlayGround
 
class  PartDefinition
 
class  ContigPartDefinition
 
class  NonContigPartDefinition
 
class  AllPartDefinition
 
class  ForTestOmlyHPContCls
 
class  PluginSimplex
 
class  PointVisitor
 
class  Pool
 Pool used to manage the samples of the optimizer loop plugin. More...
 
class  Port
 Base class for all ports. More...
 
class  Proc
 Base class for all schema objects. More...
 
class  PropertyInterface
 Class for adding property interface to another class. More...
 
class  RefCounter
 
class  Runtime
 
class  Scheduler
 
class  ServerNode
 
class  ServiceInlineNode
 
class  ServiceNode
 Class for calculation node associated with a component service. More...
 
class  SetOfPoints
 
class  StaticDefinedComposedNode
 
class  CollectorSwOutPort
 
class  FakeNodeForSwitch
 
class  Switch
 Control node that emulates the C switch. More...
 
class  Task
 
class  TypeCode
 Base class for all type objects. More...
 
class  TypeCodeComposed
 
class  TypeCodeObjref
 Class for reference objects. More...
 
class  TypeCodeSeq
 Class for sequence objects. More...
 
class  TypeCodeArray
 Class for array objects. More...
 
class  TypeCodeStruct
 Class for struct type. More...
 
class  Visitor
 
struct  DataLinkInfo
 
struct  StreamLinkInfo
 
class  VisitorSaveSchema
 Base class for all visitors that save a schema. More...
 
class  SchemaSave
 
class  VisitorSaveState
 
class  WhileLoop
 Class for a while loop. More...
 
class  WlmTask
 
class  InputCalStreamPort
 Class for Input Calcium DataStream Ports. More...
 
class  OutputCalStreamPort
 Class for Output Calcium DataStream Ports. More...
 
class  CORBAComponent
 Class for CORBA component instance. More...
 
class  CorbaCorba
 Class for conversion from CORBA Output port to CORBA Input port. More...
 
class  CorbaCpp
 
class  CorbaNeutral
 
class  CORBANode
 Class for CORBA Service Node. More...
 
class  SalomeNode
 Class for Salome component Service Node. More...
 
class  InputCorbaPort
 Class for CORBA Input Ports. More...
 
class  OutputCorbaPort
 
class  CorbaPyDouble
 Class for conversion from CORBA Output port to Python Input port. More...
 
class  CorbaPyInt
 Class for conversion from CORBA Output port to Python Input port. More...
 
class  CorbaPyString
 Class for conversion from CORBA Output port to Python Input port. More...
 
class  CorbaPyBool
 Class for conversion from CORBA Output port to Python Input port. More...
 
class  CorbaPyObjref
 Class for conversion from CORBA Output port to Python Input port. More...
 
class  CorbaPySequence
 Class for conversion from CORBA Output port to Python Input port. More...
 
class  CorbaPyStruct
 Class for conversion of struct objects from CORBA Output port to Python Input port. More...
 
class  CorbaXml
 
struct  returnInfo
 
class  CppComponent
 
struct  LocalLibrary
 
class  LocalContainer
 
class  CppContainer
 
class  CppCorba
 
class  CppCpp
 Class for conversion from C++ Output port to C++ Input port. More...
 
class  CppNeutral
 
class  CppNode
 Class for C++ Nodes (in process component) More...
 
class  InputCppPort
 Class for C++ Ports. More...
 
class  OutputCppPort
 
class  CppPy
 
class  CppXml
 
class  DistributedPythonNode
 
class  NeutralCorbaInt
 
class  NeutralCorbaDouble
 
class  NeutralCorbaBool
 
class  NeutralCorbaSequence
 
class  NeutralCorbaString
 
class  NeutralCorbaObjref
 
class  NeutralCorbaStruct
 
class  NeutralCpp
 Class for conversion from Neutral Output port to Xml Input port. More...
 
class  NeutralInit
 Class for initialization of a Neutral port with YACS::ENGINE::Any* object. More...
 
class  NeutralPyDouble
 
class  NeutralPyInt
 
class  NeutralPyString
 
class  NeutralPyBool
 
class  NeutralPyObjref
 
class  NeutralPySequence
 
class  NeutralPyStruct
 
class  NeutralXml
 Class for conversion from Neutral Output port to XML Input port. More...
 
class  OutNode
 Class for data out node. More...
 
class  PresetNode
 Class for data in node. More...
 
class  OutputPresetPort
 Class for PRESET output Ports. More...
 
class  InputPresetPort
 Class for PRESET input Ports. More...
 
class  PyOptimizerAlgBase
 Base class factorizing common methods for python algorithms interfaces. More...
 
class  PyOptimizerAlgASync
 Base class to implement in external dynamic lib or external python module in case of a non event oriented optimizer using Python code. More...
 
struct  PyStdOut
 
class  PyCorbaInt
 
class  PyCorbaDouble
 
class  PyCorbaString
 
class  PyCorbaBool
 
class  PyCorbaObjref
 
class  PyCorbaSequence
 
class  PyCorbaStruct
 
class  PyCpp
 
class  PyInit
 
class  PyNeutral
 
class  PythonEntry
 
class  PythonNode
 
class  PyFuncNode
 
class  InterpreterUnlocker
 
class  InterpreterSaveThread
 
class  InputPyPort
 Class for Python Ports. More...
 
class  OutputPyPort
 
class  PyXml
 
class  RuntimeSALOME
 
class  SalomeComponent
 Class for Salome component instance. More...
 
class  SalomeContainer
 
class  SalomeContainerHelper
 
class  SalomeContainerMonoHelper
 
class  SalomeContainerMultiHelper
 
class  SalomeContainerTmpForHP
 
class  SalomeContainerToolsBase
 
class  SalomeContainerTools
 
class  SalomeContainerToolsDecorator
 
class  SALOMEDispatcher
 
class  SalomeHPComponent
 
class  SalomeHPContainer
 
class  SalomeHPContainerVectOfHelper
 
class  SalomeOptimizerLoop
 class to build optimization loops More...
 
class  SalomeProc
 
class  SalomePythonComponent
 
class  SalomePythonNode
 
class  SessionCataLoader
 
class  StudyInNode
 
class  StudyOutNode
 
class  OutputStudyPort
 Class for Study output Ports. More...
 
class  InputStudyPort
 Class for Study input Ports. More...
 
struct  isAdaptableDouble
 
struct  isAdaptableInt
 
struct  isAdaptableString
 
struct  isAdaptableBool
 
struct  isAdaptableObjref
 
struct  isAdaptableSequence
 
struct  isAdaptableArray
 
struct  isAdaptableStruct
 
struct  convertToYacsDouble
 Basic template convertor from type TIN to Yacs<TOUT> type. More...
 
struct  convertToYacsInt
 
struct  convertToYacsString
 
struct  convertToYacsBool
 
struct  convertToYacsObjref
 
struct  convertToYacsSequence
 
struct  convertToYacsArray
 
struct  convertToYacsStruct
 
struct  convertFromYacsDouble
 Basic convertor from Yacs<TOUT> type to full TOUT type. More...
 
struct  convertFromYacsInt
 
struct  convertFromYacsString
 
struct  convertFromYacsBool
 
struct  convertFromYacsObjref
 
struct  convertFromYacsSequence
 
struct  convertFromYacsArray
 
struct  convertFromYacsStruct
 
struct  convertToYacsDouble< PYTHONImpl, PyObject *, void *, IMPLOUT, TOUT >
 ToYacs Convertor for PYTHONImpl. More...
 
struct  convertToYacsInt< PYTHONImpl, PyObject *, void *, IMPLOUT, TOUT >
 
struct  convertToYacsString< PYTHONImpl, PyObject *, void *, IMPLOUT, TOUT >
 
struct  convertToYacsBool< PYTHONImpl, PyObject *, void *, IMPLOUT, TOUT >
 
struct  convertToYacsObjref< PYTHONImpl, PyObject *, void *, IMPLOUT, TOUT >
 
struct  convertToYacsSequence< PYTHONImpl, PyObject *, void *, IMPLOUT, TOUT >
 
struct  convertToYacsStruct< PYTHONImpl, PyObject *, void *, IMPLOUT, TOUT >
 
struct  convertFromYacsDouble< PYTHONImpl, PyObject * >
 FromYacs Convertor for PYTHONImpl. More...
 
struct  convertFromYacsInt< PYTHONImpl, PyObject * >
 
struct  convertFromYacsString< PYTHONImpl, PyObject * >
 
struct  convertFromYacsBool< PYTHONImpl, PyObject * >
 
struct  convertFromYacsObjref< PYTHONImpl, PyObject * >
 
struct  convertFromYacsSequence< PYTHONImpl, PyObject * >
 
struct  convertFromYacsStruct< PYTHONImpl, PyObject * >
 
struct  convertToYacsDouble< XMLImpl, xmlDocPtr, xmlNodePtr, IMPLOUT, TOUT >
 ToYacs Convertor for XMLImpl. More...
 
struct  convertToYacsInt< XMLImpl, xmlDocPtr, xmlNodePtr, IMPLOUT, TOUT >
 
struct  convertToYacsString< XMLImpl, xmlDocPtr, xmlNodePtr, IMPLOUT, TOUT >
 
struct  convertToYacsBool< XMLImpl, xmlDocPtr, xmlNodePtr, IMPLOUT, TOUT >
 
struct  convertToYacsObjref< XMLImpl, xmlDocPtr, xmlNodePtr, IMPLOUT, TOUT >
 
struct  convertToYacsSequence< XMLImpl, xmlDocPtr, xmlNodePtr, IMPLOUT, TOUT >
 
struct  convertToYacsStruct< XMLImpl, xmlDocPtr, xmlNodePtr, IMPLOUT, TOUT >
 
struct  convertFromYacsDouble< XMLImpl, std::string >
 FromYacs Convertor for XMLImpl. More...
 
struct  convertFromYacsInt< XMLImpl, std::string >
 
struct  convertFromYacsString< XMLImpl, std::string >
 
struct  convertFromYacsBool< XMLImpl, std::string >
 
struct  convertFromYacsObjref< XMLImpl, std::string >
 
struct  convertFromYacsSequence< XMLImpl, std::string >
 
struct  convertFromYacsStruct< XMLImpl, std::string >
 
struct  convertToYacsDouble< NEUTRALImpl, YACS::ENGINE::Any *, void *, IMPLOUT, TOUT >
 ToYacs Convertor for NEUTRALImpl. More...
 
struct  convertToYacsInt< NEUTRALImpl, YACS::ENGINE::Any *, void *, IMPLOUT, TOUT >
 
struct  convertToYacsString< NEUTRALImpl, YACS::ENGINE::Any *, void *, IMPLOUT, TOUT >
 
struct  convertToYacsBool< NEUTRALImpl, YACS::ENGINE::Any *, void *, IMPLOUT, TOUT >
 
struct  convertToYacsObjref< NEUTRALImpl, YACS::ENGINE::Any *, void *, IMPLOUT, TOUT >
 
struct  convertToYacsSequence< NEUTRALImpl, YACS::ENGINE::Any *, void *, IMPLOUT, TOUT >
 
struct  convertToYacsStruct< NEUTRALImpl, YACS::ENGINE::Any *, void *, IMPLOUT, TOUT >
 
struct  convertFromYacsDouble< NEUTRALImpl, YACS::ENGINE::Any * >
 FromYacs Convertor for NEUTRALImpl. More...
 
struct  convertFromYacsInt< NEUTRALImpl, YACS::ENGINE::Any * >
 
struct  convertFromYacsString< NEUTRALImpl, YACS::ENGINE::Any * >
 
struct  convertFromYacsBool< NEUTRALImpl, YACS::ENGINE::Any * >
 
struct  convertFromYacsObjref< NEUTRALImpl, YACS::ENGINE::Any * >
 
struct  convertFromYacsSequence< NEUTRALImpl, YACS::ENGINE::Any * >
 
struct  convertFromYacsStruct< NEUTRALImpl, YACS::ENGINE::Any * >
 
struct  convertToYacsDouble< CORBAImpl, CORBA::Any *, void *, IMPLOUT, TOUT >
 ToYacs Convertor for CORBAImpl. More...
 
struct  convertToYacsInt< CORBAImpl, CORBA::Any *, void *, IMPLOUT, TOUT >
 
struct  convertToYacsString< CORBAImpl, CORBA::Any *, void *, IMPLOUT, TOUT >
 
struct  convertToYacsBool< CORBAImpl, CORBA::Any *, void *, IMPLOUT, TOUT >
 
struct  convertToYacsObjref< CORBAImpl, CORBA::Any *, void *, IMPLOUT, TOUT >
 
struct  convertToYacsSequence< CORBAImpl, CORBA::Any *, void *, IMPLOUT, TOUT >
 
struct  convertToYacsStruct< CORBAImpl, CORBA::Any *, void *, IMPLOUT, TOUT >
 
struct  convertFromYacsDouble< CORBAImpl, CORBA::Any * >
 FromYacs Convertor for CORBAImpl. More...
 
struct  convertFromYacsInt< CORBAImpl, CORBA::Any * >
 
struct  convertFromYacsString< CORBAImpl, CORBA::Any * >
 
struct  convertFromYacsBool< CORBAImpl, CORBA::Any * >
 
struct  convertFromYacsObjref< CORBAImpl, CORBA::Any * >
 
struct  convertFromYacsSequence< CORBAImpl, CORBA::Any * >
 
struct  convertFromYacsStruct< CORBAImpl, CORBA::Any * >
 
struct  convertToYacsDouble< CPPImpl, void *, const TypeCode *, IMPLOUT, TOUT >
 ToYacs Convertor for CPPImpl. More...
 
struct  convertToYacsInt< CPPImpl, void *, const TypeCode *, IMPLOUT, TOUT >
 
class  VisitorSalomeSaveState
 
class  VisitorSaveSalomeSchema
 
class  XmlCorba
 
class  XmlCpp
 
class  XmlNeutral
 
class  XmlNode
 
class  InputXmlPort
 Class for XML Input Ports. More...
 
class  OutputXmlPort
 Class for XML Output Ports. More...
 
class  XmlPython
 
class  stateLoader
 class for parse an xml file, use a dedicated parser, to load a saved state of a SALOME execution. More...
 
class  stateParser
 specialized parser to load SALOME execution saved states. More...
 
class  graphParser
 
class  nodeParser
 
class  attrParser
 
class  portParser
 
class  valueParser
 
class  arrayParser
 
class  dataParser
 
class  simpleTypeParser
 
class  loopPortParser
 
class  sampleParser
 
class  ProcCataLoader
 

Typedefs

typedef void(* Deallocator) (void *)
 
typedef SharedPtr< AnyAnyPtr
 
typedef SharedPtr< AtomAnyAtomAnyPtr
 
typedef SharedPtr< SequenceAnySequenceAnyPtr
 
typedef SharedPtr< ArrayAnyArrayAnyPtr
 
typedef SharedPtr< StructAnyStructAnyPtr
 
typedef OptimizerAlgBase OptimizerAlgSync
 
typedef OptimizerAlgBase *(* OptimizerAlgBaseFactory) (Pool *pool)
 
typedef void *(* InitFunction) ()
 
typedef void(* RunFunction) (void *, const char *, int, int, Any **, Any **, returnInfo *)
 
typedef void(* TerminateFunction) (void **)
 
typedef void(* PingFunction) ()
 
typedef void(* MYRUN) (int nbin, int nbout, YACS::ENGINE::Any **in, YACS::ENGINE::Any **out)
 
typedef PyOptimizerAlgBase PyOptimizerAlgSync
 
typedef PyObject PyObj
 
typedef CORBA::TypeCode_ptr(* getCorbaTCFn) (const TypeCode *)
 

Enumerations

enum  TypeOfChannel { DATAFLOW , DATASTREAM }
 
enum  InfoReason {
  I_CF_USELESS = 41 , I_USELESS = 42 , I_BACK = 43 , I_BACK_USELESS = 44 ,
  I_BACK_CRAZY = 45 , I_DFDS = 46 , I_ALL = 49
}
 
enum  WarnReason {
  W_COLLAPSE = 141 , W_COLLAPSE_AND_USELESS = 142 , W_COLLAPSE_EL = 143 , W_COLLAPSE_EL_AND_USELESS = 144 ,
  W_BACK_COLLAPSE = 145 , W_BACK_COLLAPSE_AND_USELESS = 146 , W_BACK_COLLAPSE_EL = 147 , W_BACK_COLLAPSE_EL_AND_USELESS = 148 ,
  W_ALL = 149
}
 
enum  ErrReason {
  E_NEVER_SET_INPUTPORT = 241 , E_ONLY_BACKWARD_DEFINED = 242 , E_DS_LINK_UNESTABLISHABLE = 243 , E_COLLAPSE_DFDS = 244 ,
  E_COLLAPSE_DS = 245 , E_UNPREDICTABLE_FED = 246 , E_UNCOMPLETE_SW =247 , E_ALL = 249
}
 
enum  DynType {
  NONE = 0 , Double = 1 , Int = 2 , String = 3 ,
  Bool = 4 , Objref = 5 , Sequence = 6 , Array = 7 ,
  Struct = 8
}
 
enum  ImplType {
  CORBAImpl = 1 , PYTHONImpl = 2 , NEUTRALImpl = 3 , XMLImpl = 4 ,
  CPPImpl = 5
}
 
enum  XMLReadState {
  XMLNOCONTEXT = 0 , XMLINGRAPH = 1 , XMLINNODE = 2 , XMLINPORT = 3 ,
  XMLINVALUE = 4 , XMLDONE = 5 , XMLFATALERROR = 6
}
 

Functions

YACSLIBENGINE_EXPORT std::string ToBase64 (const std::string &bytes)
 
YACSLIBENGINE_EXPORT std::string FromBase64 (const std::string &bytes)
 
YACSLIBENGINE_EXPORT std::string FromBase64Safe (const std::string &bytes)
 
void YACSLIBENGINE_EXPORT NbDoneLoader (Loop *node, int val)
 
void YACSLIBENGINE_EXPORT StateLoader (Node *node, YACS::StatesForNode state)
 
void YACSLIBENGINE_EXPORT LoadObserversPluginIfAny (ComposedNode *rootNode, Executor *executor)
 
void YACSLIBENGINE_EXPORT UnLoadObserversPluginIfAny ()
 
YACSLIBENGINE_EXPORT RuntimegetRuntime ()
 
AnyconvertCorbaCpp (const TypeCode *t, CORBA::Any *A)
 
int isAdaptableCppCorba (const TypeCode *t1, const TypeCode *t2)
 
ostream & operator<< (ostream &os, const OutputCorbaPort &p)
 
YACSRUNTIMESALOME_EXPORT std::ostream & operator<< (std::ostream &os, const YACS::ENGINE::OutputCorbaPort &p)
 
CORBA::Any * convertCppCorba (const TypeCode *t, Any *data)
 
int isAdaptableCorbaCpp (const TypeCode *t1, const TypeCode *t2)
 
AnyconvertCppCpp (const TypeCode *t, Any *data)
 
int isAdaptableCppCpp (const TypeCode *t1, const TypeCode *t2)
 
AnyconvertCppNeutral (const TypeCode *t, Any *a)
 
int isAdaptableNeutralCpp (const TypeCode *t1, const TypeCode *t2)
 
PyObject * convertCppPyObject (const TypeCode *t, Any *a)
 
int isAdaptablePyObjectCpp (const TypeCode *t1, const TypeCode *t2)
 
std::string convertCppXml (const TypeCode *t, void *ob)
 
int isAdaptableXmlCpp (const TypeCode *t1, const TypeCode *t2)
 
AnyconvertNeutralCpp (const TypeCode *t, Any *data)
 
int isAdaptableCppNeutral (const TypeCode *t1, const TypeCode *t2)
 
static void PyStdOut_dealloc (PyStdOut *self)
 
static PyObject * PyStdOut_write (PyStdOut *self, PyObject *args)
 
PyObject * newPyStdOut (std::string &out)
 
PyObject * evalPy (const std::string &funcName, const std::string &strToEval)
 
PyObject * evalFuncPyWithNoParams (PyObject *func)
 
AnyconvertPyObjectCpp (const TypeCode *t, PyObject *data)
 
int isAdaptableCppPyObject (const TypeCode *t1, const TypeCode *t2)
 
YACSRUNTIMESALOME_EXPORT RuntimeSALOMEgetSALOMERuntime ()
 
SALOMEDS::SObject_ptr findOrCreateSoWithName (SALOMEDS::StudyBuilder_ptr builder, SALOMEDS::SObject_ptr sobj, const std::string &name)
 
std::string getImplName (ImplType impl)
 
CORBA::TypeCode_ptr getCorbaTCNull (const TypeCode *t)
 
CORBA::TypeCode_ptr getCorbaTCDouble (const TypeCode *t)
 
CORBA::TypeCode_ptr getCorbaTCInt (const TypeCode *t)
 
CORBA::TypeCode_ptr getCorbaTCString (const TypeCode *t)
 
CORBA::TypeCode_ptr getCorbaTCBool (const TypeCode *t)
 
CORBA::TypeCode_ptr getCorbaTCObjref (const TypeCode *t)
 
CORBA::TypeCode_ptr getCorbaTCSequence (const TypeCode *t)
 
CORBA::TypeCode_ptr getCorbaTCStruct (const TypeCode *t)
 
CORBA::TypeCode_ptr getCorbaTC (const TypeCode *t)
 
template<ImplType IMPLIN, ImplType IMPLOUT>
int isAdaptable (const TypeCode *t1, const TypeCode *t2)
 
int isAdaptableCorbaPyObject (const TypeCode *t1, const TypeCode *t2)
 
int isAdaptableNeutralPyObject (const TypeCode *t1, const TypeCode *t2)
 
int isAdaptablePyObjectPyObject (const TypeCode *t1, const TypeCode *t2)
 
int isAdaptableCorbaNeutral (const TypeCode *t1, const TypeCode *t2)
 
int isAdaptablePyObjectNeutral (const TypeCode *t1, const TypeCode *t2)
 
int isAdaptableXmlNeutral (const TypeCode *t1, const TypeCode *t2)
 
int isAdaptableNeutralNeutral (const TypeCode *t1, const TypeCode *t2)
 
int isAdaptableNeutralXml (const TypeCode *t1, const TypeCode *t2)
 
int isAdaptableNeutralCorba (const TypeCode *t1, const TypeCode *t2)
 
int isAdaptableXmlCorba (const TypeCode *t1, const TypeCode *t2)
 
int isAdaptableCorbaCorba (const TypeCode *t1, const TypeCode *t2)
 
int isAdaptablePyObjectCorba (const TypeCode *t1, const TypeCode *t2)
 
template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT convertDouble (const TypeCode *t, TIN o, TIN2 aux)
 
template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT convertInt (const TypeCode *t, TIN o, TIN2 aux)
 
template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT convertString (const TypeCode *t, TIN o, TIN2 aux)
 
template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT convertBool (const TypeCode *t, TIN o, TIN2 aux)
 
template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT convertObjref (const TypeCode *t, TIN o, TIN2 aux)
 
template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT convertSequence (const TypeCode *t, TIN o, TIN2 aux)
 
template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT convertArray (const TypeCode *t, TIN o, TIN2 aux)
 
template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT convertStruct (const TypeCode *t, TIN o, TIN2 aux)
 
template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT YacsConvertor (const TypeCode *t, TIN o, TIN2 aux)
 
template<>
CORBA::Any * convertDouble< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * > (const TypeCode *t, CORBA::Any *o, void *aux)
 
template<>
CORBA::Any * convertInt< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * > (const TypeCode *t, CORBA::Any *o, void *aux)
 
template<>
CORBA::Any * convertString< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * > (const TypeCode *t, CORBA::Any *o, void *aux)
 
template<>
CORBA::Any * convertBool< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * > (const TypeCode *t, CORBA::Any *o, void *aux)
 
template<>
CORBA::Any * convertObjref< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * > (const TypeCode *t, CORBA::Any *o, void *aux)
 
template<>
CORBA::Any * convertStruct< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * > (const TypeCode *t, CORBA::Any *o, void *aux)
 
std::string convertPyObjectXml (const TypeCode *t, PyObject *data)
 
YACS::ENGINE::AnyconvertPyObjectNeutral (const TypeCode *t, PyObject *data)
 
CORBA::Any * convertPyObjectCorba (const TypeCode *t, PyObject *data)
 
PyObject * convertPyObjectPyObject (const TypeCode *t, PyObject *data)
 
std::string convertPyObjectToString (PyObject *ob)
 
PyObject * convertXmlPyObject (const TypeCode *t, xmlDocPtr doc, xmlNodePtr cur)
 
YACS::ENGINE::AnyconvertXmlNeutral (const TypeCode *t, xmlDocPtr doc, xmlNodePtr cur)
 
CORBA::Any * convertXmlCorba (const TypeCode *t, xmlDocPtr doc, xmlNodePtr cur)
 
PyObject * convertXmlStrPyObject (const TypeCode *t, std::string data)
 
PyObject * convertNeutralPyObject (const TypeCode *t, YACS::ENGINE::Any *data)
 
std::string convertNeutralXml (const TypeCode *t, YACS::ENGINE::Any *data)
 
CORBA::Any * convertNeutralCorba (const TypeCode *t, YACS::ENGINE::Any *data)
 
YACS::ENGINE::AnyconvertNeutralNeutral (const TypeCode *t, YACS::ENGINE::Any *data)
 
PyObject * convertCorbaPyObject (const TypeCode *t, CORBA::Any *data)
 
std::string convertCorbaXml (const TypeCode *t, CORBA::Any *data)
 
YACS::ENGINE::AnyconvertCorbaNeutral (const TypeCode *t, CORBA::Any *data)
 
CORBA::Any * convertCorbaCorba (const TypeCode *t, CORBA::Any *data)
 
template<ImplType IMPLIN, class TIN , class TIN2 >
static bool checkDouble (const TypeCode *t, TIN o, TIN2 aux)
 Basic template checker from type TIN. More...
 
template<ImplType IMPLIN, class TIN , class TIN2 >
static bool checkInt (const TypeCode *t, TIN o, TIN2 aux)
 
template<ImplType IMPLIN, class TIN , class TIN2 >
static bool checkBool (const TypeCode *t, TIN o, TIN2 aux)
 
template<ImplType IMPLIN, class TIN , class TIN2 >
static bool checkString (const TypeCode *t, TIN o, TIN2 aux)
 
template<ImplType IMPLIN, class TIN , class TIN2 >
static bool checkObjref (const TypeCode *t, TIN o, TIN2 aux)
 
template<ImplType IMPLIN, class TIN , class TIN2 >
static bool checkSequence (const TypeCode *t, TIN o, TIN2 aux)
 
template<ImplType IMPLIN, class TIN , class TIN2 >
static bool checkStruct (const TypeCode *t, TIN o, TIN2 aux)
 
template<ImplType IMPLIN, class TIN , class TIN2 >
static bool checkArray (const TypeCode *t, TIN o, TIN2 aux)
 
template<ImplType IMPLIN, class TIN , class TIN2 >
bool YacsChecker (const TypeCode *t, TIN o, TIN2 aux)
 
template<>
bool checkDouble< PYTHONImpl, PyObject *, void * > (const TypeCode *t, PyObject *o, void *aux)
 
template<>
bool checkInt< PYTHONImpl, PyObject *, void * > (const TypeCode *t, PyObject *o, void *aux)
 
template<>
bool checkBool< PYTHONImpl, PyObject *, void * > (const TypeCode *t, PyObject *o, void *aux)
 
template<>
bool checkString< PYTHONImpl, PyObject *, void * > (const TypeCode *t, PyObject *o, void *aux)
 
template<>
bool checkObjref< PYTHONImpl, PyObject *, void * > (const TypeCode *t, PyObject *o, void *aux)
 
template<>
bool checkSequence< PYTHONImpl, PyObject *, void * > (const TypeCode *t, PyObject *o, void *aux)
 
template<>
bool checkStruct< PYTHONImpl, PyObject *, void * > (const TypeCode *t, PyObject *o, void *aux)
 
bool checkPyObject (const TypeCode *t, PyObject *ob)
 
YACSLIBENGINE_EXPORT void schemaSaveState (Proc *proc, Executor *exec, const std::string &xmlSchemaFile)
 
AnyconvertXmlCpp (const TypeCode *t, xmlDocPtr doc, xmlNodePtr cur)
 
int isAdaptableCppXml (const TypeCode *t1, const TypeCode *t2)
 
YACSLOADER_EXPORT void loadState (YACS::ENGINE::Proc *p, const std::string &xmlStateFile)
 Load state from a file into a Proc. More...
 

Variables

static PyMethodDef PyStdOut_methods []
 
static PyMemberDef PyStdOut_memberlist []
 
static PyTypeObject PyStdOut_Type
 
getCorbaTCFn getCorbaTCFns []
 

Typedef Documentation

◆ AnyPtr

Definition at line 72 of file Any.hxx.

◆ ArrayAnyPtr

Definition at line 247 of file Any.hxx.

◆ AtomAnyPtr

Definition at line 109 of file Any.hxx.

◆ Deallocator

typedef void(* YACS::ENGINE::Deallocator) (void *)

Definition at line 43 of file Any.hxx.

◆ getCorbaTCFn

typedef CORBA::TypeCode_ptr(* YACS::ENGINE::getCorbaTCFn) (const TypeCode *)

Definition at line 85 of file TypeConversions.cxx.

◆ InitFunction

typedef void*(* YACS::ENGINE::InitFunction) ()

Definition at line 39 of file CppComponent.hxx.

◆ MYRUN

typedef void(* YACS::ENGINE::MYRUN) (int nbin, int nbout, YACS::ENGINE::Any **in, YACS::ENGINE::Any **out)

Definition at line 36 of file CppNode.hxx.

◆ OptimizerAlgBaseFactory

typedef OptimizerAlgBase*(* YACS::ENGINE::OptimizerAlgBaseFactory) (Pool *pool)

Definition at line 122 of file OptimizerAlg.hxx.

◆ OptimizerAlgSync

◆ PingFunction

typedef void(* YACS::ENGINE::PingFunction) ()

Definition at line 42 of file CppComponent.hxx.

◆ PyObj

typedef PyObject YACS::ENGINE::PyObj

Definition at line 65 of file PythonPorts.hxx.

◆ PyOptimizerAlgSync

◆ RunFunction

typedef void(* YACS::ENGINE::RunFunction) (void *, const char *, int, int, Any **, Any **, returnInfo *)

Definition at line 40 of file CppComponent.hxx.

◆ SequenceAnyPtr

Definition at line 201 of file Any.hxx.

◆ StructAnyPtr

Definition at line 284 of file Any.hxx.

◆ TerminateFunction

typedef void(* YACS::ENGINE::TerminateFunction) (void **)

Definition at line 41 of file CppComponent.hxx.

Enumeration Type Documentation

◆ DynType

Enumerator
NONE 
Double 
Int 
String 
Bool 
Objref 
Sequence 
Array 
Struct 

Definition at line 37 of file TypeCode.hxx.

38  {
39  NONE = 0,
40  Double = 1,
41  Int = 2,
42  String = 3,
43  Bool = 4,
44  Objref = 5,
45  Sequence = 6,
46  Array = 7,
47  Struct = 8
48  } DynType;

◆ ErrReason

Enumerator
E_NEVER_SET_INPUTPORT 
E_ONLY_BACKWARD_DEFINED 
E_DS_LINK_UNESTABLISHABLE 
E_COLLAPSE_DFDS 
E_COLLAPSE_DS 
E_UNPREDICTABLE_FED 
E_UNCOMPLETE_SW 
E_ALL 

Definition at line 67 of file LinkInfo.hxx.

68  {
72  E_COLLAPSE_DFDS = 244,
73  E_COLLAPSE_DS = 245,
74  E_UNPREDICTABLE_FED = 246,
75  E_UNCOMPLETE_SW =247,
76  E_ALL = 249
77  } ErrReason;
@ E_UNPREDICTABLE_FED
Definition: LinkInfo.hxx:74
@ E_NEVER_SET_INPUTPORT
Definition: LinkInfo.hxx:69
@ E_ONLY_BACKWARD_DEFINED
Definition: LinkInfo.hxx:70
@ E_DS_LINK_UNESTABLISHABLE
Definition: LinkInfo.hxx:71

◆ ImplType

Enumerator
CORBAImpl 
PYTHONImpl 
NEUTRALImpl 
XMLImpl 
CPPImpl 

Definition at line 48 of file TypeConversions.hxx.

◆ InfoReason

Enumerator
I_CF_USELESS 
I_USELESS 
I_BACK 
I_BACK_USELESS 
I_BACK_CRAZY 
I_DFDS 
I_ALL 

Definition at line 43 of file LinkInfo.hxx.

44  {
45  I_CF_USELESS = 41,
46  I_USELESS = 42,
47  I_BACK = 43,//In loop context
48  I_BACK_USELESS = 44,//In loop context - Not implemented yet
49  I_BACK_CRAZY = 45,//Out of loop context
50  I_DFDS = 46,
51  I_ALL = 49,
52  } InfoReason;

◆ TypeOfChannel

Enumerator
DATAFLOW 
DATASTREAM 

Definition at line 35 of file DataPort.hxx.

36  {
37  DATAFLOW,
39  } TypeOfChannel;

◆ WarnReason

Enumerator
W_COLLAPSE 
W_COLLAPSE_AND_USELESS 
W_COLLAPSE_EL 
W_COLLAPSE_EL_AND_USELESS 
W_BACK_COLLAPSE 
W_BACK_COLLAPSE_AND_USELESS 
W_BACK_COLLAPSE_EL 
W_BACK_COLLAPSE_EL_AND_USELESS 
W_ALL 

Definition at line 54 of file LinkInfo.hxx.

55  {
56  W_COLLAPSE = 141,
58  W_COLLAPSE_EL = 143,
60  W_BACK_COLLAPSE = 145,
62  W_BACK_COLLAPSE_EL = 147,
64  W_ALL = 149
65  } WarnReason;
@ W_COLLAPSE_EL_AND_USELESS
Definition: LinkInfo.hxx:59
@ W_BACK_COLLAPSE_AND_USELESS
Definition: LinkInfo.hxx:61
@ W_BACK_COLLAPSE_EL
Definition: LinkInfo.hxx:62
@ W_BACK_COLLAPSE_EL_AND_USELESS
Definition: LinkInfo.hxx:63
@ W_COLLAPSE_AND_USELESS
Definition: LinkInfo.hxx:57

◆ XMLReadState

Enumerator
XMLNOCONTEXT 
XMLINGRAPH 
XMLINNODE 
XMLINPORT 
XMLINVALUE 
XMLDONE 
XMLFATALERROR 

Definition at line 64 of file LoadState.hxx.

65  {
66  XMLNOCONTEXT = 0,
67  XMLINGRAPH = 1,
68  XMLINNODE = 2,
69  XMLINPORT = 3,
70  XMLINVALUE = 4,
71  XMLDONE = 5,
72  XMLFATALERROR = 6
73  } XMLReadState;

Function Documentation

◆ checkArray()

template<ImplType IMPLIN, class TIN , class TIN2 >
static bool YACS::ENGINE::checkArray ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inlinestatic

Definition at line 2481 of file TypeConversions.cxx.

2482  {
2483  stringstream msg;
2484  msg << "Check not implemented for Implementation: " << IMPLIN ;
2485  msg << " : " << __FILE__ << ":" << __LINE__;
2486  throw YACS::ENGINE::ConversionException(msg.str());
2487  }

◆ checkBool()

template<ImplType IMPLIN, class TIN , class TIN2 >
static bool YACS::ENGINE::checkBool ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inlinestatic

Definition at line 2441 of file TypeConversions.cxx.

2442  {
2443  stringstream msg;
2444  msg << "Check not implemented for Implementation: " << IMPLIN ;
2445  msg << " : " << __FILE__ << ":" << __LINE__;
2446  throw YACS::ENGINE::ConversionException(msg.str());
2447  }

◆ checkBool< PYTHONImpl, PyObject *, void * >()

template<>
bool YACS::ENGINE::checkBool< PYTHONImpl, PyObject *, void * > ( const TypeCode t,
PyObject *  o,
void *  aux 
)
inline

Definition at line 2546 of file TypeConversions.cxx.

2547  {
2548  if (PyBool_Check(o))
2549  return true;
2550  else if(PyLong_Check(o))
2551  return true;
2552  else
2553  {
2554  stringstream msg;
2555  msg << "Not a python boolean " ;
2556  throw YACS::ENGINE::ConversionException(msg.str());
2557  }
2558 
2559  }

◆ checkDouble()

template<ImplType IMPLIN, class TIN , class TIN2 >
static bool YACS::ENGINE::checkDouble ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inlinestatic

Basic template checker from type TIN.

This checker does nothing : throws exception It must be partially specialize for a specific type (TIN)

Definition at line 2425 of file TypeConversions.cxx.

2426  {
2427  stringstream msg;
2428  msg << "Check not implemented for Implementation: " << IMPLIN ;
2429  msg << " : " << __FILE__ << ":" << __LINE__;
2430  throw YACS::ENGINE::ConversionException(msg.str());
2431  }

◆ checkDouble< PYTHONImpl, PyObject *, void * >()

template<>
bool YACS::ENGINE::checkDouble< PYTHONImpl, PyObject *, void * > ( const TypeCode t,
PyObject *  o,
void *  aux 
)
inline

Definition at line 2520 of file TypeConversions.cxx.

2521  {
2522  if (PyFloat_Check(o))
2523  return true;
2524  else if(PyLong_Check(o))
2525  return true;
2526  else
2527  {
2528  stringstream msg;
2529  msg << "Not a python double ";
2530  throw YACS::ENGINE::ConversionException(msg.str());
2531  }
2532  }

◆ checkInt()

template<ImplType IMPLIN, class TIN , class TIN2 >
static bool YACS::ENGINE::checkInt ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inlinestatic

Definition at line 2433 of file TypeConversions.cxx.

2434  {
2435  stringstream msg;
2436  msg << "Check not implemented for Implementation: " << IMPLIN ;
2437  msg << " : " << __FILE__ << ":" << __LINE__;
2438  throw YACS::ENGINE::ConversionException(msg.str());
2439  }

◆ checkInt< PYTHONImpl, PyObject *, void * >()

template<>
bool YACS::ENGINE::checkInt< PYTHONImpl, PyObject *, void * > ( const TypeCode t,
PyObject *  o,
void *  aux 
)
inline

Definition at line 2534 of file TypeConversions.cxx.

2535  {
2536  if (PyLong_Check(o))
2537  return true;
2538  else
2539  {
2540  stringstream msg;
2541  msg << "Not a python integer ";
2542  throw YACS::ENGINE::ConversionException(msg.str());
2543  }
2544  }

◆ checkObjref()

template<ImplType IMPLIN, class TIN , class TIN2 >
static bool YACS::ENGINE::checkObjref ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inlinestatic

Definition at line 2457 of file TypeConversions.cxx.

2458  {
2459  stringstream msg;
2460  msg << "Check not implemented for Implementation: " << IMPLIN ;
2461  msg << " : " << __FILE__ << ":" << __LINE__;
2462  throw YACS::ENGINE::ConversionException(msg.str());
2463  }

◆ checkObjref< PYTHONImpl, PyObject *, void * >()

template<>
bool YACS::ENGINE::checkObjref< PYTHONImpl, PyObject *, void * > ( const TypeCode t,
PyObject *  o,
void *  aux 
)
inline

Definition at line 2573 of file TypeConversions.cxx.

2574  {
2575  if (PyUnicode_Check(o))
2576  return true;
2577  if(strncmp(t->id(),"python",6)==0) // a Python object is expected (it's always true)
2578  return true;
2579  else if(strncmp(t->id(),"json",4)==0) // The python object must be json pickable
2580  {
2581  // The python object should be json compliant (to improve)
2582  return true;
2583  }
2584  else
2585  {
2586  // The python object should be a CORBA obj (to improve)
2587  return true;
2588  }
2589  }

References gui.Appli::t.

◆ checkPyObject()

YACSRUNTIMESALOME_EXPORT bool YACS::ENGINE::checkPyObject ( const TypeCode t,
PyObject *  ob 
)

Definition at line 2653 of file TypeConversions.cxx.

2654  {
2655  return YacsChecker<PYTHONImpl,PyObject*,void*>(t,ob,0);
2656  }

References gui.Appli::t.

Referenced by YACS::ENGINE::PyInit::put().

◆ checkSequence()

template<ImplType IMPLIN, class TIN , class TIN2 >
static bool YACS::ENGINE::checkSequence ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inlinestatic

Definition at line 2465 of file TypeConversions.cxx.

2466  {
2467  stringstream msg;
2468  msg << "Check not implemented for Implementation: " << IMPLIN ;
2469  msg << " : " << __FILE__ << ":" << __LINE__;
2470  throw YACS::ENGINE::ConversionException(msg.str());
2471  }

◆ checkSequence< PYTHONImpl, PyObject *, void * >()

template<>
bool YACS::ENGINE::checkSequence< PYTHONImpl, PyObject *, void * > ( const TypeCode t,
PyObject *  o,
void *  aux 
)
inline

Definition at line 2591 of file TypeConversions.cxx.

2592  {
2593  if(!PySequence_Check(o))
2594  {
2595  stringstream msg;
2596  msg << "python object is not a sequence " ;
2597  throw YACS::ENGINE::ConversionException(msg.str());
2598  }
2599  int length=PySequence_Size(o);
2600  for(int i=0;i<length;i++)
2601  {
2602  PyObject *item=PySequence_ITEM(o,i);
2603  try
2604  {
2605  YacsChecker<PYTHONImpl,PyObject*,void*>(t->contentType(),item,0);
2606  }
2607  catch(ConversionException& ex)
2608  {
2609  stringstream msg;
2610  msg << ex.what() << " for sequence element " << i;
2611  throw YACS::ENGINE::ConversionException(msg.str(),false);
2612  }
2613  Py_DECREF(item);
2614  }
2615  return true;
2616  }

References testCppPluginInvokation::ex, yacsorb.CORBAEngineTest::i, and gui.Appli::t.

◆ checkString()

template<ImplType IMPLIN, class TIN , class TIN2 >
static bool YACS::ENGINE::checkString ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inlinestatic

Definition at line 2449 of file TypeConversions.cxx.

2450  {
2451  stringstream msg;
2452  msg << "Check not implemented for Implementation: " << IMPLIN ;
2453  msg << " : " << __FILE__ << ":" << __LINE__;
2454  throw YACS::ENGINE::ConversionException(msg.str());
2455  }

◆ checkString< PYTHONImpl, PyObject *, void * >()

template<>
bool YACS::ENGINE::checkString< PYTHONImpl, PyObject *, void * > ( const TypeCode t,
PyObject *  o,
void *  aux 
)
inline

Definition at line 2561 of file TypeConversions.cxx.

2562  {
2563  if (PyUnicode_Check(o))
2564  return true;
2565  else
2566  {
2567  stringstream msg;
2568  msg << "Not a python string " ;
2569  throw YACS::ENGINE::ConversionException(msg.str());
2570  }
2571  }

◆ checkStruct()

template<ImplType IMPLIN, class TIN , class TIN2 >
static bool YACS::ENGINE::checkStruct ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inlinestatic

Definition at line 2473 of file TypeConversions.cxx.

2474  {
2475  stringstream msg;
2476  msg << "Check not implemented for Implementation: " << IMPLIN ;
2477  msg << " : " << __FILE__ << ":" << __LINE__;
2478  throw YACS::ENGINE::ConversionException(msg.str());
2479  }

◆ checkStruct< PYTHONImpl, PyObject *, void * >()

template<>
bool YACS::ENGINE::checkStruct< PYTHONImpl, PyObject *, void * > ( const TypeCode t,
PyObject *  o,
void *  aux 
)
inline

Definition at line 2618 of file TypeConversions.cxx.

2619  {
2620  PyObject *value;
2621  if(!PyDict_Check(o))
2622  {
2623  stringstream msg;
2624  msg << "python object is not a dict " ;
2625  throw YACS::ENGINE::ConversionException(msg.str());
2626  }
2628  int nMember=tst->memberCount();
2629  for(int i=0;i<nMember;i++)
2630  {
2631  std::string name=tst->memberName(i);
2632  TypeCode* tm=tst->memberType(i);
2633  value=PyDict_GetItemString(o, name.c_str());
2634  if(value==NULL)
2635  {
2636  stringstream msg;
2637  msg << "member " << name << " not present " ;
2638  throw YACS::ENGINE::ConversionException(msg.str());
2639  }
2640  try
2641  {
2642  YacsChecker<PYTHONImpl,PyObject*,void*>(tm,value,0);
2643  }
2644  catch(ConversionException& ex)
2645  {
2646  std::string s=" for struct member "+name;
2647  throw YACS::ENGINE::ConversionException(ex.what()+s,false);
2648  }
2649  }
2650  return true;
2651  }
Class for struct type.
Definition: TypeCode.hxx:228
const char * memberName(int index) const
Definition: TypeCode.cxx:819
TypeCode * memberType(int index) const
Definition: TypeCode.cxx:831

References testCppPluginInvokation::ex, yacsorb.CORBAEngineTest::i, YACS::ENGINE::TypeCodeStruct::memberCount(), YACS::ENGINE::TypeCodeStruct::memberName(), YACS::ENGINE::TypeCodeStruct::memberType(), and gui.Appli::t.

◆ convertArray()

template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT YACS::ENGINE::convertArray ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inline

Definition at line 625 of file TypeConversions.cxx.

626  {
627  std::vector<TOUT> v;
628  convertToYacsArray<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>::convert(t,o,aux,v);
629  TOUT r=convertFromYacsArray<IMPLOUT,TOUT>::convert(t,v);
630  return r;
631  }

References testCppPluginInvokation::r, and gui.Appli::t.

◆ convertBool()

template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT YACS::ENGINE::convertBool ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inline

Definition at line 595 of file TypeConversions.cxx.

596  {
597  double d=convertToYacsBool<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>::convert(t,o,aux);
598  DEBTRACE( d );
599  TOUT r=convertFromYacsBool<IMPLOUT,TOUT>::convert(t,d);
600  return r;
601  }
#define DEBTRACE(msg)
Definition: YacsTrace.hxx:32

References DEBTRACE, testCppPluginInvokation::r, and gui.Appli::t.

◆ convertBool< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * >()

template<>
CORBA::Any* YACS::ENGINE::convertBool< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * > ( const TypeCode t,
CORBA::Any *  o,
void *  aux 
)
inline

Definition at line 2233 of file TypeConversions.cxx.

2234  {
2235  return o;
2236  }

◆ convertCorbaCorba()

YACSRUNTIMESALOME_EXPORT CORBA::Any * YACS::ENGINE::convertCorbaCorba ( const TypeCode t,
CORBA::Any *  data 
)

Definition at line 2414 of file TypeConversions.cxx.

2415  {
2416  return YacsConvertor<CORBAImpl,CORBA::Any*,void*,CORBAImpl,CORBA::Any*>(t,data,0);
2417  }

References gui.Appli::t.

Referenced by YACS::ENGINE::CorbaCorba::put().

◆ convertCorbaCpp()

Any* YACS::ENGINE::convertCorbaCpp ( const TypeCode t,
CORBA::Any *  A 
)

Definition at line 34 of file CORBACppConv.cxx.

35  {
36  return convertCorbaNeutral(t, A);
37  }
YACS::ENGINE::Any * convertCorbaNeutral(const TypeCode *t, CORBA::Any *data)

References convertCorbaNeutral(), and gui.Appli::t.

Referenced by YACS::ENGINE::CorbaCpp::put().

◆ convertCorbaNeutral()

YACSRUNTIMESALOME_EXPORT YACS::ENGINE::Any * YACS::ENGINE::convertCorbaNeutral ( const TypeCode t,
CORBA::Any *  data 
)

Definition at line 2410 of file TypeConversions.cxx.

2411  {
2412  return YacsConvertor<CORBAImpl,CORBA::Any*,void*,NEUTRALImpl,YACS::ENGINE::Any*>(t,data,0);
2413  }

References gui.Appli::t.

Referenced by convertCorbaCpp(), and YACS::ENGINE::CorbaNeutral::put().

◆ convertCorbaPyObject()

YACSRUNTIMESALOME_EXPORT PyObject * YACS::ENGINE::convertCorbaPyObject ( const TypeCode t,
CORBA::Any *  data 
)

◆ convertCorbaXml()

YACSRUNTIMESALOME_EXPORT std::string YACS::ENGINE::convertCorbaXml ( const TypeCode t,
CORBA::Any *  data 
)

Definition at line 2406 of file TypeConversions.cxx.

2407  {
2408  return YacsConvertor<CORBAImpl,CORBA::Any*,void*,XMLImpl,std::string>(t,data,0);
2409  }

References gui.Appli::t.

Referenced by YACS::ENGINE::InputCorbaPort::dump(), YACS::ENGINE::OutputCorbaPort::dump(), and YACS::ENGINE::CorbaXml::put().

◆ convertCppCorba()

CORBA::Any* YACS::ENGINE::convertCppCorba ( const TypeCode t,
Any data 
)

Definition at line 33 of file CppCORBAConv.cxx.

34  {
35  return convertNeutralCorba(t, data);
36  }
CORBA::Any * convertNeutralCorba(const TypeCode *t, YACS::ENGINE::Any *data)

References convertNeutralCorba(), and gui.Appli::t.

Referenced by YACS::ENGINE::CppCorba::put().

◆ convertCppCpp()

Any* YACS::ENGINE::convertCppCpp ( const TypeCode t,
Any data 
)

Definition at line 35 of file CppCppConv.cxx.

36  {
37  return convertNeutralNeutral(t, data);
38  }
YACS::ENGINE::Any * convertNeutralNeutral(const TypeCode *t, YACS::ENGINE::Any *data)

References convertNeutralNeutral(), and gui.Appli::t.

Referenced by YACS::ENGINE::CppCpp::put().

◆ convertCppNeutral()

Any* YACS::ENGINE::convertCppNeutral ( const TypeCode t,
Any a 
)

Definition at line 36 of file CppNeutralConv.cxx.

37  {
38  return convertNeutralNeutral(t, a);
39  }

References gui.CONNECTOR::a, convertNeutralNeutral(), and gui.Appli::t.

Referenced by YACS::ENGINE::CppNeutral::put().

◆ convertCppPyObject()

PyObject* YACS::ENGINE::convertCppPyObject ( const TypeCode t,
Any a 
)

Definition at line 35 of file CppPythonConv.cxx.

36  {
37  return convertNeutralPyObject(t, (Any *) a);
38  }
PyObject * convertNeutralPyObject(const TypeCode *t, YACS::ENGINE::Any *data)

References gui.CONNECTOR::a, convertNeutralPyObject(), and gui.Appli::t.

Referenced by YACS::ENGINE::CppPy::put().

◆ convertCppXml()

std::string YACS::ENGINE::convertCppXml ( const TypeCode t,
void *  ob 
)

Definition at line 34 of file CppXMLConv.cxx.

35  {
36  return convertNeutralXml(t, (Any *) ob);
37  }
std::string convertNeutralXml(const TypeCode *t, YACS::ENGINE::Any *data)

References convertNeutralXml(), and gui.Appli::t.

Referenced by YACS::ENGINE::CppXml::put().

◆ convertDouble()

template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT YACS::ENGINE::convertDouble ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inline

Definition at line 571 of file TypeConversions.cxx.

572  {
573  double d=convertToYacsDouble<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>::convert(t,o,aux);
574  DEBTRACE( d );
575  TOUT r=convertFromYacsDouble<IMPLOUT,TOUT>::convert(t,d);
576  return r;
577  }

References DEBTRACE, testCppPluginInvokation::r, and gui.Appli::t.

◆ convertDouble< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * >()

template<>
CORBA::Any* YACS::ENGINE::convertDouble< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * > ( const TypeCode t,
CORBA::Any *  o,
void *  aux 
)
inline

Definition at line 2202 of file TypeConversions.cxx.

2203  {
2204  CORBA::TypeCode_var tc = o->type();
2205  if (tc->equivalent(CORBA::_tc_double))
2206  {
2207  return o;
2208  }
2209  if (tc->equivalent(CORBA::_tc_long))
2210  {
2211  CORBA::Long d;
2212  *o >>= d;
2213  CORBA::Any *any = new CORBA::Any();
2214  *any <<= (CORBA::Double)d;
2215  return any;
2216  }
2217  stringstream msg;
2218  msg << "Not a double or long corba type " << tc->kind();
2219  msg << " : " << __FILE__ << ":" << __LINE__;
2220  throw YACS::ENGINE::ConversionException(msg.str());
2221  }

References Double.

◆ convertInt()

template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT YACS::ENGINE::convertInt ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inline

Definition at line 579 of file TypeConversions.cxx.

580  {
581  long d=convertToYacsInt<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>::convert(t,o,aux);
582  DEBTRACE( d );
583  TOUT r=convertFromYacsInt<IMPLOUT,TOUT>::convert(t,d);
584  return r;
585  }

References DEBTRACE, testCppPluginInvokation::r, and gui.Appli::t.

◆ convertInt< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * >()

template<>
CORBA::Any* YACS::ENGINE::convertInt< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * > ( const TypeCode t,
CORBA::Any *  o,
void *  aux 
)
inline

Definition at line 2223 of file TypeConversions.cxx.

2224  {
2225  return o;
2226  }

◆ convertNeutralCorba()

YACSRUNTIMESALOME_EXPORT CORBA::Any * YACS::ENGINE::convertNeutralCorba ( const TypeCode t,
YACS::ENGINE::Any data 
)

◆ convertNeutralCpp()

Any* YACS::ENGINE::convertNeutralCpp ( const TypeCode t,
Any data 
)

Definition at line 35 of file NeutralCppConv.cxx.

36  {
37  return convertNeutralNeutral(t, data);
38  }

References convertNeutralNeutral(), and gui.Appli::t.

Referenced by YACS::ENGINE::NeutralCpp::put().

◆ convertNeutralNeutral()

YACSRUNTIMESALOME_EXPORT YACS::ENGINE::Any * YACS::ENGINE::convertNeutralNeutral ( const TypeCode t,
YACS::ENGINE::Any data 
)

Definition at line 2395 of file TypeConversions.cxx.

2396  {
2397  data->incrRef();
2398  return data;
2399  }

References YACS::ENGINE::RefCounter::incrRef().

Referenced by convertCppCpp(), convertCppNeutral(), and convertNeutralCpp().

◆ convertNeutralPyObject()

◆ convertNeutralXml()

YACSRUNTIMESALOME_EXPORT std::string YACS::ENGINE::convertNeutralXml ( const TypeCode t,
YACS::ENGINE::Any data 
)

Definition at line 2387 of file TypeConversions.cxx.

2388  {
2389  return YacsConvertor<NEUTRALImpl,YACS::ENGINE::Any*,void*,XMLImpl,std::string>(t,data,0);
2390  }

References gui.Appli::t.

Referenced by convertCppXml(), YACS::ENGINE::InputCppPort::dump(), YACS::ENGINE::OutputCppPort::dump(), YACS::ENGINE::NeutralXml::put(), and YACS::ENGINE::VisitorSalomeSaveState::visitForEachLoop().

◆ convertObjref()

template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT YACS::ENGINE::convertObjref ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inline

Definition at line 603 of file TypeConversions.cxx.

604  {
605  int protocol=-1;
606  if(IMPLOUT==XMLImpl)
607  protocol=0;//to avoid presence of \0 into XML generated file
608  if(IMPLOUT==NEUTRALImpl)
609  protocol=4;
610  std::string d=convertToYacsObjref<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>::convert(t,o,aux,protocol);
611  DEBTRACE( d );
612  TOUT r=convertFromYacsObjref<IMPLOUT,TOUT>::convert(t,d);
613  return r;
614  }

References DEBTRACE, NEUTRALImpl, testCppPluginInvokation::r, gui.Appli::t, and XMLImpl.

◆ convertObjref< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * >()

template<>
CORBA::Any* YACS::ENGINE::convertObjref< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * > ( const TypeCode t,
CORBA::Any *  o,
void *  aux 
)
inline

Definition at line 2238 of file TypeConversions.cxx.

2239  {
2240  return o;
2241  }

◆ convertPyObjectCorba()

YACSRUNTIMESALOME_EXPORT CORBA::Any * YACS::ENGINE::convertPyObjectCorba ( const TypeCode t,
PyObject *  data 
)

Definition at line 2299 of file TypeConversions.cxx.

2300  {
2301  return YacsConvertor<PYTHONImpl,PyObject*,void*,CORBAImpl,CORBA::Any*>(t,data,0);
2302  }

References gui.Appli::t.

Referenced by YACS::ENGINE::PyCorbaInt::put(), YACS::ENGINE::PyCorbaDouble::put(), YACS::ENGINE::PyCorbaString::put(), YACS::ENGINE::PyCorbaBool::put(), YACS::ENGINE::PyCorbaObjref::put(), YACS::ENGINE::PyCorbaSequence::put(), and YACS::ENGINE::PyCorbaStruct::put().

◆ convertPyObjectCpp()

Any* YACS::ENGINE::convertPyObjectCpp ( const TypeCode t,
PyObject *  data 
)

Definition at line 36 of file PythonCppConv.cxx.

37  {
38  return convertPyObjectNeutral(t, data);
39  }
YACS::ENGINE::Any * convertPyObjectNeutral(const TypeCode *t, PyObject *data)

References convertPyObjectNeutral(), and gui.Appli::t.

Referenced by YACS::ENGINE::PyCpp::put().

◆ convertPyObjectNeutral()

YACSRUNTIMESALOME_EXPORT YACS::ENGINE::Any * YACS::ENGINE::convertPyObjectNeutral ( const TypeCode t,
PyObject *  data 
)

Definition at line 2295 of file TypeConversions.cxx.

2296  {
2297  return YacsConvertor<PYTHONImpl,PyObject*,void*,NEUTRALImpl,YACS::ENGINE::Any*>(t,data,0);
2298  }

References gui.Appli::t.

Referenced by convertPyObjectCpp(), and YACS::ENGINE::PyNeutral::put().

◆ convertPyObjectPyObject()

YACSRUNTIMESALOME_EXPORT PyObject * YACS::ENGINE::convertPyObjectPyObject ( const TypeCode t,
PyObject *  data 
)

Definition at line 2303 of file TypeConversions.cxx.

2304  {
2305  return YacsConvertor<PYTHONImpl,PyObject*,void*,PYTHONImpl,PyObject*>(t,data,0);
2306  }

References gui.Appli::t.

◆ convertPyObjectToString()

YACSRUNTIMESALOME_EXPORT std::string YACS::ENGINE::convertPyObjectToString ( PyObject *  ob)

Definition at line 2308 of file TypeConversions.cxx.

2309  {
2310  PyObject *s;
2311  PyGILState_STATE gstate = PyGILState_Ensure();
2312  // TODO: separate treatment for string (maybe with bad encoding?) and other types of PyObject ?
2313  // Do we need str() or repr() and what are the possible causes of failure of str() ?
2314  // not clear, needs more analysis.
2315  s=PyObject_Str(ob);
2316  if (s == NULL) // for instance string with bad encoding, non utf-8
2317  {
2318  s=PyObject_ASCII(ob); // escape non ASCII characters and like repr(), which is not the same as str()...
2319  }
2320  Py_ssize_t size;
2321  const char* characters = PyUnicode_AsUTF8AndSize(s, &size);
2322  std::string ss( characters, size);
2323  Py_DECREF(s);
2324  PyGILState_Release(gstate);
2325  return ss;
2326  }
int Py_ssize_t
Definition: PythonNode.cxx:45

Referenced by YACS::ENGINE::RuntimeSALOME::convertNeutralAsString(), YACS::ENGINE::RuntimeSALOME::convertPyObjectToString(), YACS::ENGINE::InputCorbaPort::getAsString(), YACS::ENGINE::OutputCorbaPort::getAsString(), YACS::ENGINE::OutputPresetPort::getAsString(), YACS::ENGINE::InputPresetPort::getAsString(), YACS::ENGINE::InputPyPort::getAsString(), and YACS::ENGINE::OutputPyPort::getAsString().

◆ convertPyObjectXml()

YACSRUNTIMESALOME_EXPORT std::string YACS::ENGINE::convertPyObjectXml ( const TypeCode t,
PyObject *  data 
)

Definition at line 2291 of file TypeConversions.cxx.

2292  {
2293  return YacsConvertor<PYTHONImpl,PyObject*,void*,XMLImpl,std::string>(t,data,0);
2294  }

References gui.Appli::t.

Referenced by YACS::ENGINE::InputPyPort::dump(), YACS::ENGINE::OutputPyPort::dump(), YACS::HMI::CommandSetOutPortValue::localExecute(), YACS::HMI::CommandSetOutPortValue::localReverse(), and YACS::ENGINE::PyXml::put().

◆ convertSequence()

template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT YACS::ENGINE::convertSequence ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inline

Definition at line 617 of file TypeConversions.cxx.

618  {
619  std::vector<TOUT> v;
620  convertToYacsSequence<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>::convert(t,o,aux,v);
621  TOUT r=convertFromYacsSequence<IMPLOUT,TOUT>::convert(t,v);
622  return r;
623  }

References testCppPluginInvokation::r, and gui.Appli::t.

◆ convertString()

template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT YACS::ENGINE::convertString ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inline

Definition at line 587 of file TypeConversions.cxx.

588  {
589  std::string d=convertToYacsString<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>::convert(t,o,aux);
590  DEBTRACE( d );
591  TOUT r=convertFromYacsString<IMPLOUT,TOUT>::convert(t,d);
592  return r;
593  }

References DEBTRACE, testCppPluginInvokation::r, and gui.Appli::t.

◆ convertString< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * >()

template<>
CORBA::Any* YACS::ENGINE::convertString< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * > ( const TypeCode t,
CORBA::Any *  o,
void *  aux 
)
inline

Definition at line 2228 of file TypeConversions.cxx.

2229  {
2230  return o;
2231  }

◆ convertStruct()

template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT YACS::ENGINE::convertStruct ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inline

Definition at line 633 of file TypeConversions.cxx.

634  {
635  std::map<std::string,TOUT> v;
636  convertToYacsStruct<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>::convert(t,o,aux,v);
637  TOUT r=convertFromYacsStruct<IMPLOUT,TOUT>::convert(t,v);
638  return r;
639  }

References testCppPluginInvokation::r, and gui.Appli::t.

◆ convertStruct< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * >()

template<>
CORBA::Any* YACS::ENGINE::convertStruct< CORBAImpl, CORBA::Any *, void *, CORBAImpl, CORBA::Any * > ( const TypeCode t,
CORBA::Any *  o,
void *  aux 
)
inline

Definition at line 2243 of file TypeConversions.cxx.

2244  {
2245  return o;
2246  }

◆ convertXmlCorba()

YACSRUNTIMESALOME_EXPORT CORBA::Any * YACS::ENGINE::convertXmlCorba ( const TypeCode t,
xmlDocPtr  doc,
xmlNodePtr  cur 
)

Definition at line 2337 of file TypeConversions.cxx.

2338  {
2339  return YacsConvertor<XMLImpl,xmlDocPtr,xmlNodePtr,CORBAImpl,CORBA::Any*>(t,doc,cur);
2340  }
static char doc[]
Definition: driver.cxx:63

References doc, and gui.Appli::t.

Referenced by YACS::ENGINE::XmlCorba::put().

◆ convertXmlCpp()

Any* YACS::ENGINE::convertXmlCpp ( const TypeCode t,
xmlDocPtr  doc,
xmlNodePtr  cur 
)

Definition at line 38 of file XMLCppConv.cxx.

39  {
40  return convertXmlNeutral(t, doc, cur);
41  }
YACS::ENGINE::Any * convertXmlNeutral(const TypeCode *t, xmlDocPtr doc, xmlNodePtr cur)

References convertXmlNeutral(), doc, and gui.Appli::t.

Referenced by YACS::ENGINE::XmlCpp::put().

◆ convertXmlNeutral()

YACSRUNTIMESALOME_EXPORT YACS::ENGINE::Any * YACS::ENGINE::convertXmlNeutral ( const TypeCode t,
xmlDocPtr  doc,
xmlNodePtr  cur 
)

Definition at line 2333 of file TypeConversions.cxx.

2334  {
2335  return YacsConvertor<XMLImpl,xmlDocPtr,xmlNodePtr,NEUTRALImpl,YACS::ENGINE::Any*>(t,doc,cur);
2336  }

References doc, and gui.Appli::t.

Referenced by convertXmlCpp(), YACS::ENGINE::XmlNeutral::put(), and YACS::ENGINE::nodeParser::xmlToAny().

◆ convertXmlPyObject()

YACSRUNTIMESALOME_EXPORT PyObject * YACS::ENGINE::convertXmlPyObject ( const TypeCode t,
xmlDocPtr  doc,
xmlNodePtr  cur 
)

Definition at line 2329 of file TypeConversions.cxx.

2330  {
2331  return YacsConvertor<XMLImpl,xmlDocPtr,xmlNodePtr,PYTHONImpl,PyObject*>(t,doc,cur);
2332  }

References doc, and gui.Appli::t.

Referenced by convertXmlStrPyObject(), and YACS::ENGINE::XmlPython::put().

◆ convertXmlStrPyObject()

YACSRUNTIMESALOME_EXPORT PyObject * YACS::ENGINE::convertXmlStrPyObject ( const TypeCode t,
std::string  data 
)

Definition at line 2341 of file TypeConversions.cxx.

2342  {
2343  xmlDocPtr doc;
2344  xmlNodePtr cur;
2345  PyObject *ob=NULL;
2346  doc = xmlParseMemory(data.c_str(), strlen(data.c_str()));
2347  if (doc == NULL )
2348  {
2349  std::stringstream msg;
2350  msg << "Problem in conversion: XML Document not parsed successfully ";
2351  msg << " (" << __FILE__ << ":" << __LINE__ << ")";
2352  throw YACS::ENGINE::ConversionException(msg.str());
2353  }
2354  cur = xmlDocGetRootElement(doc);
2355  if (cur == NULL)
2356  {
2357  xmlFreeDoc(doc);
2358  std::stringstream msg;
2359  msg << "Problem in conversion: empty XML Document";
2360  msg << " (" << __FILE__ << ":" << __LINE__ << ")";
2361  throw YACS::ENGINE::ConversionException(msg.str());
2362  }
2363  while (cur != NULL)
2364  {
2365  if ((!xmlStrcmp(cur->name, (const xmlChar *)"value")))
2366  {
2367  ob=convertXmlPyObject(t,doc,cur);
2368  break;
2369  }
2370  cur = cur->next;
2371  }
2372  xmlFreeDoc(doc);
2373  if(ob==NULL)
2374  {
2375  std::stringstream msg;
2376  msg << "Problem in conversion: incorrect XML value";
2377  msg << " (" << __FILE__ << ":" << __LINE__ << ")";
2378  throw YACS::ENGINE::ConversionException(msg.str());
2379  }
2380  return ob;
2381  }
PyObject * convertXmlPyObject(const TypeCode *t, xmlDocPtr doc, xmlNodePtr cur)

References convertXmlPyObject(), doc, and gui.Appli::t.

Referenced by YACS::ENGINE::OutputPresetPort::getPyObj(), and YACS::ENGINE::InputPresetPort::getPyObj().

◆ evalFuncPyWithNoParams()

YACSRUNTIMESALOME_EXPORT PyObject * YACS::ENGINE::evalFuncPyWithNoParams ( PyObject *  func)

Definition at line 176 of file PyStdout.cxx.

177 {
178  if(!func)
179  throw YACS::Exception("evalFuncPyWithNoParams : input func is NULL !");
180  AutoPyRef args(PyTuple_New(0));
181  AutoPyRef ret(PyObject_CallObject(func,args));
182  if(ret.isNull())
183  throw YACS::Exception("evalFuncPyWithNoParams : ret is null !");
184  return ret.retn();
185 }

◆ evalPy()

YACSRUNTIMESALOME_EXPORT PyObject * YACS::ENGINE::evalPy ( const std::string &  funcName,
const std::string &  strToEval 
)

Definition at line 140 of file PyStdout.cxx.

141 {
142  std::ostringstream oss0; oss0 << "def " << funcName << "():\n";
143  std::string::size_type i0(0);
144  while(i0<strToEval.length() && i0!=std::string::npos)
145  {
146  std::string::size_type i2(strToEval.find('\n',i0));
147  std::string::size_type lgth(i2!=std::string::npos?i2-i0:std::string::npos);
148  std::string part(strToEval.substr(i0,lgth));
149  if(!part.empty())
150  oss0 << " " << part << "\n";
151  i0=i2!=std::string::npos?i2+1:std::string::npos;
152  }
153  std::string zeCodeStr(oss0.str());
154  AutoPyRef context(PyDict_New());
155  PyDict_SetItemString( context, "__builtins__", PyEval_GetBuiltins() );
156  AutoPyRef code(Py_CompileString(zeCodeStr.c_str(), "kkkk", Py_file_input));
157  if(code.isNull())
158  {
159  std::string errorDetails;
160  PyObject *new_stderr(newPyStdOut(errorDetails));
161  PySys_SetObject((char*)"stderr", new_stderr);
162  PyErr_Print();
163  PySys_SetObject((char*)"stderr", PySys_GetObject((char*)"__stderr__"));
164  Py_DECREF(new_stderr);
165  std::ostringstream oss; oss << "evalPy failed : " << errorDetails;
166  throw Exception(oss.str());
167  }
168  AutoPyRef res(PyEval_EvalCode((PyObject *)code,context,context));
169  PyObject *ret(PyDict_GetItemString(context,funcName.c_str())); //borrowed ref
170  if(!ret)
171  throw YACS::Exception("evalPy : Error on returned func !");
172  Py_XINCREF(ret);
173  return ret;
174 }
PyObject * newPyStdOut(std::string &out)
Definition: PyStdout.cxx:129

References newPyStdOut().

◆ findOrCreateSoWithName()

SALOMEDS::SObject_ptr YACS::ENGINE::findOrCreateSoWithName ( SALOMEDS::StudyBuilder_ptr  builder,
SALOMEDS::SObject_ptr  sobj,
const std::string &  name 
)

Definition at line 234 of file StudyPorts.cxx.

236 {
237  SALOMEDS::ChildIterator_var anIterator= KERNEL::getStudyServant()->NewChildIterator(sobj);
238  SALOMEDS::GenericAttribute_var anAttr;
239  SALOMEDS::AttributeName_var namAttr ;
240  SALOMEDS::SObject_var result=SALOMEDS::SObject::_nil();
241 
242  for (; anIterator->More(); anIterator->Next())
243  {
244  SALOMEDS::SObject_var anObj=anIterator->Value();
245  if(anObj->FindAttribute(anAttr, "AttributeName"))
246  {
247  namAttr = SALOMEDS::AttributeName::_narrow( anAttr );
248  CORBA::String_var value=namAttr->Value();
249  if(name == (const char*)value)
250  {
251  result=anObj;
252  break;
253  }
254  }
255  }
256  if(CORBA::is_nil(result))
257  {
258  //create it
259  result = builder->NewObject( sobj );
260  anAttr=builder->FindOrCreateAttribute(result,"AttributeName");
261  namAttr = SALOMEDS::AttributeName::_narrow( anAttr );
262  namAttr->SetValue(name.c_str());
263  }
264  return result._retn();
265 }

Referenced by YACS::ENGINE::InputStudyPort::putDataInStudy().

◆ FromBase64()

std::string YACS::ENGINE::FromBase64 ( const std::string &  bytes)

Definition at line 151 of file Any.cxx.

152 {
153  std::size_t nb_chunks(bytes.size());
154  const char *chunckPt(bytes.c_str());
155  std::size_t nb_bytes_output((nb_chunks*NB_BITS)/8);
156  std::string ret(nb_bytes_output,'\0');
157  for(std::size_t i = 0; i<nb_bytes_output; ++i)
158  {
159  ret[i] = ByteAtPos(chunckPt,i);
160  }
161  return ret;
162 }
char ByteAtPos(const char *chunckPt, std::size_t bytePos)
Definition: Any.cxx:144
constexpr unsigned NB_BITS
Definition: Any.cxx:41

References ByteAtPos(), yacsorb.CORBAEngineTest::i, and NB_BITS.

Referenced by FromBase64Safe().

◆ FromBase64Safe()

std::string YACS::ENGINE::FromBase64Safe ( const std::string &  bytes)

Method used at load time in case of non base64 bytes in input (a throw during decoding). If so, the input bytes is returned.

Definition at line 167 of file Any.cxx.

168 {
169  try
170  {
171  return FromBase64(bytes);
172  }
173  catch(const YACS::Exception& e)
174  {
175  return bytes;
176  }
177 }
YACSLIBENGINE_EXPORT std::string FromBase64(const std::string &bytes)
Definition: Any.cxx:151

References FromBase64().

Referenced by YACS::ENGINE::convertToYacsObjref< XMLImpl, xmlDocPtr, xmlNodePtr, IMPLOUT, TOUT >::convert().

◆ getCorbaTC()

◆ getCorbaTCBool()

CORBA::TypeCode_ptr YACS::ENGINE::getCorbaTCBool ( const TypeCode t)

Definition at line 110 of file TypeConversions.cxx.

111  {
112  return CORBA::TypeCode::_duplicate(CORBA::_tc_boolean);
113  }

◆ getCorbaTCDouble()

CORBA::TypeCode_ptr YACS::ENGINE::getCorbaTCDouble ( const TypeCode t)

Definition at line 95 of file TypeConversions.cxx.

96  {
97  return CORBA::TypeCode::_duplicate(CORBA::_tc_double);
98  }

◆ getCorbaTCInt()

CORBA::TypeCode_ptr YACS::ENGINE::getCorbaTCInt ( const TypeCode t)

Definition at line 100 of file TypeConversions.cxx.

101  {
102  return CORBA::TypeCode::_duplicate(CORBA::_tc_long);
103  }

◆ getCorbaTCNull()

CORBA::TypeCode_ptr YACS::ENGINE::getCorbaTCNull ( const TypeCode t)

Definition at line 87 of file TypeConversions.cxx.

88  {
89  stringstream msg;
90  msg << "Conversion not implemented: kind= " << t->kind();
91  msg << " : " << __FILE__ << ":" << __LINE__;
92  throw YACS::ENGINE::ConversionException(msg.str());
93  }

References gui.Appli::t.

◆ getCorbaTCObjref()

CORBA::TypeCode_ptr YACS::ENGINE::getCorbaTCObjref ( const TypeCode t)

Definition at line 115 of file TypeConversions.cxx.

116  {
117  DEBTRACE( t->name() << " " << t->shortName() << " " << t->id());
118  CORBA::TypeCode_ptr tc;
119  if(strncmp(t->id(),"python",6)==0 )
120  tc= CORBA::TypeCode::_duplicate(Engines::_tc_fileBlock);
121  else if(strncmp(t->id(),"json",4)==0)
122  tc= CORBA::TypeCode::_duplicate(CORBA::_tc_string);
123  else
124  tc= getSALOMERuntime()->getOrb()->create_interface_tc(t->id(),t->shortName());
125 #ifdef REFCNT
126  DEBTRACE("refcount CORBA tc Objref: " << ((omni::TypeCode_base*)tc)->pd_ref_count);
127 #endif
128  return tc;
129  }
CORBA::ORB_ptr getOrb() const
YACSRUNTIMESALOME_EXPORT RuntimeSALOME * getSALOMERuntime()

References DEBTRACE, YACS::ENGINE::RuntimeSALOME::getOrb(), getSALOMERuntime(), and gui.Appli::t.

◆ getCorbaTCSequence()

CORBA::TypeCode_ptr YACS::ENGINE::getCorbaTCSequence ( const TypeCode t)

Definition at line 131 of file TypeConversions.cxx.

132  {
133  CORBA::TypeCode_var content_type=getCorbaTC(t->contentType());
134  CORBA::TypeCode_ptr tc= getSALOMERuntime()->getOrb()->create_sequence_tc(0,content_type);
135 #ifdef REFCNT
136  DEBTRACE("refcount CORBA content_type: " << ((omni::TypeCode_base*)content_type.in())->pd_ref_count);
137  DEBTRACE("refcount CORBA tc: " << ((omni::TypeCode_base*)tc)->pd_ref_count);
138 #endif
139  return tc;
140  }
CORBA::TypeCode_ptr getCorbaTC(const TypeCode *t)

References DEBTRACE, getCorbaTC(), YACS::ENGINE::RuntimeSALOME::getOrb(), getSALOMERuntime(), and gui.Appli::t.

◆ getCorbaTCString()

CORBA::TypeCode_ptr YACS::ENGINE::getCorbaTCString ( const TypeCode t)

Definition at line 105 of file TypeConversions.cxx.

106  {
107  return CORBA::TypeCode::_duplicate(CORBA::_tc_string);
108  }

◆ getCorbaTCStruct()

CORBA::TypeCode_ptr YACS::ENGINE::getCorbaTCStruct ( const TypeCode t)

Definition at line 142 of file TypeConversions.cxx.

143  {
144  CORBA::StructMemberSeq mseq;
146  int nMember=tst->memberCount();
147  mseq.length(nMember);
148  for(int i=0;i<nMember;i++)
149  {
150  const char * name=tst->memberName(i);
151  TypeCode* tm=tst->memberType(i);
152  mseq[i].name=CORBA::string_dup(name);
153  mseq[i].type=getCorbaTC(tm);
154  }
155  CORBA::TypeCode_ptr tc= getSALOMERuntime()->getOrb()->create_struct_tc(t->id(),t->shortName(),mseq);
156 #ifdef REFCNT
157  DEBTRACE("refcount CORBA tc: " << ((omni::TypeCode_base*)tc)->pd_ref_count);
158 #endif
159  return tc;
160  }
virtual const char * name() const
Definition: TypeCode.cxx:72

References DEBTRACE, getCorbaTC(), YACS::ENGINE::RuntimeSALOME::getOrb(), getSALOMERuntime(), yacsorb.CORBAEngineTest::i, YACS::ENGINE::TypeCodeStruct::memberCount(), YACS::ENGINE::TypeCodeStruct::memberName(), YACS::ENGINE::TypeCodeStruct::memberType(), YACS::ENGINE::TypeCode::name(), and gui.Appli::t.

◆ getImplName()

◆ getRuntime()

◆ getSALOMERuntime()

RuntimeSALOME * YACS::ENGINE::getSALOMERuntime ( )

Definition at line 155 of file RuntimeSALOME.cxx.

156 {
157  YASSERT(RuntimeSALOME::getSingleton());
158  return dynamic_cast< RuntimeSALOME* >(RuntimeSALOME::getSingleton());
159 }
#define YASSERT(val)
YASSERT macro is always defined, used like assert, but throw a YACS::Exception instead of abort.
Definition: YacsTrace.hxx:44

References YASSERT.

Referenced by YACS::HMI::CatalogWidget::addCatalogFromFile(), YACS::ENGINE::convertToYacsObjref< CORBAImpl, CORBA::Any *, void *, IMPLOUT, TOUT >::convert(), YACS::ENGINE::convertToYacsStruct< CORBAImpl, CORBA::Any *, void *, IMPLOUT, TOUT >::convert(), YACS::ENGINE::convertToYacsSequence< CORBAImpl, CORBA::Any *, void *, IMPLOUT, TOUT >::convert(), YACS::ENGINE::convertToYacsObjref< PYTHONImpl, PyObject *, void *, IMPLOUT, TOUT >::convert(), YACS::ENGINE::convertFromYacsStruct< CORBAImpl, CORBA::Any * >::convert(), YACS::ENGINE::convertFromYacsObjref< PYTHONImpl, PyObject * >::convert(), YACS::ENGINE::convertFromYacsObjref< NEUTRALImpl, YACS::ENGINE::Any * >::convert(), YACS::ENGINE::convertFromYacsObjref< CORBAImpl, CORBA::Any * >::convert(), YACS::ENGINE::convertFromYacsSequence< CORBAImpl, CORBA::Any * >::convert(), YACS::ENGINE::CorbaPySequence::CorbaPySequence(), YACS::HMI::GuiEditor::CreateForEachLoop(), YACS::HMI::GuiEditor::CreateNode(), YACS::ENGINE::PythonNode::executeRemote(), YACS::HMI::GenericGui::GenericGui(), getCorbaTCObjref(), getCorbaTCSequence(), getCorbaTCStruct(), YACS::HMI::GenericGui::getMachineList(), YACS::ENGINE::SalomeContainerTools::getResourceProperties(), YACS::HMI::BatchJobsListDialog::getSalomeLauncher(), YACS::HMI::GuiContext::GuiContext(), YACS::ENGINE::InputCorbaPort::InputCorbaPort(), YACS::HMI::Invocator::Invocator(), YACS::ENGINE::DistributedPythonNode::load(), YACS::ENGINE::CORBAComponent::load(), YACS::ENGINE::SalomeComponent::load(), YACS::ENGINE::SessionCataLoader::loadCata(), YACS::HMI::SubjectProc::loadTypes(), YACS::HMI::CommandPutInComposedNode::localExecute(), YACS::HMI::CommandSetInPortValue::localExecute(), YACS::HMI::CommandSetOutPortValue::localExecute(), YACS::HMI::CommandSetInPortValue::localReverse(), YACS::HMI::CommandSetOutPortValue::localReverse(), main(), YACS::HMI::GenericGui::onNewSchema(), YACS::ENGINE::OutputCorbaPort::OutputCorbaPort(), YACS::ENGINE::InputStudyPort::putDataInStudy(), YACS::ENGINE::PyCorbaObjref::PyCorbaObjref(), YACS::ENGINE::PyFuncNode::PyFuncNode(), YACS::ENGINE::PythonNode::PythonNode(), YACS::ENGINE::SalomePythonNode::SalomePythonNode(), shutdownServers(), YACS::ENGINE::SalomeContainerToolsBase::Start(), and YACS::HMI::GuiExecutor::startResumeDataflow().

◆ isAdaptable()

template<ImplType IMPLIN, ImplType IMPLOUT>
int YACS::ENGINE::isAdaptable ( const TypeCode t1,
const TypeCode t2 
)
inline

Definition at line 302 of file TypeConversions.cxx.

303  {
304  switch(t2->kind())
305  {
306  case Double:
307  return isAdaptableDouble<IMPLIN,IMPLOUT>::apply(t1,t2);
308  case Int:
309  return isAdaptableInt<IMPLIN,IMPLOUT>::apply(t1,t2);
310  case String:
311  return isAdaptableString<IMPLIN,IMPLOUT>::apply(t1,t2);
312  case Bool:
313  return isAdaptableBool<IMPLIN,IMPLOUT>::apply(t1,t2);
314  case Objref:
315  return isAdaptableObjref<IMPLIN,IMPLOUT>::apply(t1,t2);
316  case Sequence:
317  return isAdaptableSequence<IMPLIN,IMPLOUT>::apply(t1,t2);
318  case Array:
319  return isAdaptableArray<IMPLIN,IMPLOUT>::apply(t1,t2);
320  case Struct:
321  return isAdaptableStruct<IMPLIN,IMPLOUT>::apply(t1,t2);
322  default:
323  break;
324  }
325  return 0;
326  }
static std::string t1[]
static std::string t2[]

References Array, Bool, Double, Int, Objref, Sequence, String, Struct, YACS::t1, and YACS::t2.

Referenced by YACS::ENGINE::NeutralInit::put().

◆ isAdaptableCorbaCorba()

YACSRUNTIMESALOME_EXPORT int YACS::ENGINE::isAdaptableCorbaCorba ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 375 of file TypeConversions.cxx.

376  {
377  return isAdaptable<CORBAImpl,CORBAImpl>(t1,t2);
378  }

References YACS::t1, and YACS::t2.

Referenced by YACS::ENGINE::RuntimeSALOME::adaptCorbaToCorba().

◆ isAdaptableCorbaCpp()

int YACS::ENGINE::isAdaptableCorbaCpp ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 56 of file CppCORBAConv.cxx.

57  {
58  return isAdaptableCorbaNeutral(t1, t2);
59  }
int isAdaptableCorbaNeutral(const TypeCode *t1, const TypeCode *t2)

References isAdaptableCorbaNeutral(), YACS::t1, and YACS::t2.

Referenced by YACS::ENGINE::RuntimeSALOME::adaptCorbaToCpp().

◆ isAdaptableCorbaNeutral()

YACSRUNTIMESALOME_EXPORT int YACS::ENGINE::isAdaptableCorbaNeutral ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 343 of file TypeConversions.cxx.

344  {
345  return isAdaptable<NEUTRALImpl,CORBAImpl>(t1,t2);
346  }

References YACS::t1, and YACS::t2.

Referenced by YACS::ENGINE::RuntimeSALOME::adaptCorbaToNeutral(), and isAdaptableCorbaCpp().

◆ isAdaptableCorbaPyObject()

YACSRUNTIMESALOME_EXPORT int YACS::ENGINE::isAdaptableCorbaPyObject ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 329 of file TypeConversions.cxx.

330  {
331  return isAdaptable<PYTHONImpl,CORBAImpl>(t1,t2);
332  }

References YACS::t1, and YACS::t2.

Referenced by YACS::ENGINE::RuntimeSALOME::adaptCorbaToPython().

◆ isAdaptableCppCorba()

int YACS::ENGINE::isAdaptableCppCorba ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 71 of file CORBACppConv.cxx.

72  {
73  return isAdaptableNeutralCorba(t1, t2);
74  }
int isAdaptableNeutralCorba(const TypeCode *t1, const TypeCode *t2)

References isAdaptableNeutralCorba(), YACS::t1, and YACS::t2.

Referenced by YACS::ENGINE::RuntimeSALOME::adaptCppToCorba().

◆ isAdaptableCppCpp()

int YACS::ENGINE::isAdaptableCppCpp ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 69 of file CppCppConv.cxx.

70  {
72  }
int isAdaptableNeutralNeutral(const TypeCode *t1, const TypeCode *t2)

References isAdaptableNeutralNeutral(), YACS::t1, and YACS::t2.

◆ isAdaptableCppNeutral()

int YACS::ENGINE::isAdaptableCppNeutral ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 69 of file NeutralCppConv.cxx.

70  {
72  }

References isAdaptableNeutralNeutral(), YACS::t1, and YACS::t2.

◆ isAdaptableCppPyObject()

int YACS::ENGINE::isAdaptableCppPyObject ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 64 of file PythonCppConv.cxx.

65  {
67  }
int isAdaptableNeutralPyObject(const TypeCode *t1, const TypeCode *t2)

References isAdaptableNeutralPyObject(), YACS::t1, and YACS::t2.

Referenced by YACS::ENGINE::RuntimeSALOME::adaptCppToPython().

◆ isAdaptableCppXml()

int YACS::ENGINE::isAdaptableCppXml ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 105 of file XMLCppConv.cxx.

106  {
107  return isAdaptableNeutralXml(t1, t2);
108  }
int isAdaptableNeutralXml(const TypeCode *t1, const TypeCode *t2)

References isAdaptableNeutralXml(), YACS::t1, and YACS::t2.

Referenced by YACS::ENGINE::RuntimeSALOME::adaptCppToXml().

◆ isAdaptableNeutralCorba()

YACSRUNTIMESALOME_EXPORT int YACS::ENGINE::isAdaptableNeutralCorba ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 367 of file TypeConversions.cxx.

368  {
369  return isAdaptable<CORBAImpl,NEUTRALImpl>(t1,t2);
370  }

References YACS::t1, and YACS::t2.

Referenced by isAdaptableCppCorba(), and isAdaptableNeutralNeutral().

◆ isAdaptableNeutralCpp()

int YACS::ENGINE::isAdaptableNeutralCpp ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 69 of file CppNeutralConv.cxx.

70  {
72  }

References isAdaptableNeutralNeutral(), YACS::t1, and YACS::t2.

Referenced by YACS::ENGINE::RuntimeSALOME::adaptNeutralToCpp().

◆ isAdaptableNeutralNeutral()

YACSRUNTIMESALOME_EXPORT int YACS::ENGINE::isAdaptableNeutralNeutral ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 355 of file TypeConversions.cxx.

356  {
357  return isAdaptableNeutralCorba(t1, t2);
358  }

References isAdaptableNeutralCorba(), YACS::t1, and YACS::t2.

Referenced by isAdaptableCppCpp(), isAdaptableCppNeutral(), and isAdaptableNeutralCpp().

◆ isAdaptableNeutralPyObject()

YACSRUNTIMESALOME_EXPORT int YACS::ENGINE::isAdaptableNeutralPyObject ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 333 of file TypeConversions.cxx.

334  {
335  return isAdaptable<PYTHONImpl,NEUTRALImpl>(t1,t2);
336  }

References YACS::t1, and YACS::t2.

Referenced by isAdaptableCppPyObject().

◆ isAdaptableNeutralXml()

YACSRUNTIMESALOME_EXPORT int YACS::ENGINE::isAdaptableNeutralXml ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 361 of file TypeConversions.cxx.

362  {
363  return isAdaptable<XMLImpl,NEUTRALImpl>(t1,t2);
364  }

References YACS::t1, and YACS::t2.

Referenced by isAdaptableCppXml().

◆ isAdaptablePyObjectCorba()

YACSRUNTIMESALOME_EXPORT int YACS::ENGINE::isAdaptablePyObjectCorba ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 379 of file TypeConversions.cxx.

380  {
381  return isAdaptable<CORBAImpl,PYTHONImpl>(t1,t2);
382  }

References YACS::t1, and YACS::t2.

Referenced by YACS::ENGINE::RuntimeSALOME::adaptPythonToCorba().

◆ isAdaptablePyObjectCpp()

int YACS::ENGINE::isAdaptablePyObjectCpp ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 70 of file CppPythonConv.cxx.

71  {
73  }
int isAdaptablePyObjectNeutral(const TypeCode *t1, const TypeCode *t2)

References isAdaptablePyObjectNeutral(), YACS::t1, and YACS::t2.

Referenced by YACS::ENGINE::RuntimeSALOME::adaptPythonToCpp().

◆ isAdaptablePyObjectNeutral()

YACSRUNTIMESALOME_EXPORT int YACS::ENGINE::isAdaptablePyObjectNeutral ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 347 of file TypeConversions.cxx.

348  {
349  return isAdaptable<NEUTRALImpl,PYTHONImpl>(t1,t2);
350  }

References YACS::t1, and YACS::t2.

Referenced by YACS::ENGINE::RuntimeSALOME::adaptPythonToNeutral(), and isAdaptablePyObjectCpp().

◆ isAdaptablePyObjectPyObject()

YACSRUNTIMESALOME_EXPORT int YACS::ENGINE::isAdaptablePyObjectPyObject ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 337 of file TypeConversions.cxx.

338  {
339  return isAdaptable<PYTHONImpl,PYTHONImpl>(t1,t2);
340  }

References YACS::t1, and YACS::t2.

Referenced by YACS::ENGINE::RuntimeSALOME::adaptPythonToPython().

◆ isAdaptableXmlCorba()

YACSRUNTIMESALOME_EXPORT int YACS::ENGINE::isAdaptableXmlCorba ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 371 of file TypeConversions.cxx.

372  {
373  return isAdaptable<CORBAImpl,XMLImpl>(t1,t2);
374  }

References YACS::t1, and YACS::t2.

Referenced by YACS::ENGINE::RuntimeSALOME::adaptXmlToCorba().

◆ isAdaptableXmlCpp()

int YACS::ENGINE::isAdaptableXmlCpp ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 69 of file CppXMLConv.cxx.

70  {
71  return isAdaptableXmlNeutral(t1, t2);
72  }
int isAdaptableXmlNeutral(const TypeCode *t1, const TypeCode *t2)

References isAdaptableXmlNeutral(), YACS::t1, and YACS::t2.

◆ isAdaptableXmlNeutral()

YACSRUNTIMESALOME_EXPORT int YACS::ENGINE::isAdaptableXmlNeutral ( const TypeCode t1,
const TypeCode t2 
)

Definition at line 351 of file TypeConversions.cxx.

352  {
353  return isAdaptable<NEUTRALImpl,XMLImpl>(t1,t2);
354  }

References YACS::t1, and YACS::t2.

Referenced by isAdaptableXmlCpp().

◆ LoadObserversPluginIfAny()

void YACS::ENGINE::LoadObserversPluginIfAny ( ComposedNode rootNode,
Executor executor 
)

Definition at line 35 of file ObserverAsPlugin.cxx.

36 {
37  static const char SYMBOLE_NAME_1[]="DefineCustomObservers";
38  static const char SYMBOLE_NAME_2[]="CleanUpObservers";
39 #ifndef WIN32
40  Dispatcher *disp(Dispatcher::getDispatcher());
41  if(!disp)
42  throw YACS::Exception("Internal error ! No dispatcher !");
43  char *yacsDriverPluginPath(getenv("YACS_DRIVER_PLUGIN_PATH"));
44  if(!yacsDriverPluginPath)
45  return ;
46  void *handle(dlopen(yacsDriverPluginPath, RTLD_LAZY | RTLD_GLOBAL));
47  if(!handle)
48  {
49  std::string message(dlerror());
50  std::ostringstream oss; oss << "Error during load of \"" << yacsDriverPluginPath << "\" defined by the YACS_DRIVER_PLUGIN_PATH env var : " << message;
51  throw YACS::Exception(oss.str());
52  }
55  {
56  std::ostringstream oss; oss << "Error during load of \"" << yacsDriverPluginPath << "\" ! Library has been correctly loaded but symbol " << SYMBOLE_NAME_1 << " does not exists !";
57  throw YACS::Exception(oss.str());
58  }
59  CleanUpObservers=(void (*)())(dlsym(handle,SYMBOLE_NAME_2));
60  if(!CleanUpObservers)
61  {
62  std::ostringstream oss; oss << "Error during load of \"" << yacsDriverPluginPath << "\" ! Library has been correctly loaded but symbol " << SYMBOLE_NAME_2 << " does not exists !";
63  throw YACS::Exception(oss.str());
64  }
65  HandleOnLoadedPlugin=handle;
66  DefineCustomObservers(disp,rootNode,executor);
67 #endif
68 }
void(* CleanUpObservers)()
void * HandleOnLoadedPlugin
void(* DefineCustomObservers)(YACS::ENGINE::Dispatcher *, YACS::ENGINE::ComposedNode *, YACS::ENGINE::Executor *)
Base class for all composed nodes.
Base class for dispatcher in observer pattern.
Definition: Dispatcher.hxx:74
Threaded Executor.
Definition: Executor.hxx:63

References CleanUpObservers, DefineCustomObservers, and HandleOnLoadedPlugin.

Referenced by main().

◆ loadState()

void YACS::ENGINE::loadState ( YACS::ENGINE::Proc p,
const std::string &  xmlStateFile 
)

Load state from a file into a Proc.

Parameters
pthe Proc
xmlStateFilethe file name

Definition at line 950 of file LoadState.cxx.

951 {
952  DEBTRACE("YACS::ENGINE::loadState");
953  p->init();
954  p->exUpdateState();
955  stateParser* rootParser = new stateParser();
956  stateLoader myStateLoader(rootParser, p);
957  myStateLoader.parse(xmlStateFile);
958 }
void init(bool start=true)
Initialize the bloc.
Definition: Bloc.cxx:95
void exUpdateState()
Update the bloc state.
Definition: Bloc.cxx:153
class for parse an xml file, use a dedicated parser, to load a saved state of a SALOME execution.
Definition: LoadState.hxx:54
specialized parser to load SALOME execution saved states.
Definition: LoadState.hxx:81
Proc * p
Definition: driver.cxx:216

References DEBTRACE, YACS::ENGINE::Bloc::exUpdateState(), YACS::ENGINE::Bloc::init(), p, and YACS::ENGINE::stateLoader::parse().

Referenced by YACS::HMI::BatchJobsListDialog::get_dump_file().

◆ NbDoneLoader()

void YACS::ENGINE::NbDoneLoader ( Loop node,
int  val 
)

For use only when loading a previously saved execution

Definition at line 705 of file Loop.cxx.

706 {
707  node->_nbOfTurns = val;
708 }

References YACS::ENGINE::Loop::_nbOfTurns.

Referenced by YACS::ENGINE::nodeParser::onEnd().

◆ newPyStdOut()

YACSRUNTIMESALOME_EXPORT PyObject * YACS::ENGINE::newPyStdOut ( std::string &  out)

◆ operator<<() [1/2]

ostream& YACS::ENGINE::operator<< ( ostream &  os,
const OutputCorbaPort p 
)

Definition at line 460 of file CORBAPorts.cxx.

461  {
463  p._data>>=l;
464  os << p._name << " : " << l ;
465  return os;
466  }
std::string _name
Definition: Node.hxx:89

References YACS::ENGINE::Node::_name, Double, testCppPluginInvokation::l, and p.

◆ operator<<() [2/2]

YACSRUNTIMESALOME_EXPORT std::ostream& YACS::ENGINE::operator<< ( std::ostream &  os,
const YACS::ENGINE::OutputCorbaPort p 
)

◆ PyStdOut_dealloc()

static void YACS::ENGINE::PyStdOut_dealloc ( PyStdOut self)
static

Definition at line 46 of file PyStdout.cxx.

47 {
48  PyObject_Del(self);
49 }

◆ PyStdOut_write()

static PyObject* YACS::ENGINE::PyStdOut_write ( PyStdOut self,
PyObject *  args 
)
static

Definition at line 52 of file PyStdout.cxx.

53 {
54  char *c;
55  int l;
56  if (!PyArg_ParseTuple(args, "s#:write",&c, &l))
57  return NULL;
58 
59  //std::cerr << c ;
60  *(self->out)=*(self->out)+std::string(c);
61 
62  Py_INCREF(Py_None);
63  return Py_None;
64 }

References gui.CONNECTOR::c, and testCppPluginInvokation::l.

◆ schemaSaveState()

void YACS::ENGINE::schemaSaveState ( Proc proc,
Executor exec,
const std::string &  xmlSchemaFile 
)

◆ StateLoader()

void YACS::ENGINE::StateLoader ( Node node,
YACS::StatesForNode  state 
)

For use only when loading a previously saved execution

Definition at line 712 of file Node.cxx.

713 {
714  node->setState(state);
715 }
void setState(YACS::StatesForNode theState)
Sets the given state for node.
Definition: Node.cxx:645

References YACS::ENGINE::Node::setState(), and yacsorb.CORBAEngineTest::state.

Referenced by YACS::ENGINE::Executor::failTask(), and YACS::ENGINE::nodeParser::onEnd().

◆ ToBase64()

std::string YACS::ENGINE::ToBase64 ( const std::string &  bytes)

Definition at line 85 of file Any.cxx.

86 {//64 == 2**6
87  const char *bytesPt(bytes.c_str());
88  std::size_t input_len(bytes.size());
89  std::size_t input_len_bit(input_len*8);
90  std::size_t nb_chunks( input_len_bit/NB_BITS + OnOff((NB_BITS - input_len_bit%NB_BITS)%NB_BITS) );
91  std::string ret(nb_chunks,'\0');
92  for(std::size_t i=0;i<nb_chunks;++i)
93  {
94  unsigned char cp(ChunkAtPos(bytesPt,input_len, i));
95  ret[i] = TAB[cp];
96  }
97  return ret;
98 }
unsigned char ChunkAtPos(const char *pt, std::size_t len, std::size_t posChunk)
Definition: Any.cxx:70
constexpr unsigned char TAB[64]
Definition: Any.cxx:43
std::size_t OnOff(std::size_t i)
Definition: Any.cxx:78

References ChunkAtPos(), yacsorb.CORBAEngineTest::i, NB_BITS, OnOff(), and TAB.

Referenced by YACS::ENGINE::convertFromYacsObjref< XMLImpl, std::string >::convert(), and YACS::ENGINE::SeqAnyInputPort::dump().

◆ UnLoadObserversPluginIfAny()

void YACS::ENGINE::UnLoadObserversPluginIfAny ( )

Definition at line 70 of file ObserverAsPlugin.cxx.

71 {
72 #ifndef WIN32
74  {
76  dlclose(HandleOnLoadedPlugin);
77  }
78 #endif
79 }

References CleanUpObservers, and HandleOnLoadedPlugin.

Referenced by main().

◆ YacsChecker()

template<ImplType IMPLIN, class TIN , class TIN2 >
bool YACS::ENGINE::YacsChecker ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inline

Definition at line 2490 of file TypeConversions.cxx.

2491  {
2492  int tk=t->kind();
2493  switch(t->kind())
2494  {
2495  case Double:
2496  return checkDouble<IMPLIN,TIN,TIN2>(t,o,aux);
2497  case Int:
2498  return checkInt<IMPLIN,TIN,TIN2>(t,o,aux);
2499  case String:
2500  return checkString<IMPLIN,TIN,TIN2>(t,o,aux);
2501  case Bool:
2502  return checkBool<IMPLIN,TIN,TIN2>(t,o,aux);
2503  case Objref:
2504  return checkObjref<IMPLIN,TIN,TIN2>(t,o,aux);
2505  case Sequence:
2506  return checkSequence<IMPLIN,TIN,TIN2>(t,o,aux);
2507  case Array:
2508  return checkArray<IMPLIN,TIN,TIN2>(t,o,aux);
2509  case Struct:
2510  return checkStruct<IMPLIN,TIN,TIN2>(t,o,aux);
2511  default:
2512  break;
2513  }
2514  stringstream msg;
2515  msg << "Check not implemented for kind= " << tk ;
2516  msg << " : " << __FILE__ << ":" << __LINE__;
2517  throw YACS::ENGINE::ConversionException(msg.str());
2518  }

References Array, Bool, Double, Int, Objref, Sequence, String, Struct, and gui.Appli::t.

◆ YacsConvertor()

template<ImplType IMPLIN, class TIN , class TIN2 , ImplType IMPLOUT, class TOUT >
TOUT YACS::ENGINE::YacsConvertor ( const TypeCode t,
TIN  o,
TIN2  aux 
)
inline

Definition at line 642 of file TypeConversions.cxx.

643  {
644  int tk=t->kind();
645  switch(t->kind())
646  {
647  case Double:
648  return convertDouble<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>(t,o,aux);
649  case Int:
650  return convertInt<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>(t,o,aux);
651  case String:
652  return convertString<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>(t,o,aux);
653  case Bool:
654  return convertBool<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>(t,o,aux);
655  case Objref:
656  return convertObjref<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>(t,o,aux);
657  case Sequence:
658  return convertSequence<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>(t,o,aux);
659  case Array:
660  return convertArray<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>(t,o,aux);
661  case Struct:
662  return convertStruct<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>(t,o,aux);
663  default:
664  break;
665  }
666  stringstream msg;
667  msg << "Conversion not implemented: kind= " << tk << " Implementation: " << IMPLOUT;
668  msg << " : " << __FILE__ << ":" << __LINE__;
669  throw YACS::ENGINE::ConversionException(msg.str());
670  }

References Array, Bool, Double, Int, Objref, Sequence, String, Struct, and gui.Appli::t.

Variable Documentation

◆ getCorbaTCFns

getCorbaTCFn YACS::ENGINE::getCorbaTCFns[]
Initial value:
=
{
}
CORBA::TypeCode_ptr getCorbaTCString(const TypeCode *t)
CORBA::TypeCode_ptr getCorbaTCDouble(const TypeCode *t)
CORBA::TypeCode_ptr getCorbaTCObjref(const TypeCode *t)
CORBA::TypeCode_ptr getCorbaTCBool(const TypeCode *t)
CORBA::TypeCode_ptr getCorbaTCSequence(const TypeCode *t)
CORBA::TypeCode_ptr getCorbaTCInt(const TypeCode *t)
CORBA::TypeCode_ptr getCorbaTCNull(const TypeCode *t)
CORBA::TypeCode_ptr getCorbaTCStruct(const TypeCode *t)

Definition at line 162 of file TypeConversions.cxx.

Referenced by getCorbaTC().

◆ PyStdOut_memberlist

PyMemberDef YACS::ENGINE::PyStdOut_memberlist[]
static
Initial value:
= {
{(char*)"softspace", T_INT, offsetof(PyStdOut, softspace), 0,
(char*)"flag indicating that a space needs to be printed; used by print"},
{NULL}
}

Definition at line 72 of file PyStdout.cxx.

◆ PyStdOut_methods

PyMethodDef YACS::ENGINE::PyStdOut_methods[]
static
Initial value:
= {
{"write", (PyCFunction)PyStdOut_write, METH_VARARGS,
PyDoc_STR("write(string) -> None")},
{NULL, NULL}
}
static PyObject * PyStdOut_write(PyStdOut *self, PyObject *args)
Definition: PyStdout.cxx:52

Definition at line 66 of file PyStdout.cxx.

◆ PyStdOut_Type

PyTypeObject YACS::ENGINE::PyStdOut_Type
static

Definition at line 78 of file PyStdout.cxx.

Referenced by newPyStdOut().