class CCL::AttributeReader

Overview

Helper class to read attributes by type. More…

#include <iattributelist.h>

class AttributeReader
{
public:
    // methods

    virtual const IAttributeList& getList () const = 0;
    Variant getVariant (StringID id) const;
    int64 getInt64 (StringID id) const;
    int getInt (StringID id) const;
    bool getBool (StringID id) const;
    double getFloat (StringID id) const;
    String getString (StringID id) const;
    MutableCString getCString (StringID id, TextEncoding encoding = Text::kASCII) const;
    IUnknown* getUnknown (StringID id) const;
    IUnknownIterator* newUnknownIterator (StringID id) const;
    tresult getResult (StringID id) const;
    bool getInt64 (int64& value, StringID id) const;
    bool getInt (int& value, StringID id) const;
    bool getBool (bool& value, StringID id) const;
    bool getFloat (double& value, StringID id) const;
    bool getFloat (float& value, StringID id) const;
    bool getString (String& value, StringID id) const;

    bool getCString (
        MutableCString& value,
        StringID id,
        TextEncoding encoding = Text::kASCII
    ) const;

    bool getUnknown (IUnknown*& value, StringID id) const;
};

Detailed Documentation

Helper class to read attributes by type.

Methods

virtual const IAttributeList& getList () const = 0

Get associated attribute list.

Variant getVariant (StringID id) const

Get variant value.

int64 getInt64 (StringID id) const

Get integer value (64 bit).

int getInt (StringID id) const

Get integer value (32 bit).

bool getBool (StringID id) const

Get boolean value.

double getFloat (StringID id) const

Get floating-point value (double precision).

String getString (StringID id) const

Get string value (possibly converted).

MutableCString getCString (StringID id, TextEncoding encoding = Text::kASCII) const

Get C-string value (possibly converted).

IUnknown* getUnknown (StringID id) const

Get object value.

The attribute list maintains ownership.

IUnknownIterator* newUnknownIterator (StringID id) const

Create iterator for attribute queue, objects are of type IAttribute.

tresult getResult (StringID id) const

Get tresult value.

bool getInt64 (int64& value, StringID id) const

Get integer value (64 bit).

Returns true, if value has been set.

bool getInt (int& value, StringID id) const

Get integer value (32 bit).

Returns true, if value has been set.

bool getBool (bool& value, StringID id) const

Get boolean value.

Returns true, if value has been set.

bool getFloat (double& value, StringID id) const

Get floating-point value (double precision).

Returns true, if value has been set.

bool getFloat (float& value, StringID id) const

Get floating-point value (single precision).

Returns true, if value has been set.

bool getString (String& value, StringID id) const

Get string value (empty if type isn’t string).

Returns true, if value has been set.

bool getCString (
    MutableCString& value,
    StringID id,
    TextEncoding encoding = Text::kASCII
) const

Get C-string value (empty if type isn’t string).

Returns true, if value has been set.

bool getUnknown (IUnknown*& value, StringID id) const

Get object value.

The attribute list maintains ownership. Returns true, if value has been set.