NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
doc_helper.cpp File Reference
#include <fstream>
#include "doc_helper.hpp"
#include "docfile.hpp"
#include "../version.h"
#include "../utils/tools.hpp"
#include "../../kernel.hpp"
#include <algorithm>
Include dependency graph for doc_helper.cpp:

Go to the source code of this file.

Functions

static void stripComments (std::string &sLine, std::ifstream &fDocument)
 Strips comments from the documentation article file. More...
 
static void findArticleById (std::string &sLine, const std::string &sArticleID, std::ifstream &fDocument)
 Searches an article in a file by the selected ID. More...
 
static std::vector< std::string > loadDocumentationArticle (const std::string &sFileName, const std::string &sArticleID)
 This static function loads and prepares the selected documentation article. More...
 

Function Documentation

◆ findArticleById()

static void findArticleById ( std::string &  sLine,
const std::string &  sArticleID,
std::ifstream &  fDocument 
)
static

Searches an article in a file by the selected ID.

Parameters
sLinestd::string&
sArticleIDconst std::string&
fDocumentstd::ifstream&
Returns
void

Definition at line 79 of file doc_helper.cpp.

References Documentation::getArgAtPos(), stripComments(), and StripSpaces().

Referenced by loadDocumentationArticle().

Here is the call graph for this function:

◆ loadDocumentationArticle()

static std::vector< std::string > loadDocumentationArticle ( const std::string &  sFileName,
const std::string &  sArticleID 
)
static

This static function loads and prepares the selected documentation article.

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

Definition at line 122 of file doc_helper.cpp.

References findArticleById(), getArgAtPos(), SyntaxError::HLP_FILE_MISSING, SyntaxError::invalid_position, stripComments(), and StripSpaces().

Referenced by Documentation::getHelpArticle().

Here is the call graph for this function:

◆ stripComments()

static void stripComments ( std::string &  sLine,
std::ifstream &  fDocument 
)
static

Strips comments from the documentation article file.

Parameters
sLinestd::string&
fDocumentstd::ifstream&
Returns
void

Definition at line 39 of file doc_helper.cpp.

References StripSpaces().

Referenced by findArticleById(), and loadDocumentationArticle().

Here is the call graph for this function: