feat(cpp-object-oriented-modular-refactoring): step 14 - runtime-element-factory

This commit is contained in:
KOKO\Mimi
2026-08-16 09:38:30 +09:00
parent ace493ee57
commit aaa488211b
14 changed files with 991 additions and 27 deletions
+36
View File
@@ -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_