Version: 9.16.0
YACS::ENGINE Namespace Reference

Classes

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

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)
 
YACSRUNTIMESALOME_EXPORT void schemaSaveState (Proc *proc, Executor *exec, const std::string &xmlSchemaFile)
 
YACSRUNTIMESALOME_EXPORT void schemaSaveStateUnsafe (Proc *proc, const std::string &xmlSchemaFile)
 
YACSRUNTIMESALOME_EXPORT void VisitorSaveSalomeSchemaUnsafe (ComposedNode *proc, const std::string &xmlSchema)
 
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,
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 50 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.

◆ 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,
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,

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 2491 of file TypeConversions.cxx.

2492 {
2493 stringstream msg;
2494 msg << "Check not implemented for Implementation: " << IMPLIN ;
2495 msg << " : " << __FILE__ << ":" << __LINE__;
2496 throw YACS::ENGINE::ConversionException(msg.str());
2497 }

◆ checkBool()

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

Definition at line 2451 of file TypeConversions.cxx.

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

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

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

Definition at line 2556 of file TypeConversions.cxx.

2557 {
2558 if (PyBool_Check(o))
2559 return true;
2560 else if(PyLong_Check(o))
2561 return true;
2562 else
2563 {
2564 stringstream msg;
2565 msg << "Not a python boolean " ;
2566 throw YACS::ENGINE::ConversionException(msg.str());
2567 }
2568
2569 }

◆ 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 2435 of file TypeConversions.cxx.

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

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

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

Definition at line 2530 of file TypeConversions.cxx.

2531 {
2532 if (PyFloat_Check(o))
2533 return true;
2534 else if(PyLong_Check(o))
2535 return true;
2536 else
2537 {
2538 stringstream msg;
2539 msg << "Not a python double ";
2540 throw YACS::ENGINE::ConversionException(msg.str());
2541 }
2542 }

◆ checkInt()

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

Definition at line 2443 of file TypeConversions.cxx.

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

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

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

Definition at line 2544 of file TypeConversions.cxx.

2545 {
2546 if (PyLong_Check(o))
2547 return true;
2548 else
2549 {
2550 stringstream msg;
2551 msg << "Not a python integer ";
2552 throw YACS::ENGINE::ConversionException(msg.str());
2553 }
2554 }

◆ checkObjref()

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

Definition at line 2467 of file TypeConversions.cxx.

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

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

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

Definition at line 2583 of file TypeConversions.cxx.

2584 {
2585 if (PyUnicode_Check(o))
2586 return true;
2587 if(strncmp(t->id(),"python",6)==0) // a Python object is expected (it's always true)
2588 return true;
2589 else if(strncmp(t->id(),"json",4)==0) // The python object must be json pickable
2590 {
2591 // The python object should be json compliant (to improve)
2592 return true;
2593 }
2594 else
2595 {
2596 // The python object should be a CORBA obj (to improve)
2597 return true;
2598 }
2599 }

References gui.Appli::t.

◆ checkPyObject()

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

Definition at line 2663 of file TypeConversions.cxx.

2664 {
2665 return YacsChecker<PYTHONImpl,PyObject*,void*>(t,ob,0);
2666 }

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 2475 of file TypeConversions.cxx.

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

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

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

Definition at line 2601 of file TypeConversions.cxx.

2602 {
2603 if(!PySequence_Check(o))
2604 {
2605 stringstream msg;
2606 msg << "python object is not a sequence " ;
2607 throw YACS::ENGINE::ConversionException(msg.str());
2608 }
2609 int length=PySequence_Size(o);
2610 for(int i=0;i<length;i++)
2611 {
2612 PyObject *item=PySequence_ITEM(o,i);
2613 try
2614 {
2615 YacsChecker<PYTHONImpl,PyObject*,void*>(t->contentType(),item,0);
2616 }
2617 catch(ConversionException& ex)
2618 {
2619 stringstream msg;
2620 msg << ex.what() << " for sequence element " << i;
2621 throw YACS::ENGINE::ConversionException(msg.str(),false);
2622 }
2623 Py_DECREF(item);
2624 }
2625 return true;
2626 }

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 2459 of file TypeConversions.cxx.

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

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

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

