Microflow 3D  v1.0
TextParser.h
Go to the documentation of this file.
1 // ==============================================================================================
2 // Microflow 3D, http://www.microflow.pwr.edu.pl/
3 // Created by Roman Szafran on 02.03.19.
4 // Copyright (c) 2019 Wroclaw University of Science and Technology.
5 // Distributed under the Apache License, Version 2.0. You may obtain a copy of the License at
6 // http://www.apache.org/licenses/LICENSE-2.0 or see accompanying file license.txt.
7 // Redistributions of source code must retain the above copyright and license notice.
8 // ==============================================================================================
9 
10 #pragma once
11 
12 #include <iostream>
13 #include <cstdlib>
14 #include <clocale>
15 
16 #include <config4cpp/Configuration.h>
17 
18 namespace MF {
19  namespace Parser {
20 
23  class TextParser {
24  public:
25  TextParser()= default;
26 
27  ~TextParser() = default;
28 
29  config4cpp::Configuration *CaseConfigFileParse(const char *pPathToCaseFile, const char *pScope, bool verbose);
30 
31  config4cpp::Configuration *ProgramConfigFileParse(const char *pPathToConfigFile, const char *pScope, bool verbose);
32 
33  config4cpp::Configuration *ThreadConfigFileParse(const char *pPathToThreadFile, const char *pScope, bool verbose);
34 
35  private:
36  config4cpp::Configuration* pProgramParams {nullptr};
37  config4cpp::Configuration* pCaseParams {nullptr};
38  config4cpp::Configuration* pThreadParams {nullptr};
39  };
40 
41  } /* namespace Parser */
42 } /* namespace MF */
config4cpp::Configuration * CaseConfigFileParse(const char *pPathToCaseFile, const char *pScope, bool verbose)
Definition: TextParser.cpp:12
config4cpp::Configuration * ProgramConfigFileParse(const char *pPathToConfigFile, const char *pScope, bool verbose)
Definition: TextParser.cpp:49
The object of TextParser class parses case, program and thread config files.
Definition: TextParser.h:23
config4cpp::Configuration * ThreadConfigFileParse(const char *pPathToThreadFile, const char *pScope, bool verbose)
Definition: TextParser.cpp:86