NumeRe
v1.1.4
NumeRe: Framework für Numerische Rechnungen
procedurelibrary.hpp
Go to the documentation of this file.
1
/*****************************************************************************
2
NumeRe: Framework fuer Numerische Rechnungen
3
Copyright (C) 2017 Erik Haenel et al.
4
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with this program. If not, see <http://www.gnu.org/licenses/>.
17
******************************************************************************/
18
19
#include "
procedureelement.hpp
"
20
#include <string>
21
#include <fstream>
22
#include <map>
23
#include <vector>
24
25
#ifndef PROCEDURELIBRARY_HPP
26
#define PROCEDURELIBRARY_HPP
27
33
class
ProcedureLibrary
34
{
35
private
:
36
std::map<std::string, ProcedureElement*>
mLibraryEntries
;
37
38
ProcedureElement
*
constructProcedureElement
(
const
std::string& sProcedureFileName);
39
StyledTextFile
getFileContents
(
const
std::string& sProcedureFileName);
40
41
public
:
42
~ProcedureLibrary
();
43
44
ProcedureElement
*
getProcedureContents
(
const
std::string& sProcedureFileName);
45
void
updateLibrary
();
46
};
47
48
#endif
49
ProcedureElement
This class contains the pre-parsed contents of a single procedure file.
Definition:
procedureelement.hpp:37
ProcedureLibrary
This class manages all already read and possibly pre-parsed procedure files for easier and faster acc...
Definition:
procedurelibrary.hpp:34
ProcedureLibrary::mLibraryEntries
std::map< std::string, ProcedureElement * > mLibraryEntries
Definition:
procedurelibrary.hpp:36
ProcedureLibrary::getFileContents
StyledTextFile getFileContents(const std::string &sProcedureFileName)
Reads the contents of the passed file and returns it as a std::vector.
Definition:
procedurelibrary.cpp:63
ProcedureLibrary::updateLibrary
void updateLibrary()
Perform an update, e.g. if a procedure was deleted.
Definition:
procedurelibrary.cpp:107
ProcedureLibrary::getProcedureContents
ProcedureElement * getProcedureContents(const std::string &sProcedureFileName)
Returns the ProcedureElement pointer to the desired procedure file. It also creates the element,...
Definition:
procedurelibrary.cpp:84
ProcedureLibrary::constructProcedureElement
ProcedureElement * constructProcedureElement(const std::string &sProcedureFileName)
Constructs a new ProcedureElement, if the file exists. Otherwise returns a nullptr.
Definition:
procedurelibrary.cpp:44
ProcedureLibrary::~ProcedureLibrary
~ProcedureLibrary()
Destructor avoiding memory leaks. Releases the memory allocated for each ProcedureElement.
Definition:
procedurelibrary.cpp:29
StyledTextFile
This class represents a text file in memory (e.g. a code file). This class will try to lex the loaded...
Definition:
styledtextfile.hpp:41
procedureelement.hpp
kernel
core
procedure
procedurelibrary.hpp
Generated by
1.9.3