EntityTemplate.h header
#include <ew/core/EntityTemplate.h>
Namespace ew::core
EntityTemplate struct
struct ew::core::EntityTemplate
A reusable starting point for a codex entity: a named preset that fixes the category a new entity is created in and pre-fills some of its field values (for example a "Villain" template under Characters that seeds a role or an alignment). A template has no identity of its own; it lives in the project's template registry and is applied by creating a fresh entity in categoryId and copying fieldValues onto it, so the writer starts filled-in rather than blank.
Members
QString ew::core::EntityTemplate::name
The user-facing name of the template, shown when picking one to create from.
CategoryId ew::core::EntityTemplate::categoryId
The category a new entity built from this template is placed in (a null id leaves the category to the creator).
std::map<QString, QString> ew::core::EntityTemplate::fieldValues
The field values pre-filled on a new entity, keyed by field key (see Entity::setValue). Keys absent here are simply left empty for the writer to fill in.
bool operator==(const EntityTemplate &, const EntityTemplate &)=default
Templates compare equal when their name, category, and field values all match.