VICI  0.11.815
Visual Chart Interpreter
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
VICI::gth::ScriptXML Class Reference

Provides an interface to the script XML file. More...

#include <vici/libgth.h>

Inheritance diagram for VICI::gth::ScriptXML:
VICI::cfi::Xml

Public Member Functions

 ScriptXML (const VICI::Path &, bool create)
 Constructor.
 
 ~ScriptXML ()
 Destructor.
 
void getWindows (ParamList &)
 Get a list of windows from the XML script.
 
void getTestsForWindow (csr wnm, ListOfLists &)
 Get a list of test cases for a window.
 
void getTestActions (csr tnm, ConDes, std::vector< TestAction > &)
 Get the test actions for a test case constructor or destructor.
 
void getScripts (std::map< std::string, std::string > &)
 Get the script for a window.
 
void addExecFilePath (csr fileName)
 Insert the executable's path into the script.
 
void addTest (csr testName, bool unreferenced)
 Add the name of test cases that are [not] referenced in the script.
 
void addWindow (csr windowName, bool unreferenced)
 Add the name of windows that are [not] referenced in the script.
 
void addWidget (csr widgetName, csr widgetType)
 Update the list of widgets and their types.
 
void addWidgetType (csr widgetType, const ListOfLists &)
 Update description of commands for a widget type.
 
- Public Member Functions inherited from VICI::cfi::Xml
virtual ~Xml ()
 Destructor.
 
void setDtd (csr name, const Path &dtd)
 Set DTD identifier to dtd, which is just the dtd file name. More...
 
void setDtd (csr name, csr ident, csr url)
 Set DTD identifier. More...
 
void getDtdIdentifiers (csr dtdName, std::string &publicId, std::string &systemId)
 Get the public identifier for the DTD. More...
 
void setCompression (int rate)
 Set the compression rate for saving the document. More...
 
void save ()
 Save the document.
 
void save (const Path &fname)
 Save the document to a new file. More...
 
void pack (XmlBuffer &)
 Save the document into a buffer.
 
bool dirty ()
 Check if the document has been modified. More...
 
void setDirty (bool dt)
 Access to dirty flag if we change document outside of this interface. More...
 
bool safeToSave ()
 Check if can save without clobbering other input. More...
 
void reload ()
 Reload the XML file.
 

Additional Inherited Members

- Protected Member Functions inherited from VICI::cfi::Xml
void createXPathContext ()
 Call this whenever mDoc is explicitly updated.
 
void registerNamespace (const std::string &prefix, csr uri)
 
 Xml ()
 Constructor.
 
void open (const Path &fname)
 Open an existing XML file. More...
 
void create (const Path &fname, csr root_element)
 Create a new xml file and document. More...
 
void unpack (XmlBuffer &)
 Create a document from the content of a buffer.
 
void freeDoc ()
 release the document from memory
 
void setProp (xmlNodePtr node, csr prop, csr val)
 Set a string property. More...
 
void setProp (xmlNodePtr node, csr prop, int val)
 Set an integer property. More...
 
void setProp (xmlNodePtr node, csr prop, double val)
 Set a double property. More...
 
void setContent (xmlNodePtr node, csr text)
 Set the content for the node. More...
 
void setCDATAContent (xmlNodePtr node, csr text)
 Set the content for the node using CDATA. More...
 
void getPropString (xmlNodePtr node, csr prop, std::string &val)
 Get the property value as a string. More...
 
void getPropInt (xmlNodePtr node, csr prop, int &val)
 Get the property value as an integer. More...
 
void getPropShort (xmlNodePtr node, csr prop, short &val)
 Get the property value as a short integer. More...
 
void getPropDouble (xmlNodePtr node, csr prop, double &val)
 Get the property value as a double. More...
 
std::string getNodeContent (xmlNodePtr p, int expand=1) const
 Get the content of the node. More...
 
std::string getNodeName (xmlNodePtr p) const
 Get the name of the node. More...
 
xmlNodePtr getRoot ()
 Get the root node.
 
xmlNodePtr getChild (xmlNodePtr node, csr name) const
 Get a child node by name. More...
 
int getChildren (xmlNodePtr node, std::vector< xmlNodePtr > &nodes) const
 Get the children of the node. More...
 
xmlNodePtr newNode (xmlNodePtr node, csr name)
 Create a new node. More...
 
void deleteNode (xmlNodePtr node)
 Delete a node and all of its children. More...
 
int find (csr xpath_expression, std::vector< xmlNodePtr > &nodes)
 Find nodes matching an XPath. More...
 
- Static Protected Member Functions inherited from VICI::cfi::Xml
static xmlNodePtr newTextChild (xmlNodePtr node, csr name, csr text)
 Create a new node with text content. More...
 
- Protected Attributes inherited from VICI::cfi::Xml
Path mFilename
 the XML file that the object represents
 
struct stat xmlStat
 time the file was last accessed by us
 
xmlDocPtr mDoc
 pointer to the root document object
 
xmlXPathContextPtr mCtx
 XML XPath context.
 
bool mDirty
 true when an update has been made, and saving is required.
 
bool mIsOpen
 true if the file is open
 
int mCompression
 0 is uncompressed, thru 9 for max zlib compression
 
- Static Protected Attributes inherited from VICI::cfi::Xml
static const int UMASK_RW_RW_R = 0664 ^ 0777
 Default umask for xml files created.
 
static bool xpathinit = false
 flag to indicate if xpath has been initialized
 

Detailed Description

Provides an interface to the script XML file.


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