A single value on an AutoStack, owned by the scope that pushed it.
More...
#include <bond/stl/autostack.h>
template<typename ValueType>
class Bond::AutoStack< ValueType >::Element
A single value on an AutoStack, owned by the scope that pushed it.
An Element is pushed onto its stack when it is constructed and popped when it is destroyed. An Element cannot be copied or moved.
◆ Element() [1/3]
template<typename ValueType>
Constructs an Element holding a default constructed value and pushes it onto the given stack.
- Parameters
-
| stack | The stack onto which the Element is pushed. It must outlive the Element. |
◆ Element() [2/3]
template<typename ValueType>
template<typename... Args>
Constructs an Element holding a value constructed from the given arguments and pushes it onto the given stack.
- Parameters
-
| stack | The stack onto which the Element is pushed. It must outlive the Element. |
| args | The arguments forwarded to the constructor of the value. |
◆ ~Element()
template<typename ValueType>
Pops the Element from its stack. The Element must be at the top of the stack.
◆ Element() [3/3]
template<typename ValueType>
◆ GetNext() [1/2]
template<typename ValueType>
◆ GetNext() [2/2]
template<typename ValueType>
◆ GetValue() [1/2]
template<typename ValueType>
| const ValueType & Bond::AutoStack< ValueType >::Element::GetValue |
( |
| ) |
const |
|
inlinenoexcept |
Returns a const reference to the value held by the Element.
◆ GetValue() [2/2]
template<typename ValueType>
Returns a reference to the value held by the Element.
◆ operator const ValueType &()
template<typename ValueType>
| Bond::AutoStack< ValueType >::Element::operator const ValueType & |
( |
| ) |
const |
|
inlinenoexcept |
Implicitly converts the Element to a const reference to its value.
◆ operator ValueType &()
template<typename ValueType>
Implicitly converts the Element to a reference to its value.
◆ operator=() [1/3]
template<typename ValueType>
◆ operator=() [2/3]
template<typename ValueType>
Assigns a copy of the given value to the Element.
- Parameters
-
| value | The value to be copied. |
- Returns
- A reference to this Element.
◆ operator=() [3/3]
template<typename ValueType>
Moves the given value into the Element.
- Parameters
-
| value | The value to be moved. |
- Returns
- A reference to this Element.
◆ SetValue() [1/2]
template<typename ValueType>
| void Bond::AutoStack< ValueType >::Element::SetValue |
( |
const ValueType & | value | ) |
|
|
inline |
Assigns a copy of the given value to the Element.
- Parameters
-
| value | The value to be copied. |
◆ SetValue() [2/2]
template<typename ValueType>
Moves the given value into the Element.
- Parameters
-
| value | The value to be moved. |
◆ AutoStack
template<typename ValueType>
◆ ConstIterator
template<typename ValueType>
| friend class ConstIterator |
|
friend |
◆ Iterator
template<typename ValueType>
◆ mValue
template<typename ValueType>
The documentation for this class was generated from the following file:
- include/bond/stl/autostack.h