Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

rt::HtmlCreator Class Reference

Creates HTML results files for top mode competitions. More...

#include <robhtml.h>

List of all members.

Public Methods

 HtmlCreator (const String &competitionName, const File &competitionFolder, const File &outputFolder, bool createLinks, bool createDownloadLinks)
 Creates a new HtmlCreator which reads and writes from/to the given paths, using the given options. More...

 ~HtmlCreator ()
File getDetailedHtml (const String &botFileName)
 Returns the file of the detailed html file for the given bot name.

bool createChartsHtml (bool recalc=false, const String &iniName=defaultChartsIniName, const String &htmlName=defaultChartsHtmlName)
 Creates the main HTML page. More...

bool createDetailedHtml (const String &botFileName)
 Creates a detailed HTML page for the given bot.


Static Public Methods

String toHtml (const String &text)
 Escapes any critical characters in the given text to their HTML entities.


Static Public Attributes

String defaultChartsIniName = "charts.xxx"
 A suitable default for the charts ini file name (as used by TopManager). More...

String defaultChartsHtmlName = "charts.html"
 A suitable default for the charts html file name. More...


Protected Methods

bool readDetailed (const String &botFileName, Vector< TopTourResult > &store)
bool cssExists ()
bool writeCss ()

Protected Attributes

String competitionName
String chartsHtmlName
File competitionFolder
File outputFolder
bool createLinks
bool createDownloadLinks
TopManager myManager

Static Protected Attributes

String cssName = "charts.css"


Detailed Description

Creates HTML results files for top mode competitions.

Note: Most methods return true on success, false on failure (e.g. if some files were not found or could not be created).


Constructor & Destructor Documentation

rt::HtmlCreator::HtmlCreator (  const String &    competitionName,
const File &    competitionFolder,
const File &    outputFolder,
bool    createLinks,
bool    createDownloadLinks
) 
 

Creates a new HtmlCreator which reads and writes from/to the given paths, using the given options.

Parameters:
competitionName  The competition's name, as it should appear on the HTML pages, e.g. "Eternal".
competitionFolder  The folder in which the competition files (charts ini files, results ini files) are.
outputFolder  The folder in which the created HTML files should be placed.
createLinks  Should links between the charts and the detailed pages be included into the pages?
createDownloadLinks  Should links to the robot files be created?


Member Function Documentation

bool rt::HtmlCreator::createChartsHtml (  bool    recalc = false,
const String &    iniName = defaultChartsIniName,
const String &    htmlName = defaultChartsHtmlName
) 
 

Creates the main HTML page.

Parameters:
recalc  If specified, rewrites the charts.cxx file at first from the details sources.


Member Data Documentation

String rt::HtmlCreator::defaultChartsHtmlName = "charts.html" [static]
 

A suitable default for the charts html file name.

This file name is used relative to the outputFolder. Currently this value is "charts.html".

String rt::HtmlCreator::defaultChartsIniName = "charts.xxx" [static]
 

A suitable default for the charts ini file name (as used by TopManager).

This file name is used relative to the competitionFolder. Currently this value is "charts.xxx".


The documentation for this class was generated from the following files:
This is the RoboTour API documentation version 0.1 • Copyright (C) by Florian Fischer