Definition at line 2571 of file TypeConversions.cxx.

2572 {
2573 if (PyUnicode_Check(o))
2574 return true;
2575 else
2576 {
2577 stringstream msg;
2578 msg << "Not a python string " ;
2579 throw YACS::ENGINE::ConversionException(msg.str());
2580 }
2581 }

◆ checkStruct()

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

Definition at line 2483 of file TypeConversions.cxx.

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

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

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

Definition at line 2628 of file TypeConversions.cxx.

2629 {
2630 PyObject *value;
2631 if(!PyDict_Check(o))
2632 {
2633 stringstream msg;
2634 msg << "python object is not a dict " ;
2635 throw YACS::ENGINE::ConversionException(msg.str());
2636 }
2638 int nMember=tst->memberCount();
2639 for(int i=0;i<nMember;i++)
2640 {
2641 std::string name=tst->memberName(i);
2642 TypeCode* tm=tst->memberType(i);
2643 value=PyDict_GetItemString(o, name.c_str());
2644 if(value==NULL)
2645 {
2646 stringstream msg;
2647 msg << "member " << name << " not present " ;
2648 throw YACS::ENGINE::ConversionException(msg.str());
2649 }
2650 try
2651 {
2652 YacsChecker<PYTHONImpl,PyObject*,void*>(tm,value,0);
2653 }
2654 catch(ConversionException& ex)
2655 {
2656 std::string s=" for struct member "+name;
2657 throw YACS::ENGINE::ConversionException(ex.what()+s,false);
2658 }
2659 }
2660 return true;
2661 }
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()

◆ convertBool()

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

◆ 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 2243 of file TypeConversions.cxx.

2244 {
2245 return o;
2246 }

◆ convertCorbaCorba()

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

Definition at line 2424 of file TypeConversions.cxx.

2425 {
2426 return YacsConvertor<CORBAImpl,CORBA::Any*,void*,CORBAImpl,CORBA::Any*>(t,data,0);
2427 }

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 2420 of file TypeConversions.cxx.

2421 {
2422 return YacsConvertor<CORBAImpl,CORBA::Any*,void*,NEUTRALImpl,YACS::ENGINE::Any*>(t,data,0);
2423 }

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 2416 of file TypeConversions.cxx.

2417 {
2418 return YacsConvertor<CORBAImpl,CORBA::Any*,void*,XMLImpl,std::string>(t,data,0);
2419 }

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 }
: Interface for management of storage of data formated dynamically in its TypeCode....
Definition: Any.hxx:79
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

◆ 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 2212 of file TypeConversions.cxx.

2213 {
2214 CORBA::TypeCode_var tc = o->type();
2215 if (tc->equivalent(CORBA::_tc_double))
2216 {
2217 return o;
2218 }
2219 if (tc->equivalent(CORBA::_tc_long))
2220 {
2221 CORBA::Long d;
2222 *o >>= d;
2223 CORBA::Any *any = new CORBA::Any();
2224 *any <<= (CORBA::Double)d;
2225 return any;
2226 }
2227 stringstream msg;
2228 msg << "Not a double or long corba type " << tc->kind();
2229 msg << " : " << __FILE__ << ":" << __LINE__;
2230 throw YACS::ENGINE::ConversionException(msg.str());
2231 }

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

◆ 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 2233 of file TypeConversions.cxx.

2234 {
2235 return o;
2236 }

◆ 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 2405 of file TypeConversions.cxx.

2406 {
2407 data->incrRef();
2408 return data;
2409 }

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 2397 of file TypeConversions.cxx.

2398 {
2399 return YacsConvertor<NEUTRALImpl,YACS::ENGINE::Any*,void*,XMLImpl,std::string>(t,data,0);
2400 }

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

◆ 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 2248 of file TypeConversions.cxx.

2249 {
2250 return o;
2251 }

◆ convertPyObjectCorba()

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

◆ 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 2305 of file TypeConversions.cxx.

