Dynamic Neural Field Composer 0.0.0
A C++20 library and interactive application for building and simulating Dynamic Neural Field (DNF) architectures.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dnf_composer::element::ElementFactory Class Reference

Factory that creates concrete Element objects from type labels and parameters. More...

#include <element_factory.h>

Collaboration diagram for dnf_composer::element::ElementFactory:

Public Member Functions

std::shared_ptr< ElementcreateElement (ElementLabel type)
 Create an element with default parameters.
 
std::shared_ptr< ElementcreateElement (ElementLabel type, const ElementCommonParameters &elementCommonParameters, const ElementSpecificParameters &elementSpecificParameters)
 Create and return an element of the given type.
 
 ElementFactory ()
 

Detailed Description

Factory that creates concrete Element objects from type labels and parameters.

ElementFactory maintains a dispatch table keyed on ElementLabel. Call createElement(label, commonParams, specificParams) to create any registered element type without depending on its concrete class. A default-parameter overload is available for quick construction during prototyping.

Constructor & Destructor Documentation

◆ ElementFactory()

dnf_composer::element::ElementFactory::ElementFactory ( )

Member Function Documentation

◆ createElement() [1/2]

std::shared_ptr< Element > dnf_composer::element::ElementFactory::createElement ( ElementLabel  type)

Create an element with default parameters.

Parameters
typeWhich element to create.
Returns
Shared pointer to the new element.

◆ createElement() [2/2]

std::shared_ptr< Element > dnf_composer::element::ElementFactory::createElement ( ElementLabel  type,
const ElementCommonParameters elementCommonParameters,
const ElementSpecificParameters elementSpecificParameters 
)

Create and return an element of the given type.

Parameters
typeWhich element to create.
elementCommonParametersName, label, and spatial dimensions.
elementSpecificParametersType-specific parameter struct (cast internally).
Returns
Shared pointer to the new element.

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