Wrapper class providing a uniform interface for historical/non-historical Node, Element, and Condition.
More...
#include <proxies.h>
|
| | EntityProxy ()=delete |
| | Delete the default constructor to prevent storing nullptr. More...
|
| |
| | EntityProxy (QualifiedEntity &rEntity) noexcept |
| | Constructor creating a valid proxy, wrapping the input entity. More...
|
| |
| template<class TValue > |
| bool | HasValue (const Variable< TValue > &rVariable) const noexcept |
| | Check whether the entity has a value for the provided variable. More...
|
| |
| template<class TValue > |
| std::conditional_t< std::is_integral_v< TValue >||std::is_floating_point_v< TValue >, TValue, const TValue & > | GetValue (const Variable< TValue > &rVariable) const |
| | Fetch the value corresponding to the input variable in the wrapped entity. More...
|
| |
| template<class TValue , std::enable_if_t<!std::is_same_v< TValue, void > &&TMutable, bool > = true> |
| TValue & | GetValue (const Variable< TValue > &rVariable) |
| | Fetch the value corresponding to the input variable in the wrapped entity. More...
|
| |
| template<class TValue , std::enable_if_t<!std::is_same_v< TValue, void > &&TMutable, bool > = true> |
| void | SetValue (const Variable< TValue > &rVariable, std::conditional_t< std::is_integral_v< TValue >||std::is_floating_point_v< TValue >, TValue, const TValue & > Value) |
| | Overwrite the value corresponding to the input variable in the wrapped entity. More...
|
| |
| const UnqualifiedEntity & | GetEntity () const |
| | Immutable access to the wrapped entity. More...
|
| |
| QualifiedEntity & | GetEntity () |
| | Mutable or immutable access to the wrapped entity, depending on TMutable. More...
|
| |
template<Globals::DataLocation TLocation, bool TMutable>
class Kratos::EntityProxy< TLocation, TMutable >
Wrapper class providing a uniform interface for historical/non-historical Node, Element, and Condition.
EntityProxy exposes common functionality related accessing stored Variable s within an entity, without additional runtime overhead. In this context, an entity can refer to:
◆ EntityProxy() [1/2]
template<Globals::DataLocation TLocation, bool TMutable>
Delete the default constructor to prevent storing nullptr.
◆ EntityProxy() [2/2]
template<Globals::DataLocation TLocation, bool TMutable>
Constructor creating a valid proxy, wrapping the input entity.
- Parameters
-
| rEntity | Entity that will be accessed when member functions are called. |
- Warning
- This proxy is invalidated when the container holding rEntity invalidates its iterators or when rEntity is destroyed.
◆ GetEntity() [1/2]
template<Globals::DataLocation TLocation, bool TMutable>
Mutable or immutable access to the wrapped entity, depending on TMutable.
◆ GetEntity() [2/2]
template<Globals::DataLocation TLocation, bool TMutable>
Immutable access to the wrapped entity.
◆ GetValue() [1/2]
template<Globals::DataLocation TLocation, bool TMutable>
template<class TValue , std::enable_if_t<!std::is_same_v< TValue, void > &&TMutable, bool > = true>
Fetch the value corresponding to the input variable in the wrapped entity.
◆ GetValue() [2/2]
template<Globals::DataLocation TLocation, bool TMutable>
template<class TValue >
| std::conditional_t<std::is_integral_v<TValue> || std::is_floating_point_v<TValue>, TValue, const TValue&> Kratos::EntityProxy< TLocation, TMutable >::GetValue |
( |
const Variable< TValue > & |
rVariable | ) |
const |
|
inline |
Fetch the value corresponding to the input variable in the wrapped entity.
◆ HasValue()
template<Globals::DataLocation TLocation, bool TMutable>
template<class TValue >
Check whether the entity has a value for the provided variable.
◆ SetValue()
template<Globals::DataLocation TLocation, bool TMutable>
template<class TValue , std::enable_if_t<!std::is_same_v< TValue, void > &&TMutable, bool > = true>
| void Kratos::EntityProxy< TLocation, TMutable >::SetValue |
( |
const Variable< TValue > & |
rVariable, |
|
|
std::conditional_t< std::is_integral_v< TValue >||std::is_floating_point_v< TValue >, TValue, const TValue & > |
Value |
|
) |
| |
|
inline |
Overwrite the value corresponding to the input variable in the wrapped entity.
◆ ContainerProxy< EntityProxy >
template<Globals::DataLocation TLocation, bool TMutable>
The documentation for this class was generated from the following file:
- /home/runner/work/Documentation/Documentation/master/kratos/utilities/proxies.h