2306 {
2307 return YacsConvertor<PYTHONImpl,PyObject*,void*,NEUTRALImpl,YACS::ENGINE::Any*>(t,data,0);
2308 }

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 2313 of file TypeConversions.cxx.

2314 {
2315 return YacsConvertor<PYTHONImpl,PyObject*,void*,PYTHONImpl,PyObject*>(t,data,0);
2316 }

References gui.Appli::t.

◆ convertPyObjectToString()

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

Definition at line 2318 of file TypeConversions.cxx.

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

Referenced by 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 2301 of file TypeConversions.cxx.

2302 {
2303 return YacsConvertor<PYTHONImpl,PyObject*,void*,XMLImpl,std::string>(t,data,0);
2304 }

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

◆ convertString()

◆ 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 2238 of file TypeConversions.cxx.

2239 {
2240 return o;
2241 }

◆ convertStruct()

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

◆ 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 2253 of file TypeConversions.cxx.

2254 {
2255 return o;
2256 }

◆ convertXmlCorba()

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

Definition at line 2347 of file TypeConversions.cxx.

2348 {
2349 return YacsConvertor<XMLImpl,xmlDocPtr,xmlNodePtr,CORBAImpl,CORBA::Any*>(t,doc,cur);
2350 }
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 2343 of file TypeConversions.cxx.

2344 {
2345 return YacsConvertor<XMLImpl,xmlDocPtr,xmlNodePtr,NEUTRALImpl,YACS::ENGINE::Any*>(t,doc,cur);
2346 }

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 2339 of file TypeConversions.cxx.

2340 {
2341 return YacsConvertor<XMLImpl,xmlDocPtr,xmlNodePtr,PYTHONImpl,PyObject*>(t,doc,cur);
2342 }

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 2351 of file TypeConversions.cxx.

2352 {
2353 xmlDocPtr doc;
2354 xmlNodePtr cur;
2355 PyObject *ob=NULL;
2356 doc = xmlParseMemory(data.c_str(), strlen(data.c_str()));
2357 if (doc == NULL )
2358 {
2359 std::stringstream msg;
2360 msg << "Problem in conversion: XML Document not parsed successfully ";
2361 msg << " (" << __FILE__ << ":" << __LINE__ << ")";
2362 throw YACS::ENGINE::ConversionException(msg.str());
2363 }
2364 cur = xmlDocGetRootElement(doc);
2365 if (cur == NULL)
2366 {
2367 xmlFreeDoc(doc);
2368 std::stringstream msg;
2369 msg << "Problem in conversion: empty XML Document";
2370 msg << " (" << __FILE__ << ":" << __LINE__ << ")";
2371 throw YACS::ENGINE::ConversionException(msg.str());
2372 }
2373 while (cur != NULL)
2374 {
2375 if ((!xmlStrcmp(cur->name, (const xmlChar *)"value")))
2376 {
2377 ob=convertXmlPyObject(t,doc,cur);
2378 break;
2379 }
2380 cur = cur->next;
2381 }
2382 xmlFreeDoc(doc);
2383 if(ob==NULL)
2384 {
2385 std::stringstream msg;
2386 msg << "Problem in conversion: incorrect XML value";
2387 msg << " (" << __FILE__ << ":" << __LINE__ << ")";
2388 throw YACS::ENGINE::ConversionException(msg.str());
2389 }
2390 return ob;
2391 }
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}

References driver_internal::args.

◆ 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 }
Base class for all type objects.
Definition: TypeCode.hxx:68
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:59

References YACS::ENGINE::RuntimeSALOME::getSingleton(), and 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.

