class SetBlock : public Block

A block for storing sets of elements, nodes, element faces, element edges, element nodes.

Public Types

enum ItemType

Item types for SetBlock.


enumerator ELEMENT

Element set.

enumerator ELEMENT_FACE

Element face set.

enumerator ELEMENT_EDGE

Element edge set.

enumerator ELEMENT_NODE

Element node set.

enumerator NODE

Node set.


Unknown item type.

Public Functions

SetBlock(int blockId, bool itemsReferencedByIds)

Constructs an empty set block.

blockId must be >= 0 and unique for all node blocks within a database. itemsByIds specifies if set items will be supplied by their or not.

virtual ~SetBlock()
int setId() const

Returns the set id.

void setSetId(int setId)

Sets the set id.

Str setName() const

Returns the name of the set.

void setSetName(const Str &name)

Sets the name to name.

ItemType itemType() const

Returns the item type of this set.

void setItemType(ItemType itemType)

Sets the item type.

size_t totalItemCount() const

Returns the total number of items found in all groups in this set.

bool itemsReferencedById() const

Returns true if the items (elements or nodes) are referenced by id, false if by index Note: Sub items are always referenced by zero based index.

int itemGroupCount() const

Returns the number of groups in this set.

SetItemGroup *itemGroup(size_t index)

Returns the groups at index.

const SetItemGroup *itemGroup(size_t index) const

Returns the groups at index.

bool addItemGroup(SetItemGroup *itemGroup)

Adds an item group to this set.

void addItem(int itemIdOrIndex, int itemGroupId)

Adds an item.

void addItems(const int *itemIndicesOrIds, size_t itemCount, int itemGroupId)

Adds items from given array itemIndicesOrIds.