Xalan-C++ API Reference  1.12.0
Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
xalanc::XalanFileUtility Class Reference

#include <xalanc/Harness/XalanFileUtility.hpp>

Collaboration diagram for xalanc::XalanFileUtility:
[legend]

Classes

struct  cmdParams
 
struct  reportStruct
 

Public Types

typedef XalanVector< XalanDOMStringFileNameVectorType
 
typedef XalanVector< char > CharVectorType
 

Public Member Functions

 XalanFileUtility (MemoryManager &theManager)
 Simple constructor, does not perform initialization. More...
 
 ~XalanFileUtility ()
 
bool getVerbose () const
 
void setVerbose (bool flag)
 
int getFailureCount () const
 
XalanDOMStringgetDrive (XalanDOMString &theResult)
 Utility method used to get test files from a specific directory. More...
 
bool getParams (int argc, char *argv[], const char *outDir, bool fsetGold=true)
 
FileNameVectorTypegetTestFileNames (const XalanDOMString &baseDir, const XalanDOMString &relDir, bool useDirPrefix, FileNameVectorType &theFiles)
 
FileNameVectorTypegetDirectoryNames (const XalanDOMString &rootDirectory, FileNameVectorType &theFiles)
 Utility method used to get subdirectories from a specific directory. More...
 
void checkAndCreateDir (const XalanDOMString &directory)
 Utility method used to create default directories when neccessary. More...
 
bool checkDir (const XalanDOMString &directory)
 Utility method determines if directory exists. More...
 
XalanDOMStringgetXSLFileName (const XalanDOMString &theXMLFileName, XalanDOMString &theResult)
 Utility method used to get XSL file based on XML file. More...
 
XalanDOMStringgenerateFileName (const XalanDOMString &theXMLFileName, const char *suffix, XalanDOMString &theResult, bool *status=0)
 Utility method used to get OUT file based on XML file. More...
 
XalanDOMStringgenerateUniqRunid (XalanDOMString &theResult)
 Utility method used to generate UniqRunid. More...
 
XalanDOMStringgetXercesVersion (XalanDOMString &theResult)
 Utility methods used to get Xerces Version number. More...
 
void checkResults (const XalanDOMString &outputFile, const XalanDOMString &goldFile, XalanXMLFileReporter &logfile)
 
void checkAPIResults (const XalanDOMString &actual, const XalanDOMString &expected, const char *msg, XalanXMLFileReporter &logfile, const XalanDOMString &outputFile, const XalanDOMString &goldFile, bool containsOnly=false)
 
void checkAPIResults (const char *actual, const char *expected, const char *msg, XalanXMLFileReporter &logfile, const XalanDOMString &outputFile, const XalanDOMString &goldFile, MemoryManager &, bool containsOnly=false)
 
void checkAPIResults (const char *actual, const char *expected, const char *msg, XalanXMLFileReporter &logfile, const XalanDOMString &outputFile, const XalanDOMString &goldFile, bool containsOnly=false)
 
void checkDOMResults (const XalanDOMString &theOutputFile, const XalanCompiledStylesheet *compiledSS, const XalanSourceTreeDocument *dom, const XSLTInputSource &goldInputSource, XalanXMLFileReporter &logfile)
 Utility method used to compare the results. More...
 
bool compareSerializedResults (const XalanDOMString &transformResult, const XalanDOMString &goldInputSource)
 
FormatterListenergetXMLFormatter (PrintWriter &resultWriter, int indentAmount, const XalanDOMString &mimeEncoding, const StylesheetRoot *stylesheet)
 Utility method used to create a FormatterToXML FormatterListener. More...
 
bool fileCompare (const char *goldFile, const char *outputFile)
 
bool domCompare (const XalanNode &gold, const XalanNode &doc)
 Utility methods used to perform a DOM Compare. More...
 
bool domCompare (const XalanDocument &gold, const XalanDocument &doc)
 Utility methods used to perform a DOM Compare. More...
 
bool diffElement (const XalanNode &gold, const XalanNode &doc)
 Utility methods used to diff two Element nodes. More...
 
bool diffNode (const XalanNode &gold, const XalanNode &doc)
 Utility methods used to diff two nodes. More...
 
bool diffNode (const XalanNode *gold, const XalanNode *doc)
 Utility methods used to diff two nodes. More...
 
bool diffElement2 (const XalanNode &gold, const XalanNode &doc)
 Utility methods used to diff two Element nodes. More...
 
bool diffAttr (const XalanNode *gAttr, const XalanNode *dAttr)
 Utility methods used to diff two attribute nodes. More...
 
void reportPassFail (XalanXMLFileReporter &logfile)
 Utility methods used to report Pass/Fail numbers. More...
 
