Overview | Group | Tree | Graph | Index | Concepts |
The class IloXmlInfo
allows you to serialize an
IloModel
or an IloSolution
in XML.
Constructor and Destructor Summary | |
---|---|
public | IloXmlInfo(IloXmlContextI *, const char *) |
public | IloXmlInfo() |
Method Summary | |
---|---|
public IloBool | checkAttExistence(IloXmlReader, IloXmlElement *, const char *) |
public IloBool | checkExprExistence(IloXmlReader, IloXmlElement *, const char *, IloInt &) |
public IloXmlContextI * | getContext() |
protected IloBool | getIntValArray(IloXmlReader, IloXmlElement *, IloIntArray &) |
protected IloBool | getNumValArray(IloXmlReader, IloXmlElement *, IloNumArray &) |
public IloBool | getRefInChild(IloXmlReader, IloXmlElement *, IloInt &) |
public virtual const char * | getTag() |
public static const char * | getTagName() |
protected IloNumVar::Type | getVarType(IloXmlReader, IloXmlElement *) |
protected const char * | getVersion() |
public virtual IloExtractableArray * | readArrayFromXml(IloXmlReader, IloXmlElement *) |
public IloBool | readExtractable(IloXmlReader, IloXmlElement *) |
public virtual IloExtractableI * | readFromXml(IloXmlReader, IloXmlElement *) |
public virtual IloBool | readSolution(IloXmlReader, IloSolution &, IloXmlElement *) |
protected virtual IloExtractableI * | readXml(IloXmlReader, IloXmlElement *) |
protected virtual IloExtractableArray * | readXmlArray(IloXmlReader, IloXmlElement *) |
protected IloXmlElement * | setBoolArray(IloXmlWriter, const IloBoolArray) |
public IloXmlElement * | setCommonArrayXml(IloXmlWriter, const IloExtractableArray *) |
public IloXmlElement * | setCommonValueXml(IloXmlWriter, const IloExtractableI *) |
public IloXmlElement * | setCommonXml(IloXmlWriter, const IloExtractableI *) |
protected IloXmlElement * | setIntArray(IloXmlWriter, const IloIntArray) |
protected IloXmlElement * | setIntSet(IloXmlWriter, const IloIntSet) |
protected IloXmlElement * | setNumArray(IloXmlWriter, const IloNumArray) |
protected IloXmlElement * | setNumSet(IloXmlWriter, const IloNumSet) |
protected void | setVersion(const char *) |
public void | setXml(IloXmlWriter, IloXmlElement *, const IloExtractableI *) |
public IloBool | writeExtractable(IloXmlWriter, IloXmlElement *, const IloExtractableI *, const char *) |
public virtual void | writeSolution(IloXmlWriter, const IloSolution, const IloExtractable) |
public void | writeSolutionValue(IloXmlWriter, const IloSolution, IloXmlElement *, const IloExtractableI *, const char *) |
protected IloBool | writeVarArray(IloXmlWriter, IloXmlElement *, IloSOS2Array) |
protected IloBool | writeVarArray(IloXmlWriter, IloXmlElement *, IloSOS1Array) |
protected IloBool | writeVarArray(IloXmlWriter, IloXmlElement *, IloSemiContVarArray) |
protected IloBool | writeVarArray(IloXmlWriter, IloXmlElement *, IloConstraintArray) |
protected IloBool | writeVarArray(IloXmlWriter, IloXmlElement *, IloRangeArray) |
protected IloBool | writeVarArray(IloXmlWriter, IloXmlElement *, IloNumVarArray) |
protected IloBool | writeVarArray(IloXmlWriter, IloXmlElement *, IloIntSetVarArray) |
protected IloBool | writeVarArray(IloXmlWriter, IloXmlElement *, IloNumExprArray) |
protected IloBool | writeVarArray(IloXmlWriter, IloXmlElement *, IloIntExprArray) |
protected IloBool | writeVarArray(IloXmlWriter, IloXmlElement *, IloBoolVarArray) |
protected IloBool | writeVarArray(IloXmlWriter, IloXmlElement *, IloIntVarArray) |
public virtual int | writeXml(IloXmlWriter, const IloExtractableArray *, IloXmlElement *) |
public virtual IloBool | writeXml(IloXmlWriter, const IloExtractableI *, IloXmlElement *) |
public virtual IloBool | writeXmlRef(IloXmlWriter, const IloExtractableI *, IloXmlElement *) |
Constructor and Destructor Detail |
---|
This constructor creates an instance of the handle class
IloXmlInfo
from a pointer to an instance of the
undocumented implementation class IloXmlContextI
.
This constructor creates an empty instance of the handle class
IloXmlInfo
.
Method Detail |
---|
Given a specified attribute, this member function checks element
to establish whether the attribute exists. If the attribute does not exist, this
member function throws an exception.
You can use this member function to dynamically validate an XML element.
Given a specified attribute, this member function checks element
to establish whether the attribute exists, fills the id
, and checks
in the XML context memory whether an object with this id
exists.
You can use this member function to dynamically validate an XML element.
Example: in the read
method of the IloDiff
, check that the
IdRef
object is already serialized
This member function returns the related IloXmlContextI
of the constructor.
This member function returns the contained IloIntArray
in the XML
element element
.
See Also:
This member function returns the IloNumArray
in the XML
element element
.
See Also:
Given an XML element, this member function checks for the first value
id
or RefId
in the element and its children.
This member function returns the related XML tag.
This static member function returns the linked XML tag of this serialization class.
This member function returns the type of an IloNumVar
-
IloFloat
, IloInt
, or IloBool
-
in the XML element element
.
This member function returns the version of the object.
This member function reads an array of IloExtractableI*
from
the given XML element.
This is the method to specialize when writing a serialization class for an array of extractables.
This member function asks the XML context to read the
IloExtractableI
in the child element and then calls
IloXmlInfo::readFromXml to read the parent extractable.
This member function reads an IloExtractableI
from the given
XML element. It asks the XML context to read the extractable in the XML
child element using a call to
IloXmlContext::readExtractable
; it then
calls IloXmlInfo::readXml
.
IloSolution
from
the XML element element
.
This member function reads an IloExtractableI
from the given
XML element.
This is the method to specialize for each serialization class
This member function reads an array of IloExtractableI*
from the given XML element.
It is called by the XML context. It first asks the XML context to read
from XML child elements using a call to
IloXmlContext::readExtractable
and then
calls IloXmlInfo::readArrayFromXml
.
This member function creates an XML element containing the
IloBoolArray
.
See Also:
This member function creates a XML element with the common header for
IloExtractable
arrays.
This member function creates an XML element with the given header for
IloExtractableI
from IloSolution
.
This member function creates an XML element with the common header for
IloExtractableI
.
This member function creates an XML element containing the
IloIntArray
.
See Also:
This member function creates an XML element containing the
IloIntSet
.
See Also:
This member function creates an XML element containing the
IloNumArray
.
See Also:
This member function creates an XML element containing the
IloNumSet
.
See Also:
This member function sets the version of the object.
This member function adds a name attribute and a ID attribute to the XML element.
This member function writes an embedded extractable. Using the
getId()
method of the extractable, it adds an attribute with
the ID in the xml element.
For example, used with IloDiff
, this member function
writes the expression and links it to the XML element via an IdRef
attribute.
// using an IloDiffI* exprI: writeExtractable(writer, element, (IloExtractableI*)exprI->getExpr1(), IloXmlAttributeDef::Expr1Id); writeExtractable(writer, element, (IloExtractableI*)exprI->getExpr2(), IloXmlAttributeDef::Expr2Id); *
See Also:
IloXmlContext::writeExtractable
This member function writes the specified extractable
extractable
from the IloSolution
solution
in XML format.
This member function writes an embedded extractable of a solution in xml.
Using the getId()
method of the extractable, it adds an
attribute with the ID in the xml element.
For example, used with IloDiff
, this member function writes the
expression and links it to the XML element via an IdRef
attribute.
See Also:
IloXmlContext::writeSolutionValue
This member function writes an IloSOS2Array
. It adds an
attribute in the XML element element
with the ID of
array
, serializes array
, and, if necessary,
serializes the IloSOS2s
of array
.
This member function writes an IloSOS1Array
. It adds an
attribute in the XML element element
with the ID of
array
, serializes array
, and, if necessary,
serializes the IloSOS1s
of array
.
This member function writes an IloSemiContVarArray
. It adds an
attribute in the XML element element
with the ID of
array
, serializes array
, and, if necessary,
serializes the IloSemiContVars
of array
.
This member function writes an IloConstraintArray
. It adds an
attribute in the XML element element
with the ID of
array
, serializes array
, and, if necessary,
serializes the IloConstraints
of array
.
This member function writes an IloRangeArray
. It adds an
attribute in the XML element element
with the ID of
array
, serializes array
, and, if necessary,
serializes the IloRanges
of array
.
This member function writes an IloNumVarArray
. It adds an
attribute in the XML element element
with the ID of
array
, serializes array
, and, if necessary,
serializes the IloNumVars
of array
.
This member function writes an IloIntSetVarArray
. It adds an
attribute in the XML element element
with the ID of
array
, serializes array
, and, if necessary,
serializes the IloIntSetVars
of array
.
This member function writes an IloNumExprArray
. It adds an
attribute in the XML element element
with the ID of
array
, serializes array
, and, if necessary,
serializes the IloNumExprs
of array
.
This member function writes an IloIntExprArray
. It adds an
attribute in the XML element element
with the ID of
array
, serializes array
, and, if necessary,
serializes the IloIntExprs
of array
.
This member function writes an IloBoolVarArray
. It adds an
attribute in the XML element element
with the ID of
array
, serializes array
, and, if necessary,
serializes the IloBoolVars
of array
.
This member function writes an IloIntVarArray
. It adds an
attribute in the XML element element
with the ID of
array
, serializes array
, and, if necessary,
serializes the IloIntVars
of array
.
Example using IloSos
containing an IloIntVarArray
:
// Using an IloSOS1I* exprI; this.writeVarArray(writer, element, exprI->getVarArray(), IloXmlAttributeDef::IdRef);
This sample adds an IdRef
attribute on the SOS XML element,
creates an XML element containing the IloIntVarArray
with the
list of IloIntVar
IDs, and creates a list of XML elements for the
IloIntVars
.
This member function writes the given IloExtractableArray
in XML and adds it to the XML document of writer
.
This is the method to specialize when writing a serialzation class
This member function writes the IloExtractableI
object
exprI
in XML and adds it to the XML document of the
IloXmlWriter
object writer
.
This member function writes the IloExtractableI
object
exprI
in XML as a reference.