struct CCL::ISkinElement

Overview

Basic skin element interface, use IContainer to access child elements. More…

#include <iskinmodel.h>

struct ISkinElement: public CCL::IUnknown
{
    // methods

    virtual StringID CCL_API getName () const = 0;
    virtual void CCL_API setName (StringID name) = 0;
    virtual void CCL_API getComment (String& comment) const = 0;
    virtual void CCL_API setComment (StringRef comment) = 0;

    virtual tbool CCL_API getSourceInfo (
        String& fileName,
        int32& lineNumber,
        IUrl* packageUrl = nullptr
    ) const = 0;

    virtual void CCL_API setSourceFile (StringRef fileName) = 0;
    virtual void CCL_API getAttributes (IAttributeList& attributes) const = 0;
    virtual void CCL_API setAttributes (const IAttributeList& attributes) = 0;
    virtual tbool CCL_API getAttributeValue (Variant& value, StringID name) const = 0;

    virtual void CCL_API setAttributeValue (
        StringID name,
        VariantRef value,
        int index = -1
    ) = 0;

    virtual tbool CCL_API removeAttribute (StringID name, int* oldIndex = nullptr) = 0;
    virtual const ITypeInfo*CCL_API getElementClass () const = 0;
    virtual void CCL_API clone (ISkinElement*& element) const = 0;
};

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

Basic skin element interface, use IContainer to access child elements.

Methods

virtual StringID CCL_API getName () const = 0

Get element name.

virtual void CCL_API setName (StringID name) = 0

Set element name.

virtual void CCL_API getComment (String& comment) const = 0

Get optional comment for developers and tool support.

Note that this is an explicit attribute, not a comment ignored by the XML/JSON parser.

virtual void CCL_API setComment (StringRef comment) = 0

Set element comment.

virtual tbool CCL_API getSourceInfo (
    String& fileName,
    int32& lineNumber,
    IUrl* packageUrl = nullptr
) const = 0

Get info about source code.

virtual void CCL_API setSourceFile (StringRef fileName) = 0

Set source file name.

virtual void CCL_API getAttributes (IAttributeList& attributes) const = 0

Get all element attributes.

virtual void CCL_API setAttributes (const IAttributeList& attributes) = 0

Set all element attributes.

virtual tbool CCL_API getAttributeValue (Variant& value, StringID name) const = 0

Get element attribute value.

virtual void CCL_API setAttributeValue (
    StringID name,
    VariantRef value,
    int index = -1
) = 0

Set element attribute value.

virtual tbool CCL_API removeAttribute (StringID name, int* oldIndex = nullptr) = 0

Remove element attribute.

virtual const ITypeInfo*CCL_API getElementClass () const = 0

Get element class.

Note that this is different from the type information returned via IObject as it corresponds to the public XML or JSON skin type.

virtual void CCL_API clone (ISkinElement*& element) const = 0

Clone element.