HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_AgentMetadata Class Reference

#include <GU_AgentMetadata.h>

+ Inheritance diagram for GU_AgentMetadata:

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_StringHolderfileName () 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_OptionsHolderdict () 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_IntrusiveRefCounteroperator= (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...
 

Detailed Description

Provides a simple way to store custom metadata (UT_Options) in the agent definition.

Definition at line 28 of file GU_AgentMetadata.h.

Constructor & Destructor Documentation

GU_AgentMetadata::GU_AgentMetadata ( const UT_StringHolder filename,
const UT_OptionsHolder dict 
)
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 ( )

Member Function Documentation

static GU_AgentMetadataPtr GU_AgentMetadata::addMetadata ( )
static

Create new empty metadata.

static GU_AgentMetadataPtr GU_AgentMetadata::addMetadataCopy ( const GU_AgentMetadata src)
static

Creates a copy of the metadata. The copy will not be marked as an external reference.

static GU_AgentMetadataPtr GU_AgentMetadata::addMetadataFromFile ( const UT_StringHolder filename,
UT_StringArray errors 
)
static

Load the metadata from a file.

void GU_AgentMetadata::clearIsFile ( )

Clear the flag marking that the metadata references a file on disk.

const UT_OptionsHolder& GU_AgentMetadata::dict ( ) const
inline

Returns the metadata dictionary.

Definition at line 72 of file GU_AgentMetadata.h.

const UT_StringHolder& GU_AgentMetadata::fileName ( ) const
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.

bool GU_AgentMetadata::isFile ( ) const
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.

void GU_AgentMetadata::setDict ( const UT_OptionsHolder dict)
inline

Updates the metadata dictionary.

Definition at line 75 of file GU_AgentMetadata.h.


The documentation for this class was generated from the following file: