SST  15.1.0
StructuralSimulationToolkit
module.h
1 // Copyright 2009-2025 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-2025, 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 #ifndef SST_CORE_MODULE_H
13 #define SST_CORE_MODULE_H
14 
15 #include "sst/core/eli/elementinfo.h"
16 #include "sst/core/serialization/serializable.h"
17 
18 namespace SST {
19 
20 class Params;
21 
22 /**
23  Module is a tag class used with the loadModule function.
24  */
26 {
27 public:
28  SST_ELI_DECLARE_BASE(Module)
29  // declare extern to limit compile times
30  SST_ELI_DECLARE_CTORS(ELI_CTOR(SST::Params&), ELI_CTOR(Component*, SST::Params&))
31  SST_ELI_DECLARE_INFO_EXTERN(ELI::ProvidesParams, ELI::ProvidesCheckpointable)
32  Module() {}
33  virtual ~Module() {}
34  void serialize_order(SST::Core::Serialization::serializer& UNUSED(ser)) override {}
35  ImplementSerializable(SST::Module)
36 };
37 
38 } // namespace SST
39 
40 #define SST_ELI_REGISTER_MODULE(cls, lib, name, version, desc, interface) \
41  SST_ELI_REGISTER_DERIVED(::interface,cls,lib,name,ELI_FORWARD_AS_ONE(version),desc) \
42  SST_ELI_INTERFACE_INFO(#interface)
43 
44 // New way to register modules. Must register an interface (API)
45 // first, then you can register a module that implements it
46 #define SST_ELI_REGISTER_MODULE_API(cls, ...) \
47  SST_ELI_DECLARE_NEW_BASE(SST::Module,::cls) \
48  SST_ELI_NEW_BASE_CTOR(SST::Params&,##__VA_ARGS__)
49 
50 #define SST_ELI_REGISTER_MODULE_DERIVED_API(cls, base, ...) \
51  SST_ELI_DECLARE_NEW_BASE(::base,::cls) \
52  SST_ELI_NEW_BASE_CTOR(SST::Params&,##__VA_ARGS__)
53 
54 #endif // SST_CORE_MODULE_H
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:42
Main component object for the simulation.
Definition: component.h:30
Definition: action.cc:18
Definition: serializable.h:23
Module is a tag class used with the loadModule function.
Definition: module.h:25
Definition: paramsInfo.h:39
Parameter store.
Definition: params.h:63
Definition: checkpointableInfo.h:39