Murl::AttributeInfo Class Reference

A container for storing attribute information about a class. More...

#include "murl_attribute_info.h"

Classes

struct  Item
 A single attribute information item. More...
 

Public Member Functions

 AttributeInfo (const Item *items, UInt32 numberOfItems)
 The constructor. More...
 
UInt32 GetNumberOfItems () const
 Get the number of items. More...
 
const ItemGetItemByIndex (UInt32 index) const
 Get a single item by its index. More...
 
const ItemGetItemById (UInt32 id) const
 Get a single item by its ID. More...
 
const ItemGetItemByName (const String &name) const
 Get a single item by its name. More...
 
UInt32 GetIdByNameAndHash (const String &name, UInt32 hash) const
 Get the ID of an item by its name. More...
 
String GetNameById (UInt32 id) const
 Get a single item's name by its ID. More...
 

Detailed Description

A container for storing attribute information about a class.

This class holds an array of individual items each describing a single object attribute, which is used e.g. in XML graph nodes. An attribute usually (but not necessarily) refers to a single object property (see Murl::PropertyInfo). It describes which elements or components of that property are modified when the attribute is set. See also Murl::IFactoryObject.

Constructor & Destructor Documentation

◆ AttributeInfo()

Murl::AttributeInfo::AttributeInfo ( const Item items,
UInt32  numberOfItems 
)
inline

The constructor.

Parameters
itemsAn array of individual attribute info items. Must be delimited by an item with the highest ID in the array and an empty name.
numberOfItemsThe number of items in the array, including the terminating item.

References Murl::AttributeInfo::Item::mId.

Member Function Documentation

◆ GetNumberOfItems()

UInt32 Murl::AttributeInfo::GetNumberOfItems ( ) const
inline

Get the number of items.

Returns
The number of items.

◆ GetItemByIndex()

const Item* Murl::AttributeInfo::GetItemByIndex ( UInt32  index) const
inline

Get a single item by its index.

Parameters
indexThe item index, from 0 to GetNumberOfItems()-1.
Returns
The item, or null if index is out of range.

◆ GetItemById()

const Item* Murl::AttributeInfo::GetItemById ( UInt32  id) const
inline

Get a single item by its ID.

Parameters
idThe ID to search for.
Returns
The item, or null if the given ID was not found.

◆ GetItemByName()

const Item* Murl::AttributeInfo::GetItemByName ( const String name) const
inline

Get a single item by its name.

Parameters
nameThe name to search for.
Returns
The item, or null if the given name was not found.

◆ GetIdByNameAndHash()

UInt32 Murl::AttributeInfo::GetIdByNameAndHash ( const String name,
UInt32  hash 
) const
inline

Get the ID of an item by its name.

Parameters
nameThe name to search for.
hashThe name string's hash value.
Returns
The ID, or the ID of the terminating element if the name was not found.

◆ GetNameById()

String Murl::AttributeInfo::GetNameById ( UInt32  id) const
inline

Get a single item's name by its ID.

Parameters
idThe ID to search for.
Returns
The item name, or an empty string if the given ID was not found.

The documentation for this class was generated from the following file:
  • murl_attribute_info.h


Copyright © 2011-2024 Spraylight GmbH.