C++ API Reference
|
Helper class to provide a simple implementation the the adsk::Data::Attach interface. More...
#include <adskDataAttachDirectly.h>
Public Member Functions | |
AttachDirectly () | |
Default constructor. | |
~AttachDirectly () override | |
Default destructor. | |
AttachDirectly (const AttachDirectly &) | |
Copy constructor, duplicates the metadata, which is ref-counted. More... | |
adsk::Data::Associations * | editableMetadata () override |
Get the metadata associated with this object in an editable form. More... | |
const adsk::Data::Associations * | metadata () const override |
Get the metadata associated with this object. More... | |
bool | setMetadata (const adsk::Data::Associations &) override |
Replace the object's metadata. More... | |
bool | deleteMetadata () override |
Remove the object's metadata. More... | |
Public Member Functions inherited from Attach | |
Attach () | |
Default constructor. | |
virtual | ~Attach () |
Default destructor. | |
Attach (const Attach &) | |
Copy constructor, does nothing since there is no data. More... | |
Protected Attributes | |
adsk::Data::Associations * | fMetadata |
Metadata stored as a pointer to allow differentiation between "no metadata" and "empty metadata" if necessary. | |
Helper class to provide a simple implementation the the adsk::Data::Attach interface.
Simply stores the metadata directly in the class.
Use this class as a mix-in to any class to which you want metadata added
AttachDirectly | ( | const AttachDirectly & | rhs | ) |
Copy constructor, duplicates the metadata, which is ref-counted.
[in] | rhs | AttachDirectly data to be copied |
|
overridevirtual |
Get the metadata associated with this object in an editable form.
Normally you wouldn't use this method to get metadata since modifying it directly bypasses the undo mechanism but sometimes that is the expediant thing to do.
Implements Attach.
|
overridevirtual |
Get the metadata associated with this object.
Implements Attach.
|
overridevirtual |
Replace the object's metadata.
[in] | newMetadata | New metadata to be set, replaces existing metadata |
Implements Attach.
|
overridevirtual |
Remove the object's metadata.
Implements Attach.