feat(cpp-object-oriented-modular-refactoring): step 14 - runtime-element-factory
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#ifndef FESA_ELEMENTS_ELEMENT_FACTORY_H_
|
||||
#define FESA_ELEMENTS_ELEMENT_FACTORY_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "fesa/core/status.h"
|
||||
#include "fesa/elements/element.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
class Domain;
|
||||
class ElementDefinition;
|
||||
|
||||
/// @brief Creates checked numerical elements from Domain-owned definitions.
|
||||
class ElementFactory {
|
||||
public:
|
||||
/// @brief Creates the supported runtime kernel for one semantic definition.
|
||||
/// @param definition Definition owned by domain for the returned operation.
|
||||
/// @param domain Immutable owner of referenced nodes, property, and material.
|
||||
/// @return A non-null element or a structured model failure.
|
||||
Result<std::unique_ptr<Element>> Create(const ElementDefinition& definition,
|
||||
const Domain& domain) const;
|
||||
|
||||
private:
|
||||
/// @brief Creates one checked B33 runtime candidate.
|
||||
Result<std::unique_ptr<Element>> CreateBeam(
|
||||
const ElementDefinition& definition, const Domain& domain) const;
|
||||
|
||||
/// @brief Creates one checked MITC4 runtime candidate.
|
||||
Result<std::unique_ptr<Element>> CreateShell(
|
||||
const ElementDefinition& definition, const Domain& domain) const;
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
#endif // FESA_ELEMENTS_ELEMENT_FACTORY_H_
|
||||
Reference in New Issue
Block a user