SST  10.0.0
StructuralSimulationToolkit
pythonConfigOutput.h
1 // Copyright 2009-2020 NTESS. Under the terms
2 // of Contract DE-NA0003525 with NTESS, the U.S.
3 // Government retains certain rights in this software.
4 //
5 // Copyright (c) 2009-2020, NTESS
6 // All rights reserved.
7 //
8 // This file is part of the SST software package. For license
9 // information, see the LICENSE file in the top level directory of the
10 // distribution.
11 //
12 
13 #ifndef _H_SST_CORE_CONFIG_OUTPUT_PYTHON
14 #define _H_SST_CORE_CONFIG_OUTPUT_PYTHON
15 
16 #include "sst/core/configGraph.h"
17 #include "sst/core/configGraphOutput.h"
18 #include <map>
19 
20 namespace SST {
21 namespace Core {
22 
24 public:
25  PythonConfigGraphOutput(const char* path);
26 
27  virtual void generate(const Config* cfg,
28  ConfigGraph* graph) override;
29 
30 protected:
31  ConfigGraph* getGraph() { return graph; }
32  void generateParams( const Params &params );
33  void generateCommonComponent( const char* objName, const ConfigComponent &comp);
34  void generateSubComponent( const char* owner, const ConfigComponent &comp );
35  void generateComponent( const ConfigComponent &comp );
36  void generateStatGroup(const ConfigGraph* graph, const ConfigStatGroup &grp);
37 
38  const std::string& getLinkObject(LinkId_t id);
39 
40  char* makePythonSafeWithPrefix(const std::string& name, const std::string& prefix) const;
41  void makeBufferPythonSafe(char* buffer) const;
42  char* makeEscapeSafe(const std::string& input) const;
43  bool strncmp(const char* a, const char* b, const size_t n) const;
44  bool isMultiLine(const char* check) const;
45  bool isMultiLine(const std::string& check) const;
46 
47 private:
48  ConfigGraph *graph;
49  std::map<LinkId_t, std::string> linkMap;
50 };
51 
52 }
53 }
54 
55 #endif
Definition: configGraphOutput.h:40
Class to contain SST Simulation Configuration variables.
Definition: config.h:31
Represents the configuration of a generic component.
Definition: configGraph.h:193
A Configuration Graph A graph representing Components and Links.
Definition: configGraph.h:316
Definition: pythonConfigOutput.h:23
Parameter store.
Definition: params.h:44
Definition: configGraph.h:129