HDK
|
#include <PDG_AttributeRef.h>
Public Member Functions | |
PDG_AttributeRef (const UT_StringHolder &name, const PDG_AttributeOwner *owner, PDG_AttributeError error=PDG_AttributeError::eNone) | |
operator bool () const | |
Returns true if the handle is valid. More... | |
bool | isValid () const |
Returns true if the handle is valid. More... | |
PDG_AttributeError | error () const |
Returns the error state of the handle. More... | |
const UT_StringHolder & | name () const |
Returns the name of the attribute referenced by this attrib ref. More... | |
const PDG_AttributeOwner * | owner () const |
Returns the PDG_AttributeOwner that owns the underlying attribute. More... | |
bool | validate (UT_WorkBuffer &buffer) const |
bool | validate (const PDG_Node *node, bool report_errors=true, bool as_warning=false) const |
Static Public Member Functions | |
static bool | attributeError (UT_WorkBuffer &buffer, PDG_AttributeError error, const UT_StringHolder &attrib_name, const PDG_AttributeOwner *owner=nullptr) |
static void | attributeModified (const PDG_AttributeOwner *owner, PDG_AttributeType attrib_type, const UT_StringHolder &attrib_name) |
Emits events when the attribute is modified. More... | |
Protected Attributes | |
UT_StringHolder | myName |
const PDG_AttributeOwner * | myOwner |
PDG_AttributeError | myError |
Base class for attribute references
Definition at line 33 of file PDG_AttributeRef.h.
|
inlineexplicit |
Definition at line 36 of file PDG_AttributeRef.h.
|
static |
Writes an attribute error format message to the buffer, based on the supply error, attrib name and optional work item. Returns True if no error is detected, or false if an error occured.
|
static |
Emits events when the attribute is modified.
|
inline |
Returns the error state of the handle.
Definition at line 55 of file PDG_AttributeRef.h.
|
inline |
Returns true if the handle is valid.
Definition at line 51 of file PDG_AttributeRef.h.
|
inline |
Returns the name of the attribute referenced by this attrib ref.
Definition at line 60 of file PDG_AttributeRef.h.
|
inline |
Returns true if the handle is valid.
Definition at line 47 of file PDG_AttributeRef.h.
|
inline |
Returns the PDG_AttributeOwner that owns the underlying attribute.
Definition at line 64 of file PDG_AttributeRef.h.
bool PDG_AttributeRef::validate | ( | UT_WorkBuffer & | buffer | ) | const |
Returns false and Writes an attribute error message into the buffer if an error exists, or returns trues and does not modify the buffer if no error has been recorded.
bool PDG_AttributeRef::validate | ( | const PDG_Node * | node, |
bool | report_errors = true , |
||
bool | as_warning = false |
||
) | const |
Same as above, except the attribute error is reported on the specified node instead of returned as a buffer, if an error has occured. The method still returns true if no error has occured, and false if one has.
The report_errors argument is provided as a convenience, to make it possible to parametrically skip error reporting
|
protected |
Definition at line 102 of file PDG_AttributeRef.h.
|
protected |
Definition at line 100 of file PDG_AttributeRef.h.
|
protected |
Definition at line 101 of file PDG_AttributeRef.h.