SST  7.2.0
StructuralSimulationToolkit
elemLoader.h
1 // Copyright 2009-2017 Sandia Corporation. Under the terms
2 // of Contract DE-NA0003525 with Sandia Corporation, the U.S.
3 // Government retains certain rights in this software.
4 //
5 // Copyright (c) 2009-2017, Sandia Corporation
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 #ifndef _SST_CORE_ELEMLOADER_H
13 #define _SST_CORE_ELEMLOADER_H
14 
15 #include <string>
16 #include <vector>
17 #include <sst/core/element.h>
18 
19 namespace SST {
20 
21 struct LoaderData;
22 
23 /** Class to load Element Libraries */
24 class ElemLoader {
25  LoaderData *loaderData;
26  std::string searchPaths;
27 public:
28  /** Create a new ElementLoader with a given searchpath of directories */
29  ElemLoader(const std::string &searchPaths);
30  ~ElemLoader();
31 
32  /** Attempt to load a library
33  * @param elemlib - The name of the Element Library to load
34  * @param showErrors - Print errors associated with attempting to find and load the library
35  * @return Informational structure of the library, or NULL if it failed to load.
36  */
37  const ElementLibraryInfo* loadLibrary(const std::string &elemlib, bool showErrors);
38 
39  /**
40  * Gather ELI information for core-provided features
41  */
43 
44  /**
45  * Returns a list of potential element libraries in the search path
46  */
47  std::vector<std::string> getPotentialElements();
48 };
49 
50 }
51 
52 #endif /* _SST_CORE_ELEMLOADER_H */
This structure exists so that we don&#39;t need to have any libtool-specific code (and therefore need the...
Definition: elemLoader.cc:57
Describes all the parts of the Element Library.
Definition: element.h:130
const ElementLibraryInfo * loadLibrary(const std::string &elemlib, bool showErrors)
Attempt to load a library.
Definition: elemLoader.cc:182
const ElementLibraryInfo * loadCoreInfo()
Gather ELI information for core-provided features.
Definition: elemLoader.cc:222
Definition: action.cc:17
ElemLoader(const std::string &searchPaths)
Create a new ElementLoader with a given searchpath of directories.
Definition: elemLoader.cc:63
Class to load Element Libraries.
Definition: elemLoader.h:24
std::vector< std::string > getPotentialElements()
Returns a list of potential element libraries in the search path.
Definition: elemLoader.cc:274