The SKIRT project
advanced radiative transfer for astrophysics
Public Member Functions | Static Public Member Functions | List of all members
ShapeRegistry Class Referencefinal

#include <ShapeRegistry.hpp>

Public Member Functions

 ShapeRegistry ()
 
 ~ShapeRegistry ()
 

Static Public Member Functions

static const SchemaDefgetSchemaDef ()
 

Detailed Description

The ShapeRegistry class manages the registration of all Item subclasses defined and used in the 'shapes' program. A single instance of the ShapeRegistry 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.

Constructor & Destructor Documentation

◆ ShapeRegistry()

ShapeRegistry::ShapeRegistry ( )

The constructor registers all Item subclasses defined and used in the 'shapes' program with the item registry, including them in a single SMILE schema called 'Shapes'. The function is not thread-safe and may be called only during program startup from a single thread.

◆ ~ShapeRegistry()

ShapeRegistry::~ShapeRegistry ( )

The destructor releases the global memory managed by the item registry.

Member Function Documentation

◆ getSchemaDef()

static const SchemaDef * ShapeRegistry::getSchemaDef ( )
static

This static function returns a pointer to the 'Shapes' 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 ShapeRegistry instance.


The documentation for this class was generated from the following file: