struct CCL::IObjectTable

Overview

The object table is used to share global objects between modules. More…

#include <iobjecttable.h>

struct IObjectTable: public CCL::IUnknown
{
    // enums

    enum Flags;

    // methods

    virtual tresult CCL_API registerObject (
        IUnknown* obj,
        UIDRef id,
        StringID name,
        int flags = 0
    ) = 0;

    virtual tresult CCL_API unregisterObject (IUnknown* obj) = 0;
    virtual int CCL_API countObjects () const = 0;
    virtual StringID CCL_API getObjectName (int index) const = 0;
    virtual IUnknown*CCL_API getObjectByIndex (int index) const = 0;
    virtual IUnknown*CCL_API getObjectByID (UIDRef id) const = 0;
    virtual IUnknown*CCL_API getObjectByName (StringID name) const = 0;
    virtual IUnknown*CCL_API getObjectByUrl (UrlRef url) const = 0;
    DECLARE_STRINGID_MEMBER (kHostApp);
};

Inherited Members

public:
    // methods

    virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0;
    virtual unsigned int CCL_API retain () = 0;
    virtual unsigned int CCL_API release () = 0;

Detailed Documentation

The object table is used to share global objects between modules.

<>

Methods

virtual tresult CCL_API registerObject (
    IUnknown* obj,
    UIDRef id,
    StringID name,
    int flags = 0
) = 0

Register object with unique identifier and name.

virtual tresult CCL_API unregisterObject (IUnknown* obj) = 0

Unregister object.

virtual int CCL_API countObjects () const = 0

Get number of objects.

virtual StringID CCL_API getObjectName (int index) const = 0

Get name of object at given index.

virtual IUnknown*CCL_API getObjectByIndex (int index) const = 0

Get object by table index.

virtual IUnknown*CCL_API getObjectByID (UIDRef id) const = 0

Get object by unique identifier.

virtual IUnknown*CCL_API getObjectByName (StringID name) const = 0

Get object by name.

virtual IUnknown*CCL_API getObjectByUrl (UrlRef url) const = 0

Get object by URL.