void reportPassFail (XalanXMLFileReporter &logfile, const XalanDOMString &runid)
 
void analyzeResults (XalanTransformer &xalan, const XalanDOMString &resultsFile)
 
const MemoryManager & getMemoryManager () const
 
MemoryManager & getMemoryManager ()
 

Public Attributes

struct XALAN_HARNESS_EXPORT xalanc::XalanFileUtility::reportStruct data
 
struct XALAN_HARNESS_EXPORT xalanc::XalanFileUtility::cmdParams args
 

Static Public Attributes

static const XalanDOMChar s_xmlSuffix []
 
static const XalanDOMChar s_pathSep []
 

Detailed Description

Definition at line 58 of file XalanFileUtility.hpp.

Member Typedef Documentation

◆ CharVectorType

Definition at line 65 of file XalanFileUtility.hpp.

◆ FileNameVectorType

Definition at line 64 of file XalanFileUtility.hpp.

Constructor & Destructor Documentation

◆ XalanFileUtility()

xalanc::XalanFileUtility::XalanFileUtility ( MemoryManager &  theManager)

Simple constructor, does not perform initialization.


◆ ~XalanFileUtility()

xalanc::XalanFileUtility::~XalanFileUtility ( )

Member Function Documentation

◆ analyzeResults()

void xalanc::XalanFileUtility::analyzeResults ( XalanTransformer xalan,
const XalanDOMString resultsFile 
)

◆ checkAndCreateDir()

void xalanc::XalanFileUtility::checkAndCreateDir ( const XalanDOMString directory)

Utility method used to create default directories when neccessary.

◆ checkAPIResults() [1/3]

void xalanc::XalanFileUtility::checkAPIResults ( const char *  actual,
const char *  expected,
const char *  msg,
XalanXMLFileReporter logfile,
const XalanDOMString outputFile,
const XalanDOMString goldFile,
bool  containsOnly = false 
)
inline

Definition at line 272 of file XalanFileUtility.hpp.

◆ checkAPIResults() [2/3]

void xalanc::XalanFileUtility::checkAPIResults ( const char *  actual,
const char *  expected,
const char *  msg,
XalanXMLFileReporter logfile,
const XalanDOMString outputFile,
const XalanDOMString goldFile,
MemoryManager &  ,
bool  containsOnly = false 
)
inline

Definition at line 251 of file XalanFileUtility.hpp.

◆ checkAPIResults() [3/3]

void xalanc::XalanFileUtility::checkAPIResults ( const XalanDOMString actual,
const XalanDOMString expected,
const char *  msg,
XalanXMLFileReporter logfile,
const XalanDOMString outputFile,
const XalanDOMString goldFile,
bool  containsOnly = false 
)

◆ checkDir()

bool xalanc::XalanFileUtility::checkDir ( const XalanDOMString directory)

Utility method determines if directory exists.

◆ checkDOMResults()

void xalanc::XalanFileUtility::checkDOMResults ( const XalanDOMString theOutputFile,
const XalanCompiledStylesheet compiledSS,
const XalanSourceTreeDocument dom,
const XSLTInputSource goldInputSource,
XalanXMLFileReporter logfile 
)

Utility method used to compare the results.

It inturn call domCompare.

Returns
Void.

◆ checkResults()

void xalanc::XalanFileUtility::checkResults ( const XalanDOMString outputFile,
const XalanDOMString goldFile,
XalanXMLFileReporter logfile 
)

◆ compareSerializedResults()

bool xalanc::XalanFileUtility::compareSerializedResults ( const XalanDOMString transformResult,
const XalanDOMString goldInputSource 
)

◆ diffAttr()

bool xalanc::XalanFileUtility::diffAttr ( const XalanNode gAttr,
const XalanNode dAttr 
)

Utility methods used to diff two attribute nodes.

Returns
boolean.

◆ diffElement()

bool xalanc::XalanFileUtility::diffElement ( const XalanNode gold,
const XalanNode doc 
)

Utility methods used to diff two Element nodes.

Returns
boolean.

◆ diffElement2()

bool xalanc::XalanFileUtility::diffElement2 ( const XalanNode gold,
const XalanNode doc 
)

Utility methods used to diff two Element nodes.

Returns
boolean.

◆ diffNode() [1/2]

bool xalanc::XalanFileUtility::diffNode ( const XalanNode gold,
const XalanNode doc 
)

Utility methods used to diff two nodes.

Returns
true if the nodes are equal, and false if not.

◆ diffNode() [2/2]

bool xalanc::XalanFileUtility::diffNode ( const XalanNode gold,
const XalanNode doc 
)

Utility methods used to diff two nodes.

Returns
true if the nodes are equal, and false if not.

◆ domCompare() [1/2]

