ContentObject.h header

#include <ew/core/ContentObject.h>

Namespace ew::core

ContentObject class

class ew::core::ContentObject

Common base for every object in the content graph. Carries the stable identity and structural kind shared by all content; concrete subtypes (documents, entities, sheets, maps, timelines, ...) add their own data. Held via pointer as the base of a polymorphic hierarchy.

Members

ew::core::ContentObject::ContentObject(ContentId id, ContentType type)

Constructs a content object with the given identity and structural kind.

virtual ew::core::ContentObject::~ContentObject()=default

Defaulted.

ew::core::ContentObject::ContentObject(const ContentObject &)=delete

Polymorphic base: non-copyable and non-movable (referenced, never sliced).

ew::core::ContentObject::ContentObject(ContentObject &&)=delete

Not movable.

ContentObject & ew::core::ContentObject::operator=(const ContentObject &)=delete

Not copyable.

ContentObject & ew::core::ContentObject::operator=(ContentObject &&)=delete

Not movable.

ContentId ew::core::ContentObject::id() const

Returns this object's stable identity.

ContentType ew::core::ContentObject::type() const

Returns this object's structural kind.

const std::set< QString > & ew::core::ContentObject::visibleAudiences() const

The audiences this object is visible to (by name; see Project::audiences()). An empty set – the default – means it is visible to everyone; otherwise it is restricted to the named audiences, and a reader viewing as an audience outside the set does not see it. Lets one project serve different readerships (e.g. a GM's secrets hidden from players) without keeping separate copies. Ordered for deterministic serialization.

void ew::core::ContentObject::setVisibleAudiences(std::set< QString > audiences)

Sets the audiences this object is visible to (empty means visible to everyone).

bool ew::core::ContentObject::isVisibleTo(const QString &audience) const

Returns true if this object is visible to audience: either it is unrestricted (its audience set is empty) or the set contains audience.

const std::set< QString > & ew::core::ContentObject::tags() const

The free-form labels the writer has attached to this object (e.g. "draft", "needs-research", "act-1"). Tags are a cross-cutting organization axis independent of the codex category tree: any object of any kind can carry any tags, and the writer can filter or group by them. Kept as a set (deduplicated, ordered for deterministic serialization).

void ew::core::ContentObject::setTags(std::set< QString > tags)

Sets this object's free-form organization tags.

bool ew::core::ContentObject::hasTag(const QString &tag) const

Returns true if this object carries tag.

bool ew::core::ContentObject::aiExcluded() const

Whether this object is excluded from AI features. When true, the object's content is withheld from every AI feature – the agent's world snapshot, the semantic (RAG) index, and canon-consistency checks – giving the writer per-object privacy control. Defaults to false (included). Independent of visibleAudiences (which hides content from readers) and of redaction (which masks entity names in a request).

void ew::core::ContentObject::setAiExcluded(bool excluded)

Sets whether this object is excluded from AI features.

const std::vector< QString > & ew::core::ContentObject::plotThreadIds() const

The plot threads (by stable thread id) this object advances or belongs to – a cross-cutting membership axis independent of the category tree, available on ANY object: a scene document, a timeline event, or an entity (a character's arc). Kept in the order the writer added them.

void ew::core::ContentObject::setPlotThreadIds(std::vector< QString > plotThreadIds)

Sets the plot threads (by thread id) this object advances or belongs to.