SST  6.0.0
StructuralSimulationToolkit
envquery.h
1 
2 #ifndef _H_SST_CORE_ENV_QUERY_H
3 #define _H_SST_CORE_ENV_QUERY_H
4 
5 #include <sst_config.h>
6 
7 #include <sst/core/env/envconfig.h>
8 
9 #include <cstdio>
10 #include <cstdlib>
11 #include <iostream>
12 #include <cstring>
13 #include <string>
14 
15 namespace SST {
16 namespace Core {
17 namespace Environment {
18 
19 /**
20 Reads the next new-line delimited entry in a file and put
21 into the buffer provided. The user is responsible for ensuring
22 that the buffer is of an appropriate length.
23 */
24 void configReadLine(FILE* theFile, char* lineBuffer);
25 
26 /**
27 Opens a configuration file specified and populates an
28 EnvironmentConfiguration instance with the contents.
29 */
30 void populateEnvironmentConfig(const std::string& path, EnvironmentConfiguration* cfg,
31  bool errorOnNotOpen);
32 
33 /**
34 Uses an already open file, reads the contents and populates an instance
35 of an EnvironmentConfiguration with the contents
36 */
37 void populateEnvironmentConfig(FILE* configFile, EnvironmentConfiguration* cfg,
38  bool errorOnNotOpen);
39 
40 /**
41 Provides an SST-guaranteed precedence ordering loading of configuration
42 files. The user can supply an override list of file paths which should
43 take precedence over the default configuration locations.
44 */
45 EnvironmentConfiguration* getSSTEnvironmentConfiguration(const std::vector<std::string>& overridePaths);
46 
47 }
48 }
49 }
50 
51 #endif
Definition: action.cc:17