Back to index

salome-kernel  6.5.0
Public Member Functions | Public Attributes
KERNEL_PY.kernel.parametric.study_exchange_vars.ExchangeVariables Class Reference

List of all members.

Public Member Functions

def __init__
def saveToXmlFile

Public Attributes


Detailed Description

This class describes "Exchange Variables", i.e. a structure containing all
the necessary information to exchange variables between a supervision code
and a computation code.

.. attribute:: inputVarList

   This instance attribute is a list of :class:`Variable` objects,
   describing the input variables for the computation code.

.. attribute:: outputVarList

   This instance attribute is a list of :class:`Variable` objects,
   describing the output variables for the computation code.

.. attribute:: refEntry

   This instance attribute is optional and can be used to store a
   reference to a Salome entry containing an "Exchange Variable" SObject
   that was used to build this one (when the current object has been built
   by selecting variables of interest in a list of potential variables).

Definition at line 52 of file

Constructor & Destructor Documentation

def KERNEL_PY.kernel.parametric.study_exchange_vars.ExchangeVariables.__init__ (   self,
  inputVarList = [],
  outputVarList = [],
  refEntry = None 

Definition at line 78 of file

00079                  refEntry = None):
00080         self.inputVarList = inputVarList
00081         self.outputVarList = outputVarList
00082         self.refEntry = refEntry

Member Function Documentation

Save this object to an XML file.
:type  filepath: string
:param filepath: path of the XML file.

Definition at line 83 of file

00084     def saveToXmlFile(self, filepath):
00085         """
00086         Save this object to an XML file.
00088         :type  filepath: string
00089         :param filepath: path of the XML file.
00091         """
00092         doc = getDOMImplementation().createDocument(None, "variables", None)
00093         top_el = doc.documentElement
00094         top_el.setAttribute("version", "6.4")
00095         input_variables_el = doc.createElement("input_variables")
00096         top_el.appendChild(input_variables_el)
00097         output_variables_el = doc.createElement("output_variables")
00098         top_el.appendChild(output_variables_el)
00099         for input_var in self.inputVarList:
00100             input_var_el = doc.createElement("variable")
00101             input_var_el.setAttribute("name",
00102             input_variables_el.appendChild(input_var_el)
00103         for output_var in self.outputVarList:
00104             output_var_el = doc.createElement("variable")
00105             output_var_el.setAttribute("name",
00106             output_variables_el.appendChild(output_var_el)
00107         f = open(filepath, "w")
00108         f.write(doc.toprettyxml(indent = "  "))
00109         f.close()

Here is the call graph for this function:

Member Data Documentation

Definition at line 79 of file

Definition at line 80 of file

Definition at line 81 of file

The documentation for this class was generated from the following file: