NO FRAMES

Class IloXmlWriter

Definition file: ilconcert/ilowriter.h

You can use an instance of IloXmlWriter to serialize an IloModel or an IloSolution in XML.

Constructor Summary
public IloXmlWriter(IloEnv env, const char * rootTag, const char * fileName=0)
public IloXmlWriter(IloXmlWriterI * impl)
Method Summary
public voidaddAttribute(IloXmlElement * element, const char * attribute, const char * value)
public voidaddCData(IloXmlElement * element, const char * CData)
public voidaddComment(IloXmlElement * element, const char * comment)
public voidaddElement(IloXmlElement * element)
public voidaddSubElement(IloXmlElement * element, IloXmlElement * subElement)
public voidaddText(IloXmlElement * element, const char * text)
public IloXmlElement *createElement(const char * element)
public voiddeleteAllocatedMemory(const char * pointer)
public voiddeleteAllocatedMemory(char * pointer)
public IloEnvgetEnv()
public IloEnvI *getEnvImpl()
public const char *getfileName()
public IloXmlElement *getRoot()
public IloIntArray *getSerialized()
public IloIntArray *getSolutionSerialized()
public const char *Int2String(const IloInt number)
public const char *IntArray2String(const IloIntArray intArray)
public const char *IntSet2String(const IloIntSet intSet)
public IloBoolisSerialized(IloInt id)
public IloBoolisSolutionSerialized(IloInt id)
public const char *Num2String(const IloNum number)
public const char *NumArray2String(const IloNumArray numArray)
public const char *NumSet2String(const IloNumSet numSet)
public voidsetfileName(const char * fileName)
public IloIntstring2Int(const char * str)
public IloBoolwriteDocument()
Constructor Detail

IloXmlWriter

public IloXmlWriter(IloEnv env, const char * rootTag, const char * fileName=0)

This constructor creates an IloXmlWriter object and makes it part of the environment env.

The fileName is set to 0 by default.


IloXmlWriter

public IloXmlWriter(IloXmlWriterI * impl)

This constructor creates a XML writer object from its implementation object.


Method Detail

Int2String

public const char * Int2String(const IloInt number)

This member function converts the IloInt object number into a string, const char*.


IntArray2String

public const char * IntArray2String(const IloIntArray intArray)

This member function converts the IloIntArray object intArray into a string, const char*.


IntSet2String

public const char * IntSet2String(const IloIntSet intSet)

This member function converts the IloIntSet object intSet into a string, const char*.


Num2String

public const char * Num2String(const IloNum number)

This member function converts the IloNum object number into a string, const char*.


NumArray2String

public const char * NumArray2String(const IloNumArray numArray)

This member function converts the IloNumArray object numArray into a string, const char*.


NumSet2String

public const char * NumSet2String(const IloNumSet numSet)

This member function converts the IloNumSet object numSet into a string, const char*.


addAttribute

public void addAttribute(IloXmlElement * element, const char * attribute, const char * value)

This member function adds an attribute of the specified value to the XML element.


addCData

public void addCData(IloXmlElement * element, const char * CData)

This member function adds a CDATA section to the XML element element.


addComment

public void addComment(IloXmlElement * element, const char * comment)

This member function adds comment to the XML element element.


addElement

public void addElement(IloXmlElement * element)

This member function adds the XML element element to the end of the XML.


addSubElement

public void addSubElement(IloXmlElement * element, IloXmlElement * subElement)

This member function adds a child element, subElement, to the XML element element.


addText

public void addText(IloXmlElement * element, const char * text)

This member function adds text to the specified element.


createElement

public IloXmlElement * createElement(const char * element)

This member function creates an empty element with the given tag, element.


deleteAllocatedMemory

public void deleteAllocatedMemory(const char * pointer)

This member function frees the memory that has been allocated by the XML reader using, for example, the IloXmlWriter::Int2String member function.


deleteAllocatedMemory

public void deleteAllocatedMemory(char * pointer)

This member function frees the memory that has been allocated by the XML reader using, for example, the IloXmlWriter::Int2String member function.


getEnv

public IloEnv getEnv()

This member function gets the IloEnv of the object.


getEnvImpl

public IloEnvI * getEnvImpl()

This member function gets the implementation of the IloEnv of the object.


getRoot

public IloXmlElement * getRoot()

This member function gets the root XML element of the XML document.


getSerialized

public IloIntArray * getSerialized()

This member function gets the IDs of the serialized objects of an IloModel.


getSolutionSerialized

public IloIntArray * getSolutionSerialized()

This member function gets the IDs of the serialized objects of an IloSolution.


getfileName

public const char * getfileName()

This member function returns the name of the XML file


isSerialized

public IloBool isSerialized(IloInt id)

This member function checks whether an object has been serialized.


isSolutionSerialized

public IloBool isSolutionSerialized(IloInt id)

This member function checks whether a solution object has already been serialized.


setfileName

public void setfileName(const char * fileName)

This member function specifies fileName as the name of the XML file.


string2Int

public IloInt string2Int(const char * str)

This member function converts str into an IloInt.


writeDocument

public IloBool writeDocument()

This member function outputs the XML to the file specified in the constructor or using the setFileName method. If null, this member function outputs on the cout io.