NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
DocumentationFile Class Reference

This class represents a whole documentation file with its contained documentation articles. More...

#include <docfile.hpp>

Collaboration diagram for DocumentationFile:

Public Member Functions

 DocumentationFile (const std::string &sFileName)
 Create a DocumentationFile from the an actual file. More...
 
 DocumentationFile (const std::vector< std::string > &vFileContents)
 Create a DocumentationFile from the passed file contents. More...
 
void print (const std::string &sFileName)
 Print the documentation file to the specified file. More...
 
std::vector< DocumentationArticle > & getArticles ()
 Get all articles present in the current documentation file. More...
 

Private Member Functions

std::vector< std::string > loadFromFile (const std::string &sFileName)
 Load the documentation file contents from the specified file. More...
 
void parse (const std::vector< std::string > &vFileContents, const std::string &sFileName)
 Parse the documentation file into single articles. Only complete <article>..</article> sections are parsed. More...
 

Private Attributes

std::vector< DocumentationArticlem_articles
 

Detailed Description

This class represents a whole documentation file with its contained documentation articles.

Definition at line 60 of file docfile.hpp.

Constructor & Destructor Documentation

◆ DocumentationFile() [1/2]

DocumentationFile::DocumentationFile ( const std::string &  sFileName)

Create a DocumentationFile from the an actual file.

Parameters
sFileNameconst std::string&

Definition at line 248 of file docfile.cpp.

References loadFromFile(), and parse().

Here is the call graph for this function:

◆ DocumentationFile() [2/2]

DocumentationFile::DocumentationFile ( const std::vector< std::string > &  vFileContents)

Create a DocumentationFile from the passed file contents.

Parameters
vFileContentsconst std::vector<std::string>&

Definition at line 261 of file docfile.cpp.

References parse().

Here is the call graph for this function:

Member Function Documentation

◆ getArticles()

std::vector< DocumentationArticle > & DocumentationFile::getArticles ( )
inline

Get all articles present in the current documentation file.

Returns
std::vector<DocumentationArticle>&

Definition at line 81 of file docfile.hpp.

References m_articles.

Referenced by Documentation::addFileToDocumentationIndex(), and Script::writeDocumentationArticle().

◆ loadFromFile()

std::vector< std::string > DocumentationFile::loadFromFile ( const std::string &  sFileName)
private

Load the documentation file contents from the specified file.

Parameters
sFileNameconst std::string&
Returns
std::vector<std::string>

Definition at line 275 of file docfile.cpp.

References SyntaxError::HLP_FILE_MISSING, SyntaxError::invalid_position, and StripSpaces().

Referenced by DocumentationFile().

Here is the call graph for this function:

◆ parse()

void DocumentationFile::parse ( const std::vector< std::string > &  vFileContents,
const std::string &  sFileName 
)
private

Parse the documentation file into single articles. Only complete <article>..</article> sections are parsed.

Parameters
vFileContentsconst std::vector<std::string>&
sFileNameconst std::string&
Returns
void

Definition at line 304 of file docfile.cpp.

References m_articles.

Referenced by DocumentationFile().

◆ print()

void DocumentationFile::print ( const std::string &  sFileName)

Print the documentation file to the specified file.

Parameters
sFileNameconst std::string&
Returns
void

Definition at line 336 of file docfile.cpp.

References SyntaxError::CANNOT_READ_FILE, SyntaxError::invalid_position, m_articles, and date::detail::trunc().

Referenced by Script::writeDocumentationArticle().

Here is the call graph for this function:

Member Data Documentation

◆ m_articles

std::vector<DocumentationArticle> DocumentationFile::m_articles
private

Definition at line 63 of file docfile.hpp.

Referenced by getArticles(), parse(), and print().


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