class CCL::AttributeWriter

Overview

Helper class to write attributes by type. More…

#include <iattributelist.h>

class AttributeWriter
{
public:
    // methods

    virtual IAttributeList& getList () = 0;
    IAttributeList* newAttributes ();
    IAttributeQueue* newAttributeQueue ();
    IAttributeList* newPersistentAttributes ();
    bool set (StringID id, int64 v);
    bool set (StringID id, int v);
    bool set (StringID id, tresult v);
    bool set (StringID id, bool b, int flags = 0);
    bool set (StringID id, double v);
    bool set (StringID id, StringRef s);
    bool set (StringID id, CStringRef s, TextEncoding encoding = Text::kASCII);
    bool set (StringID id, CStringPtr s, TextEncoding encoding = Text::kASCII);
    bool set (StringID id, IUnknown* u, int flags = 0);
    bool queue (StringID id, IUnknown* u, int flags = 0);
    IUnknown* unqueueUnknown (StringID id);
};

Detailed Documentation

Helper class to write attributes by type.

Methods

virtual IAttributeList& getList () = 0

Get associated attribute list.

IAttributeList* newAttributes ()

Create a new empty attribute list instance.

IAttributeQueue* newAttributeQueue ()

Create a new empty attribute queue instance.

IAttributeList* newPersistentAttributes ()

Create a new empty attribute list instance (alternative storage format).

bool set (StringID id, int64 v)

Set integer value (64 bit).

bool set (StringID id, int v)

Set integer value (32 bit).

bool set (StringID id, tresult v)

Set tresult value.

bool set (StringID id, bool b, int flags = 0)

Set boolean value.

bool set (StringID id, double v)

Set floating-point value (double precision).

bool set (StringID id, StringRef s)

Set string value.

bool set (StringID id, CStringRef s, TextEncoding encoding = Text::kASCII)

Set C-string value.

bool set (StringID id, CStringPtr s, TextEncoding encoding = Text::kASCII)

Set C-string value (by pointer).

bool set (StringID id, IUnknown* u, int flags = 0)

Set object with ownership flags.

bool queue (StringID id, IUnknown* u, int flags = 0)

Queue object value under given key.

IUnknown* unqueueUnknown (StringID id)

Unqueue (and remove) object.

Caller takes over ownership of object.