#include <SimulationItemRegistry.hpp>
The SimulationItemRegistry class manages the registration of all discoverable SimulationItem subclasses in the SKIRT
program (defined in the core
project subdirectory). A single instance of the SimulationItemRegistry class must be constructed just after program startup, and certainly before any parallel threads are started. A good place is early in the main() function. The program should not use the exit() or abort() functions, but rather let the main() function run to normal completion and return an exit code.
◆ SimulationItemRegistry()
SimulationItemRegistry::SimulationItemRegistry |
( |
string |
version, |
|
|
string |
format |
|
) |
| |
The constructor registers all discoverable SimulationItem subclasses in the SKIRT
program with the item registry, including them in a single SMILE schema called 'SKIRT'. The first argument version specifies the version of this schema definition. The second argument format specifies the version of the described data format (listed on the root element). The constructor is not thread-safe and may be called only during program startup from a single thread.
◆ ~SimulationItemRegistry()
SimulationItemRegistry::~SimulationItemRegistry |
( |
| ) |
|
The destructor releases the global memory managed by the item registry.
◆ getSchemaDef()
static const SchemaDef * SimulationItemRegistry::getSchemaDef |
( |
| ) |
|
|
static |
This static function returns a pointer to the 'SKIRT' schema definition. Ownership remains with the registry. This function is thread-safe and may called at any time after construction and before destruction of the SimulationItemRegistry instance.
The documentation for this class was generated from the following file:
- SimulationItemRegistry.hpp