References YACS::ENGINE::isAdaptableDouble< IMPLIN, IMPLOUT >::apply(), YACS::ENGINE::isAdaptableInt< IMPLIN, IMPLOUT >::apply(), YACS::ENGINE::isAdaptableString< IMPLIN, IMPLOUT >::apply(), YACS::ENGINE::isAdaptableBool< IMPLIN, IMPLOUT >::apply(), YACS::ENGINE::isAdaptableObjref< IMPLIN, IMPLOUT >::apply(), YACS::ENGINE::isAdaptableSequence< IMPLIN, IMPLOUT >::apply(), YACS::ENGINE::isAdaptableArray< IMPLIN, IMPLOUT >::apply(), YACS::ENGINE::isAdaptableStruct< IMPLIN, IMPLOUT >::apply(), 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 {
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 {
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 {
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 {
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));
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 }
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()

◆ 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;
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 driver_internal::args, gui.CONNECTOR::c, testCppPluginInvokation::l, and YACS::ENGINE::PyStdOut::out.

◆ schemaSaveState()

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

Definition at line 114 of file VisitorSalomeSaveState.cxx.

117{
119 schemaSaveStateUnsafe(proc,xmlSchemaFile);
120}
YACS::BASES::Mutex & getTheMutexForSchedulerUpdate()
Definition: Executor.hxx:133
YACSRUNTIMESALOME_EXPORT void schemaSaveStateUnsafe(Proc *proc, const std::string &xmlSchemaFile)

References YACS::ENGINE::Executor::getTheMutexForSchedulerUpdate(), and schemaSaveStateUnsafe().

◆ schemaSaveStateUnsafe()

void YACS::ENGINE::schemaSaveStateUnsafe ( Proc proc,
const std::string &  xmlSchemaFile 
)

Definition at line 122 of file VisitorSalomeSaveState.cxx.

123{
124 VisitorSalomeSaveState vss(proc);
125 vss.openFileDump(xmlSchemaFile);
126 proc->accept(&vss);
127 vss.closeFileDump();
128}
virtual void accept(Visitor *visitor)
Definition: Proc.cxx:199

References YACS::ENGINE::Proc::accept(), YACS::ENGINE::VisitorSaveState::closeFileDump(), and YACS::ENGINE::VisitorSaveState::openFileDump().

Referenced by schemaSaveState().

◆ StateLoader()

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

For use only when loading a previously saved execution

Definition at line 719 of file Node.cxx.

720{
721 node->setState(state);
722}
void setState(YACS::StatesForNode theState)
Sets the given state for node.
Definition: Node.cxx:652

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().

◆ VisitorSaveSalomeSchemaUnsafe()

void YACS::ENGINE::VisitorSaveSalomeSchemaUnsafe ( ComposedNode proc,
const std::string &  xmlSchema 
)

Definition at line 181 of file VisitorSaveSalomeSchema.cxx.

182{
183 VisitorSaveSalomeSchema vss(proc);
184 vss.openFileSchema(xmlSchema);
185 proc->accept(&vss);
186 vss.closeFileSchema();
187}
void accept(Visitor *visitor)

References YACS::ENGINE::ComposedNode::accept(), YACS::ENGINE::VisitorSaveSchema::closeFileSchema(), and YACS::ENGINE::VisitorSaveSchema::openFileSchema().

◆ YacsChecker()

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

Definition at line 2500 of file TypeConversions.cxx.

2501 {
2502 int tk=t->kind();
2503 switch(t->kind())
2504 {
2505 case Double:
2506 return checkDouble<IMPLIN,TIN,TIN2>(t,o,aux);
2507 case Int:
2508 return checkInt<IMPLIN,TIN,TIN2>(t,o,aux);
2509 case String:
2510 return checkString<IMPLIN,TIN,TIN2>(t,o,aux);
2511 case Bool:
2512 return checkBool<IMPLIN,TIN,TIN2>(t,o,aux);
2513 case Objref:
2514 return checkObjref<IMPLIN,TIN,TIN2>(t,o,aux);
2515 case Sequence:
2516 return checkSequence<IMPLIN,TIN,TIN2>(t,o,aux);
2517 case Array:
2518 return checkArray<IMPLIN,TIN,TIN2>(t,o,aux);
2519 case Struct:
2520 return checkStruct<IMPLIN,TIN,TIN2>(t,o,aux);
2521 default:
2522 break;
2523 }
2524 stringstream msg;
2525 msg << "Check not implemented for kind= " << tk ;
2526 msg << " : " << __FILE__ << ":" << __LINE__;
2527 throw YACS::ENGINE::ConversionException(msg.str());
2528 }

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().