bool xalanc::XalanFileUtility::domCompare ( const XalanDocument gold,
const XalanDocument doc 
)

Utility methods used to perform a DOM Compare.

Returns
boolean

◆ domCompare() [2/2]

bool xalanc::XalanFileUtility::domCompare ( const XalanNode gold,
const XalanNode doc 
)

Utility methods used to perform a DOM Compare.

Returns
boolean

◆ fileCompare()

bool xalanc::XalanFileUtility::fileCompare ( const char *  goldFile,
const char *  outputFile 
)

◆ generateFileName()

XalanDOMString& xalanc::XalanFileUtility::generateFileName ( const XalanDOMString theXMLFileName,
const char *  suffix,
XalanDOMString theResult,
bool *  status = 0 
)

Utility method used to get OUT file based on XML file.

Returns
a XalanDOMString.

◆ generateUniqRunid()

XalanDOMString& xalanc::XalanFileUtility::generateUniqRunid ( XalanDOMString theResult)

Utility method used to generate UniqRunid.

Returns
a XalanDOMString.

◆ getDirectoryNames()

FileNameVectorType& xalanc::XalanFileUtility::getDirectoryNames ( const XalanDOMString rootDirectory,
FileNameVectorType theFiles 
)

Utility method used to get subdirectories from a specific directory.

Returns
a vector containing directory files.

◆ getDrive()

XalanDOMString& xalanc::XalanFileUtility::getDrive ( XalanDOMString theResult)

Utility method used to get test files from a specific directory.

Returns
a vector containing test files.

◆ getFailureCount()

int xalanc::XalanFileUtility::getFailureCount ( ) const
inline

Definition at line 151 of file XalanFileUtility.hpp.

◆ getMemoryManager() [1/2]

MemoryManager& xalanc::XalanFileUtility::getMemoryManager ( )
inline

Definition at line 408 of file XalanFileUtility.hpp.

◆ getMemoryManager() [2/2]

const MemoryManager& xalanc::XalanFileUtility::getMemoryManager ( ) const
inline

Definition at line 402 of file XalanFileUtility.hpp.

◆ getParams()

bool xalanc::XalanFileUtility::getParams ( int  argc,
char *  argv[],
const char *  outDir,
bool  fsetGold = true 
)

◆ getTestFileNames()

FileNameVectorType& xalanc::XalanFileUtility::getTestFileNames ( const XalanDOMString baseDir,
const XalanDOMString relDir,
bool  useDirPrefix,
FileNameVectorType theFiles 
)

◆ getVerbose()

bool xalanc::XalanFileUtility::getVerbose ( ) const
inline

Definition at line 139 of file XalanFileUtility.hpp.

◆ getXercesVersion()

XalanDOMString& xalanc::XalanFileUtility::getXercesVersion ( XalanDOMString theResult)

Utility methods used to get Xerces Version number.

Returns
a XalanDOMString.

◆ getXMLFormatter()

FormatterListener* xalanc::XalanFileUtility::getXMLFormatter ( PrintWriter resultWriter,
int  indentAmount,
const XalanDOMString mimeEncoding,
const StylesheetRoot stylesheet 
)

Utility method used to create a FormatterToXML FormatterListener.

This is required to DOM comparisions.

Returns
a pointer to a FormatterListener.

◆ getXSLFileName()

XalanDOMString& xalanc::XalanFileUtility::getXSLFileName ( const XalanDOMString theXMLFileName,
XalanDOMString theResult 
)

Utility method used to get XSL file based on XML file.

Returns
a XalanDOMString.

◆ reportPassFail() [1/2]

void xalanc::XalanFileUtility::reportPassFail ( XalanXMLFileReporter logfile)

Utility methods used to report Pass/Fail numbers.

Returns
void.

◆ reportPassFail() [2/2]

void xalanc::XalanFileUtility::reportPassFail ( XalanXMLFileReporter logfile,
const XalanDOMString runid 
)

◆ setVerbose()

void xalanc::XalanFileUtility::setVerbose ( bool  flag)
inline

Definition at line 145 of file XalanFileUtility.hpp.

Member Data Documentation

◆ args

struct XALAN_HARNESS_EXPORT xalanc::XalanFileUtility::cmdParams xalanc::XalanFileUtility::args

◆ data

struct XALAN_HARNESS_EXPORT xalanc::XalanFileUtility::reportStruct xalanc::XalanFileUtility::data

◆ s_pathSep

const XalanDOMChar xalanc::XalanFileUtility::s_pathSep[]
static

Definition at line 399 of file XalanFileUtility.hpp.

◆ s_xmlSuffix

const XalanDOMChar xalanc::XalanFileUtility::s_xmlSuffix[]
static

Definition at line 397 of file XalanFileUtility.hpp.


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