HDK
|
#include <GU_AgentMetadata.h>
Public Member Functions | |
GU_AgentMetadata (const UT_StringHolder &filename, const UT_OptionsHolder &dict) | |
~GU_AgentMetadata () | |
int64 | getMemoryUsage (bool inclusive) const |
The amount of memory used by this item. More... | |
bool | isFile () const |
Return whether the metadata was loaded from disk. More... | |
void | clearIsFile () |
Clear the flag marking that the metadata references a file on disk. More... | |
const UT_StringHolder & | fileName () const |
Returns the name of the file referenced on disk. More... | |
bool | save (UT_JSONWriter &w) const |
Save the metadata. More... | |
bool | load (UT_JSONParser &p, UT_StringArray &errors) |
Load the metadata. More... | |
const UT_OptionsHolder & | dict () const |
Returns the metadata dictionary. More... | |
void | setDict (const UT_OptionsHolder &dict) |
Updates the metadata dictionary. More... | |
Public Member Functions inherited from UT_IntrusiveRefCounter< GU_AgentMetadata > | |
SYS_FORCE_INLINE | UT_IntrusiveRefCounter () noexcept |
Default constructor: Sets counter to 0. More... | |
SYS_FORCE_INLINE | UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &) noexcept |
Copy constructor: Sets counter to 0. More... | |
UT_IntrusiveRefCounter & | operator= (const UT_IntrusiveRefCounter &) noexcept |
Assignment operator: Does not modify counter. More... | |
SYS_FORCE_INLINE uint32 | use_count () const noexcept |
Return current counter. More... | |
SYS_FORCE_INLINE bool | conditionalAddRef () noexcept |
Static Public Member Functions | |
static GU_AgentMetadataPtr | addMetadata () |
Create new empty metadata. More... | |
static GU_AgentMetadataPtr | addMetadataFromFile (const UT_StringHolder &filename, UT_StringArray &errors) |
Load the metadata from a file. More... | |
static GU_AgentMetadataPtr | addMetadataCopy (const GU_AgentMetadata &src) |
Additional Inherited Members | |
Protected Member Functions inherited from UT_IntrusiveRefCounter< GU_AgentMetadata > | |
SYS_FORCE_INLINE | ~UT_IntrusiveRefCounter () |
Destructor: Only derived classes can destruct this. More... | |
Provides a simple way to store custom metadata (UT_Options) in the agent definition.
Definition at line 28 of file GU_AgentMetadata.h.
|
inline |
Use the static addMetadata() method to create new metadata items. This is only public for use with UTmakeIntrusive().
Definition at line 33 of file GU_AgentMetadata.h.
GU_AgentMetadata::~GU_AgentMetadata | ( | ) |
|
static |
Create new empty metadata.
|
static |
Creates a copy of the metadata. The copy will not be marked as an external reference.
|
static |
Load the metadata from a file.
void GU_AgentMetadata::clearIsFile | ( | ) |
Clear the flag marking that the metadata references a file on disk.
|
inline |
Returns the metadata dictionary.
Definition at line 72 of file GU_AgentMetadata.h.
|
inline |
Returns the name of the file referenced on disk.
Definition at line 60 of file GU_AgentMetadata.h.
int64 GU_AgentMetadata::getMemoryUsage | ( | bool | inclusive | ) | const |
The amount of memory used by this item.
|
inline |
Return whether the metadata was loaded from disk.
Definition at line 56 of file GU_AgentMetadata.h.
bool GU_AgentMetadata::load | ( | UT_JSONParser & | p, |
UT_StringArray & | errors | ||
) |
Load the metadata.
bool GU_AgentMetadata::save | ( | UT_JSONWriter & | w | ) | const |
Save the metadata.
|
inline |
Updates the metadata dictionary.
Definition at line 75 of file GU_AgentMetadata.h.