__________________________________________________[C++IMPLEMENTATION] Name: TMrbTidy Purpose: MARaBOU utilities: tidy interface Description: Implements class methods to interface the tidy library Keywords: Author: R. Lutter Mailto: <a href=mailto:rudi.lutter@physik.uni-muenchen.de>R. Lutter</a> Revision: $Id: TMrbTidy.cxx,v 1.34 2007/08/03 10:11:05 Rudolf.Lutter Exp $ Date:/* Example of a HTML document (file "tidy.html")
<!DOCTYPE HTML PUBLIC "-// IETF/DTD HTML 2.0// EN"> <html> <!-- Author: Marabou team (marabou@physik.uni-muenchen.de) --> <head><title>TMrbTidyDoc.html</title></head> <body bgcolor="#ebfcb0"> <h1>TMrbTidyDoc: A MARaBOU class interfacing Dave Raggett's TidyLib</h1> </body> </html>
ROOT script to invoke TIDY:
{
gSystem->Load("$MARABOU/lib/libTMrbUtils.so");
gSystem->Load("$MARABOU/lib/libTMrbTidy.so");
gSystem->Load("$MARABOU/lib/libTidy.so");
TMrbTidyDoc * tdoc = new TMrbTidyDoc("demo", "tidy.html");
tdoc->Print();
}
Output from method TMrbTidyDoc::Print():
Document demo (file tidy.html): structure as analyzed by D. Raggett's TIDY ---------------------------------------------------------------------------------------------- [ 0] node root: type=Root(0) parent=root [ 1] . node HTML: type=DOCTYPE(1) parent=root text='<!DOCTYPE HTML><cr><cr>' PUBLIC= [ 1] . node html: type=StartTag(5) tagid=HTML(48) parent=root [ 2] .. node comment: type=Comment(2) parent=html text='<!-- Author: Marabou team (marabou@physik.uni-muenchen.de) --><cr><cr>' [ 2] .. node head: type=StartTag(5) tagid=HEAD(46) parent=html [ 3] ... node title: type=StartTag(5) tagid=TITLE(111) parent=head [ 4] .... node text: type=Text(4) parent=title text='TMrbTidyDoc.html<cr>' [ 2] .. node body: type=StartTag(5) tagid=BODY(16) parent=html bgcolor=#EBFCB0 [ 3] ... node h1: type=StartTag(5) tagid=H1(40) parent=body [ 4] .... node text: type=Text(4) parent=h1 text='TMrbTidyDoc: A MARaBOU class interfacing Dave Raggett's TidyLib<cr>'
*/
| TMrbTidyDoc() | |
| TMrbTidyDoc(const Char_t* DocName) | |
| TMrbTidyDoc(const Char_t* DocName, const Char_t* DocFile, Bool_t Repair = kFALSE, const Char_t* CfgFile = NULL) | |
| TMrbTidyDoc(const Char_t* DocName, istream& Stream, Bool_t Repair = kFALSE, const Char_t* CfgFile = NULL) | |
| TMrbTidyDoc(const Char_t* DocName, TString& Buffer, Bool_t Repair = kFALSE, const Char_t* CfgFile = NULL) | |
| virtual | ~TMrbTidyDoc() |
| void | TObject::AbstractMethod(const char* method) const |
| Bool_t | AddToList() |
| virtual void | TObject::AppendPad(Option_t* option = "") |
| virtual void | TObject::Browse(TBrowser* b) |
| static TClass* | Class() |
| virtual const char* | TObject::ClassName() const |
| Bool_t | CleanAndRepair() |
| virtual void | TNamed::Clear(Option_t* option = "") |
| virtual TObject* | TNamed::Clone(const char* newname = "") const |
| virtual Int_t | TNamed::Compare(const TObject* obj) const |
| virtual void | TNamed::Copy(TObject& named) const |
| virtual void | TObject::Delete(Option_t* option = "")MENU |
| virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
| virtual void | TObject::Draw(Option_t* option = "") |
| virtual void | TObject::DrawClass() constMENU |
| virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
| virtual void | TObject::Dump() constMENU |
| virtual void | TObject::Error(const char* method, const char* msgfmt) const |
| virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
| virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
| virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
| virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
| virtual void | TNamed::FillBuffer(char*& buffer) |
| virtual TObject* | TObject::FindObject(const char* name) const |
| virtual TObject* | TObject::FindObject(const TObject* obj) const |
| Int_t | GetAccessWarningCount() const |
| TMrbTidyNode* | GetBody() |
| const Char_t* | GetCfgFile() const |
| Int_t | GetConfigErrorCount() const |
| const Char_t* | GetDocFile() const |
| const Char_t* | GetDocName(Bool_t LongFlag = kFALSE) |
| virtual Option_t* | TObject::GetDrawOption() const |
| static Long_t | TObject::GetDtorOnly() |
| const Char_t* | GetErrorBuffer() |
| Int_t | GetErrorCount() const |
| TidyDoc | GetHandle() const |
| TMrbTidyNode* | GetHead() |
| TMrbTidyNode* | GetHtml() |
| Int_t | GetHtmlVersion() const |
| virtual const char* | TObject::GetIconName() const |
| TMrbLofNamedX* | GetLofMnodes() |
| TMrbLofNamedX* | GetLofOptions() |
| TMrbTidyNode* | GetMbody() |
| virtual const char* | TNamed::GetName() const |
| virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
| static Bool_t | TObject::GetObjectStat() |
| virtual Option_t* | TObject::GetOption() const |
| TMrbTidyNode* | GetRoot() |
| Int_t | GetStatus() const |
| virtual const char* | TNamed::GetTitle() const |
| virtual UInt_t | TObject::GetUniqueID() const |
| Int_t | GetWarningCount() const |
| virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
| virtual ULong_t | TNamed::Hash() const |
| Bool_t | HasMnodes() |
| Bool_t | HasNodes() |
| virtual void | TObject::Info(const char* method, const char* msgfmt) const |
| virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
| virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
| virtual void | TObject::Inspect() constMENU |
| void | TObject::InvertBit(UInt_t f) |
| virtual TClass* | IsA() const |
| virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
| virtual Bool_t | TObject::IsFolder() const |
| Bool_t | TObject::IsOnHeap() const |
| Bool_t | IsRepaired() |
| virtual Bool_t | TNamed::IsSortable() const |
| Bool_t | IsXhtml() const |
| Bool_t | IsXml() const |
| Bool_t | TObject::IsZombie() const |
| Bool_t | LoadConfig(const Char_t* CfgFile) |
| virtual void | TNamed::ls(Option_t* option = "") const |
| void | TObject::MayNotUse(const char* method) const |
| virtual Bool_t | TObject::Notify() |
| void | TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const |
| static void | TObject::operator delete(void* ptr) |
| static void | TObject::operator delete(void* ptr, void* vp) |
| static void | TObject::operator delete[](void* ptr) |
| static void | TObject::operator delete[](void* ptr, void* vp) |
| void* | TObject::operator new(size_t sz) |
| void* | TObject::operator new(size_t sz, void* vp) |
| void* | TObject::operator new[](size_t sz) |
| void* | TObject::operator new[](size_t sz, void* vp) |
| TNamed& | TNamed::operator=(const TNamed& rhs) |
| Bool_t | OutputHtml(const Char_t* HtmlFile) |
| Bool_t | OutputHtml(ostream& Out = cout) |
| virtual void | TObject::Paint(Option_t* option = "") |
| Bool_t | ParseBuffer(const Char_t* Buffer, Bool_t Repair = kFALSE) |
| Bool_t | ParseBuffer(TString& Buffer, Bool_t Repair = kFALSE) |
| Bool_t | ParseFile(const Char_t* DocFile, Bool_t Repair = kFALSE) |
| virtual void | TObject::Pop() |
| virtual void | Print(Option_t* Option) const |
| void | Print(const Char_t* File, Bool_t Verbose = kFALSE, Bool_t HtmlFlag = kFALSE) |
| void | Print(ostream& Out = cout, Bool_t Verbose = kFALSE, Bool_t HtmlFlag = kFALSE) |
| void | PrintDiagnostics(ostream& Out = cout) |
| void | PrintOptions(ostream& Out = cout, Bool_t Verbose = kFALSE) |
| virtual Int_t | TObject::Read(const char* name) |
| virtual void | TObject::RecursiveRemove(TObject* obj) |
| void | Reset(Bool_t Release = kFALSE) |
| void | TObject::ResetBit(UInt_t f) |
| Bool_t | ResetOptions() |
| Bool_t | RunDiagnostics() |
| virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
| virtual void | TObject::SavePrimitive(ostream& out, Option_t* option = "") |
| void | TObject::SetBit(UInt_t f) |
| void | TObject::SetBit(UInt_t f, Bool_t set) |
| virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
| static void | TObject::SetDtorOnly(void* obj) |
| void | SetMnodeFlag(Bool_t Flag = kTRUE) |
| virtual void | TNamed::SetName(const char* name)MENU |
| virtual void | TNamed::SetNameTitle(const char* name, const char* title) |
| static void | TObject::SetObjectStat(Bool_t stat) |
| Bool_t | SetOption(TidyOptionId OptionId, Bool_t Flag) |
| Bool_t | SetOption(TidyOptionId OptionId, Int_t Value) |
| Bool_t | SetOption(TidyOptionId OptionId, const Char_t* String) |
| virtual void | TNamed::SetTitle(const char* title = "")MENU |
| virtual void | TObject::SetUniqueID(UInt_t uid) |
| virtual void | ShowMembers(TMemberInspector& insp) |
| virtual Int_t | TNamed::Sizeof() const |
| virtual void | Streamer(TBuffer& b) |
| void | StreamerNVirtual(TBuffer& b) |
| void | StripText(Bool_t Flag = kTRUE) |
| virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
| Bool_t | TObject::TestBit(UInt_t f) const |
| Int_t | TObject::TestBits(UInt_t f) const |
| Bool_t | TextToBeStripped() |
| virtual void | TObject::UseCurrentStyle() |
| virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
| virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
| virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
| virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
| void | InitErrorBuffer() |
| Bool_t | IsFirstChild() |
| Bool_t | IsLastChild() |
| void | TObject::MakeZombie() |
| Int_t | ReadOptions() |
| enum TObject::EStatusBits { | kCanDelete | |
| kMustCleanup | ||
| kObjInCanvas | ||
| kIsReferenced | ||
| kHasUUID | ||
| kCannotPick | ||
| kNoContextMenu | ||
| kInvalidObject | ||
| }; | ||
| enum TObject::[unnamed] { | kIsOnHeap | |
| kNotDeleted | ||
| kZombie | ||
| kBitMask | ||
| kSingleKey | ||
| kOverwrite | ||
| kWriteDelete | ||
| }; |
| TString | fCfgFile | name of configuration file |
| TString | fDocFile | name of document file |
| _TidyBuffer | fErrorBuffer | internal error buffer |
| TidyDoc | fHandle | tidy doc handle |
| Bool_t | fHasMnodes | kTRUE if special marabou nodes exist |
| TMrbLofNamedX | fLofMnodes | list of special marabou nodes |
| TMrbLofNamedX | fLofOptions | list of options |
| TString | TNamed::fName | object identifier |
| Bool_t | fRepair | kTRUE if 'clean and repair' is to be called |
| Bool_t | fStripText | kTRUE if <cr>s surrounding text have to be stripped |
| TMrbTidyNode* | fTidyBody | ptr to <body>...</body> |
| TMrbTidyNode* | fTidyHead | prt to <head>...</head> |
| TMrbTidyNode* | fTidyHtml | ptr to <html>...</html> |
| TMrbTidyNode* | fTidyMbody | ptr to <mb>...</mb> |
| TMrbTidyNode* | fTidyRoot | ptr to whole document |
| TString | TNamed::fTitle | object title |

