| 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 * context, const char * version=0) |
public | IloXmlInfo() |
| Method Summary | |
|---|---|
public IloBool | checkAttExistence(IloXmlReader reader, IloXmlElement * element, const char * attribute) |
public IloBool | checkExprExistence(IloXmlReader reader, IloXmlElement * element, const char * attribute, IloInt & id) |
public IloXmlContextI * | getContext() |
protected IloBool | getIntValArray(IloXmlReader reader, IloXmlElement * element, IloIntArray & intArray) |
protected IloBool | getNumValArray(IloXmlReader reader, IloXmlElement * element, IloNumArray & numArray) |
public IloBool | getRefInChild(IloXmlReader reader, IloXmlElement * element, IloInt & id) |
public virtual const char * | getTag() |
public virtual IloXmlElement * | getTagElement(IloXmlWriter writer, const IloRtti * exprI) |
public static const char * | getTagName() |
protected IloNumVar::Type | getVarType(IloXmlReader reader, IloXmlElement * element) |
protected const char * | getVersion() |
protected virtual IloRtti * | read(IloXmlReader reader, IloXmlElement * element) |
public virtual IloExtractableArray * | readArrayFromXml(IloXmlReader reader, IloXmlElement * element) |
public IloBool | readExtractable(IloXmlReader reader, IloXmlElement * element) |
public virtual IloRtti * | readFrom(IloXmlReader reader, IloXmlElement * element) |
public virtual IloExtractableI * | readFromXml(IloXmlReader reader, IloXmlElement * element) |
public IloBool | readRtti(IloXmlReader reader, IloXmlElement * element) |
public virtual IloBool | readSolution(IloXmlReader reader, IloSolution solution, IloXmlElement * element) |
protected virtual IloExtractableI * | readXml(IloXmlReader reader, IloXmlElement * element) |
protected virtual IloExtractableArray * | readXmlArray(IloXmlReader reader, IloXmlElement * element) |
protected IloXmlElement * | setBoolArray(IloXmlWriter writer, const IloBoolArray Array) |
public IloXmlElement * | setCommonArrayXml(IloXmlWriter writer, const IloExtractableArray * extractable) |
public IloXmlElement * | setCommonValueXml(IloXmlWriter writer, const IloRtti * exprI) |
public IloXmlElement * | setCommonXml(IloXmlWriter writer, const IloRtti * exprI) |
protected IloXmlElement * | setIntArray(IloXmlWriter writer, const IloIntArray Array) |
protected IloXmlElement * | setIntSet(IloXmlWriter writer, const IloIntSet Array) |
protected IloXmlElement * | setNumArray(IloXmlWriter writer, const IloNumArray Array) |
protected IloXmlElement * | setNumSet(IloXmlWriter writer, const IloNumSet Array) |
protected void | setVersion(const char * version) |
public void | setXml(IloXmlWriter writer, IloXmlElement * element, const IloRtti * exprI) |
public virtual int | write(IloXmlWriter writer, const IloExtractableArray * extractable, IloXmlElement * masterElement) |
public virtual IloBool | write(IloXmlWriter writer, const IloRtti * exprI, IloXmlElement * masterElement) |
public IloBool | writeExtractable(IloXmlWriter writer, IloXmlElement * element, const IloExtractable extractable, const char * attribute=0) |
public virtual IloBool | writeRef(IloXmlWriter writer, const IloRtti * exprI, IloXmlElement * masterElement) |
public IloBool | writeRtti(IloXmlWriter writer, IloXmlElement * element, const IloRtti * rtti, const char * attribute=0) |
public virtual void | writeSolution(IloXmlWriter writer, const IloSolution solution, const IloExtractable extractable) |
public void | writeSolutionValue(IloXmlWriter writer, const IloSolution solution, IloXmlElement * element, const IloRtti * rtti, const char * attribute) |
protected IloBool | writeVarArray(IloXmlWriter writer, IloXmlElement * element, IloSOS2Array array) |
protected IloBool | writeVarArray(IloXmlWriter writer, IloXmlElement * element, IloSOS1Array array) |
protected IloBool | writeVarArray(IloXmlWriter writer, IloXmlElement * element, IloSemiContVarArray array) |
protected IloBool | writeVarArray(IloXmlWriter writer, IloXmlElement * element, IloConstraintArray array) |
protected IloBool | writeVarArray(IloXmlWriter writer, IloXmlElement * element, IloRangeArray array) |
protected IloBool | writeVarArray(IloXmlWriter writer, IloXmlElement * element, IloNumVarArray array) |
protected IloBool | writeVarArray(IloXmlWriter writer, IloXmlElement * element, IloIntSetVarArray array) |
protected IloBool | writeVarArray(IloXmlWriter writer, IloXmlElement * element, IloNumExprArray array) |
protected IloBool | writeVarArray(IloXmlWriter writer, IloXmlElement * element, IloIntExprArray array) |
protected IloBool | writeVarArray(IloXmlWriter writer, IloXmlElement * element, IloBoolVarArray array) |
protected IloBool | writeVarArray(IloXmlWriter writer, IloXmlElement * element, IloIntVarArray array) |
public virtual IloBool | writeXml(IloXmlWriter writer, const IloExtractableI * exprI, IloXmlElement * masterElement) |
public virtual IloBool | writeXmlRef(IloXmlWriter writer, const IloExtractableI * exprI, IloXmlElement * masterElement) |
| 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.
For backward compatibility with 2.0 and the XML for IloExtractable objects, if this method is not specialized, by default the getTagElement method with IloExtractableI will be called
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 IloRtti from the given
XML element.
This is the method to specialize for each serialization class
For backward compatibility with Concert 2.0 and the XML for IloExtractable objects, by default the method readXml with IloExtractableI will be called
This member function reads an array of IloRtti* from
the given XML element.
This is the method to specialize when writing a serialization class for an array of extractables.
This member function reads an IloRtti from the given
XML element. It asks the XML context to read the extractable in the XML
child element using a call to
IloXmlContext::readRtti; it then
calls IloXmlInfo::readXml.
For backward compatibility with Concert 2.0 and the XML for IloExtractable objects, by default the method readFromXml with IloExtractableI will be called
This member function reads an IloRtti from the given
XML element. It asks the XML context to read the extractable in the XML
child element using a call to
IloXmlContext::readRtti; it then
calls IloXmlInfo::readXml.
This member function asks the XML context to read the
IloRtti in the child element and then calls
IloXmlInfo::readFromXml to read the parent extractable.
IloSolution from
the XML element element.
This member function reads an IloRtti from the given
XML element.
This is the method to specialize for each serialization class
xrefitem deprecated 5This member function reads an array of IloRtti*
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::readRtti 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
IloRtti from IloSolution.
This member function creates an XML element with the common header for
IloRtti.
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 the given IloExtractableArray
in XML and adds it to the XML document of writer.
This is the method to specialize when writing a serialization class
This member function writes the IloRtti object
exprI in XML and adds it to the XML document of the
IloXmlWriter object writer.
For backward compatibility with Concert 2.0 and the XML for IloExtractable objects, by default the method writeXml with IloExtractableI will be called
See
IloXmlContext::writeRtti(IloXmlWriter,IloXmlElement*,const IloRtti*,const char*) instead.
There is no longer need for the extractable argument.
This member function writes the IloRtti object
exprI in XML as a reference.
For backward compatibility with Concert 2.0 and the XML for IloExtractable objects, by default the method writeXmlRef with IloExtractableI will be called
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:
writeRtti(writer, element,
(IloRtti*)exprI->getExpr1(),
IloXmlAttributeDef::Expr1Id);
writeRtti(writer, element,
(IloRtti*)exprI->getExpr2(),
IloXmlAttributeDef::Expr2Id);
See Also:
This member function writes the specified extractable
extractable from the IloSolutionsolution 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 IloRtti object
exprI in XML and adds it to the XML document of the
IloXmlWriter object writer.
This member function writes the IloRtti object
exprI in XML as a reference.