VerifySet

class VerifySet

Public Functions

VerifySet(QString projectXMLPath, QString projectXML_formatPath)

Takes absolute path of project XML file.

Parameters:
  • projectXMLPath

  • projectXML_formatPath

int testProjectXML()

Compares the user’s project XML file and the current format of that file.

Note

Uses pugi xml parsing library

Returns:

Returns 0 if not error found else -1 is returned

bool LoadProjectXMLFormat()

Loads the format of XML in docFormat var.

Returns:

Returns true if no error found else false is returned

int getErrorCode()

Returns the error code.

Returns:

int error_code

QString getErrorString()

Returns the error string.

Returns:

error_string

Private Functions

bool verifyNode(pugi::xml_node nodeTest, pugi::xml_node nodeFormat)

Compares the user’s XML node(tag) against the format of node in the current format of project XML.

Traversing tree in the preOrder fashion

Note

XML in pugi library is stored as a tree ( https://pugixml.org/docs/manual.html#dom )

Parameters:
  • nodeTest

  • nodeFormat

Returns:

Returns true if verification completes else returns false

bool verifyNodeAttributes(pugi::xml_node nodeTest, pugi::xml_node nodeFormat)

Compares one node attribute name with the another.

Parameters:
  • nodeTest

  • nodeFormat

Returns:

Returns true if verification completes else returns false