PrevUpHomeNext

Attribute list

Instantiations of AttributeList are used to build a list of attribute / value pairs. Such lists are usually built by sequentially adding new pairs and then by finishing the list.

FinishedAttributeLists are used to store and pass the underlying list of values to the functions requiring them.

template <typename AttribKind, class Traits>
class FinishedAttributeList
{
public:
	FinishedAttributeList(const FinishedAttributeList& that);
	FinishedAttributeList(FinishedAttributeList&& tmp);
};

template <typename AttribKind, class ValueToAttribMap, class Traits>
class AttributeList
{
public:
	AttributeList(void); 1

	AttributeList& Add(AttribKind attrib, <Unspecified> value); 2

	template <typename AttribValueType>
	AttributeList& Add(AttribValueType value); 3

	template <typename AttribValueType>
	AttributeList& Add(Bitfield<AttribValueType> bits); 4

	AttributeList& DontCare(AttribKind attrib); 5

	bool Finished(void) const; 6

	AttributeList& Finish(void); 7

	FinishedAttributeList<AttribKind, Traits> Get(void) const; 8
};

1

Creates an empty list of attributes/

2

Adds a new attribute/value pair. This list must not be finished.

3

Adds a new enumerated attribute value. This list must not be finished.

4

Adds a new bitfield attribute value. This list must not be finished.

5

Sets the attribute value to don't care. This list must not be finished.

6

Returns true if the list of attributes has been finished.

7

Finishes this list of attributes. After doing that new attribute values cannot be added.

8

Returns a finished attribute list.

[Note] Note

This function does not call the Finish function on this attribute list, it must be called manually before calling Get

.


PrevUpHomeNext