16#ifndef AEONGUI_ELEMENTFACTORY_H
17#define AEONGUI_ELEMENTFACTORY_H
22#include "aeongui/StringLiteral.hpp"
23#include "aeongui/AttributeMap.hpp"
38 DLL std::unique_ptr<DOM::Element> Construct (
const char* aIdentifier, AttributeMap&& aAttributeMap,
DOM::Node* aParent );
43 DLL
void Destroy (
const char* aIdentifier,
DOM::Element* aElement );
50 DLL
bool RegisterConstructor (
const StringLiteral& aIdentifier,
51 const std::function < std::unique_ptr<DOM::Element> ( AttributeMap&&,
DOM::Node* ) > & aConstructor,
52 const std::function <
void (
DOM::Element* ) > & aDestructor );
57 DLL
bool UnregisterConstructor (
const StringLiteral& aIdentifier );
61 DLL
void EnumerateConstructors (
const std::function<
bool (
const StringLiteral& ) >& aEnumerator );
63 DLL
void Initialize();
71 DLL
bool AddInitializer (
72 const std::function <
void (
DOM::Element* ) > & aInitializer,
73 const std::function <
void (
DOM::Element* ) > & aFinalizer );
79 DLL
bool RemoveInitializer (
80 const std::function <
void (
DOM::Element* ) > & aInitializer,
81 const std::function <
void (
DOM::Element* ) > & aFinalizer );
Base class for DOM elements.
Definition Element.hpp:46
Base class for all nodes in the DOM tree.
Definition Node.hpp:40
Compile-time string literal wrapper.
Definition StringLiteral.hpp:32