__________________________________________________________________[C++ CTOR] Name: TMrbTidyDoc Purpose: Create a tidy document Arguments: -- Description: Ctor to instantiate a tidy document Keywords:
__________________________________________________________________[C++ CTOR] Name: TMrbTidyDoc Purpose: Create a tidy document Arguments: Char_t * DocName -- name of document Description: Ctor to instantiate a tidy document Keywords:
__________________________________________________________________[C++ CTOR] Name: TMrbTidyDoc Purpose: Create a tidy document Arguments: Char_t * DocName -- name of document Char_t * DocFile -- file containing document Bool_t Repair -- clean and repair Char_t * CfgFile -- Tidy's config file Description: Ctor to instantiate a tidy document Keywords:
__________________________________________________________________[C++ CTOR] Name: TMrbTidyDoc Purpose: Create a tidy document Arguments: Char_t * DocName -- name of document istream & Stream -- stream to read from Bool_t Repair -- clean and repair Char_t * CfgFile -- Tidy's config file Description: Ctor to instantiate a tidy document Keywords:
__________________________________________________________________[C++ CTOR] Name: TMrbTidyDoc Purpose: Create a tidy document Arguments: Char_t * DocName -- name of document TString & Buffer -- buffer containing html data Bool_t Repair -- clean and repair Char_t * CfgFile -- Tidy's config file Description: Ctor to instantiate a tidy document Keywords:
________________________________________________________________[C++ METHOD] Name: TMrbTidyDoc::Reset Purpose: Reset Arguments: Bool_t Release -- kTRUE -> release Results: -- Exceptions: Description: Resets to initial values Keywords:
________________________________________________________________[C++ METHOD] Name: TMrbTidyDoc::InitErrorBuffer Purpose: Initialize tidy's error buffer Arguments: -- Results: -- Exceptions: Description: Resets internal error buffer Keywords:
________________________________________________________________[C++ METHOD] Name: TMrbTidyDoc::LoadConfig Purpose: Load Tidy's config file Arguments: Char_t * CfgFile -- config file Results: kTRUE/kFALSE Exceptions: Description: Reads config data from file (via tidyLoadConfig()) Keywords:
________________________________________________________________[C++ METHOD] Name: TMrbTidyDoc::ReadOptions Purpose: Read tidy options Arguments: -- Results: Int_t NofOptions -- number of options read Exceptions: Description: Reads options via tidyGetOptionsList() Keywords:
________________________________________________________________[C++ METHOD] Name: TMrbTidyDoc::PrintOptions Purpose: Print tidy options Arguments: Bool_t Verbose -- verbose Results: -- Exceptions: Description: Prints tidy options. Keywords:
________________________________________________________________[C++ METHOD] Name: TMrbTidyDoc::ParseFile Purpose: Parse html data from file Arguments: Char_t * DocFile -- html document to be processed Bool_t Repair -- kTRUE if tidy's repair mechanism has to be called Results: kTRUE/kFALSE Exceptions: Description: Processes html data from file. Keywords:
________________________________________________________________[C++ METHOD] Name: TMrbTidyDoc::ParseBuffer Purpose: Parse html data from buffer Arguments: Char_t * Buffer -- buffer with html data Bool_t Repair -- kTRUE if tidy's repair mechanism has to be called Results: kTRUE/kFALSE Exceptions: Description: Processes html data. Keywords:
________________________________________________________________[C++ METHOD] Name: TMrbTidyDoc::CleanAndRepair Purpose: Start tidy's repair mechanism Arguments: -- Results: kTRUE/kFALSE Exceptions: Description: Repair inconsistencies via tidyCleanAndRepair(). Keywords:
________________________________________________________________[C++ METHOD] Name: TMrbTidyDoc::RunDiagnostics Purpose: Perform tidy's diagnostic step Arguments: -- Results: kTRUE/kFALSE Exceptions: Description: Runs diagnostics via tidyRunDiagnostics(). Keywords:
________________________________________________________________[C++ METHOD] Name: TMrbTidyDoc::AddToList Purpose: Add to list of documents Arguments: -- Results: kTRUE/kFALSE Exceptions: Description: Adds this tidy object to list of documents Keywords:
________________________________________________________________[C++ METHOD] Name: TMrbTidyDoc::GetDocName Purpose: Return name Arguments: Bool_t LongFlag -- long output Results: Char_t * DocName -- name Exceptions: Description: Runs diagnostics via tidyRunDiagnostics(). Keywords:
________________________________________________________________[C++ METHOD] Name: TMrbTidyDoc::Print Purpose: Print data Arguments: Char_t * File -- file name Bool_t Verbose -- kTRUE: print full text strings Bool_t HtmlFlag -- kTRUE: output html format Results: -- Exceptions: Description: Prints document data Keywords:
________________________________________________________________[C++ METHOD] Name: TMrbTidyDoc::Print Purpose: Print data Arguments: ostream & Out -- output stream Bool_t Verbose -- kTRUE: print full text strings Bool_t HtmlFlag -- kTRUE: output html format Results: -- Exceptions: Description: Prints document data Keywords:
________________________________________________________________[C++ METHOD] Name: TMrbTidyDoc::OutputHtml Purpose: Output HTML code Arguments: Char_t * HtmlFile -- output file Results: kTRUE/kFALSE Exceptions: Description: Outputs html code to file including special code for marabou nodes Keywords:
________________________________________________________________[C++ METHOD] Name: TMrbTidyDoc::OutputHtml Purpose: Output HTML code Arguments: ostream & Out -- output stream Results: kTRUE/kFALSE Exceptions: Description: Outputs html code to stream including special code for marabou nodes Keywords: