SST  9.1.0
StructuralSimulationToolkit
interfaceInfo.h
1 #ifndef SST_CORE_INTERFACE_INFO_H
2 #define SST_CORE_INTERFACE_INFO_H
3 
4 namespace SST {
5 namespace ELI {
6 
8  public:
9  const std::string& getInterface() const {
10  return iface_;
11  }
12 
13  void toString(std::ostream& os) const {
14  os << " Interface: " << iface_ << "\n";
15  }
16 
17  template <class XMLNode> void outputXML(XMLNode* node) const {
18  node->SetAttribute("Interface", iface_.c_str());
19  }
20 
21  protected:
22  template <class T> ProvidesInterface(T* UNUSED(t)) :
23  iface_(T::ELI_getInterface())
24  {
25  }
26 
27  private:
28  std::string iface_;
29 };
30 
31 }
32 }
33 
34 #define SST_ELI_INTERFACE_INFO(interface) \
35  static const std::string ELI_getInterface() { \
36  return interface; \
37  }
38 
39 #endif
40 
Definition: interfaceInfo.h:7