|
xentara-plugin v2.0.6
The Xentara Plugin Framework
|
A reference to an attribute of a specific Xentara element. More...
#include <xentara/model/ElementAttribute.hpp>
Public Member Functions | |
| ElementAttribute ()=default | |
| Constructor for a null reference. | |
| ElementAttribute (const std::weak_ptr< Element > &element, std::weak_ptr< const Attribute > attribute) | |
| Constructor that sets the element and the attribute. | |
| operator bool () const noexcept | |
| Boolean operator. | |
| auto | primaryKey () const -> std::string |
| Gets the primary key of the attribute. | |
| auto | readHandle () const -> data::ReadHandle |
| Gets a read handle for the attribute. | |
| auto | writeHandle () const -> data::WriteHandle |
| Gets a write handle for the attribute. | |
| auto | lockElement () const -> std::shared_ptr< Element > |
| Obtains a shared pointer to the element. | |
| auto | lockAttribute () const -> std::shared_ptr< const Attribute > |
| Obtains a shared pointer to the attribute. | |
| auto | lock () const -> std::pair< std::shared_ptr< Element >, std::shared_ptr< const Attribute > > |
| Obtains a shared pointer to both the element and the attribute. | |
A reference to an attribute of a specific Xentara element.
This is a convenience class that contains a weak reference to an element, and a weak reference to an attribute.
|
default |
Constructor for a null reference.
This constructor contstruct a null object that does not contain a reference to any elements or attributes. You must assign avalid object to this object before using it.
| xentara::model::ElementAttribute::ElementAttribute | ( | const std::weak_ptr< Element > & | element, |
| std::weak_ptr< const Attribute > | attribute | ||
| ) |
Constructor that sets the element and the attribute.
Constructs a reference to a specific attribute of a specific element.
| element | The element. This can be a null pointer if and only if attribute is also a null pointer, in which case a null reference is created, and this constructor is equalivalent to the default constructor. |
| attribute | The attribute. This can be a null pointer if and only if element is also a null pointer, in which case a null reference is created, and this constructor is equalivalent to the default constructor. |
| auto xentara::model::ElementAttribute::lock | ( | ) | const -> std::pair<std::shared_ptr<Element>, std::shared_ptr<const Attribute>> |
Obtains a shared pointer to both the element and the attribute.
| auto xentara::model::ElementAttribute::lockAttribute | ( | ) | const -> std::shared_ptr<const Attribute> |
Obtains a shared pointer to the attribute.
| auto xentara::model::ElementAttribute::lockElement | ( | ) | const -> std::shared_ptr<Element> |
Obtains a shared pointer to the element.
|
explicitnoexcept |
Boolean operator.
This operator checks whether the object is not a null reference.
| auto xentara::model::ElementAttribute::primaryKey | ( | ) | const -> std::string |
Gets the primary key of the attribute.
| auto xentara::model::ElementAttribute::readHandle | ( | ) | const -> data::ReadHandle |
Gets a read handle for the attribute.
| auto xentara::model::ElementAttribute::writeHandle | ( | ) | const -> data::WriteHandle |
Gets a write handle for the attribute.