AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::slam::policies::RuntimeValue< Tag > Class Template Reference

Shared storage core for a runtime-settable scalar value policy. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/slam/policies/ValuePolicies.hpp>

Inheritance diagram for axom::slam::policies::RuntimeValue< Tag >:

Public Types

using TagType = Tag
 
using IntType = decltype(Tag::defaultValue())
 

Public Member Functions

constexpr AXOM_HOST_DEVICE RuntimeValue (IntType val=Tag::defaultValue())
 
constexpr AXOM_HOST_DEVICE auto value () const
 
constexpr AXOM_HOST_DEVICE auto & value ()
 
constexpr auto operator() () const
 
constexpr auto & operator() ()
 
constexpr bool isValid (bool) const
 

Protected Attributes

IntType m_value
 

Detailed Description

template<typename Tag>
class axom::slam::policies::RuntimeValue< Tag >

Shared storage core for a runtime-settable scalar value policy.

Stores a single IntType whose default is supplied by Tag. Provides the generic value() accessors (const and mutable), operator(), and an isValid() delegating to the tag's predicate.

Leaf policies derive from this and add their named accessor (size() / stride() / offset()).

Template Parameters
Taga value-policy tag (SizeTag / StrideTag / OffsetTag) carrying the IntType, default value and validity predicate.

Member Typedef Documentation

◆ TagType

template<typename Tag >
using axom::slam::policies::RuntimeValue< Tag >::TagType = Tag

◆ IntType

template<typename Tag >
using axom::slam::policies::RuntimeValue< Tag >::IntType = decltype(Tag::defaultValue())

Constructor & Destructor Documentation

◆ RuntimeValue()

template<typename Tag >
constexpr AXOM_HOST_DEVICE axom::slam::policies::RuntimeValue< Tag >::RuntimeValue ( IntType  val = Tag::defaultValue())
inlineconstexpr

Member Function Documentation

◆ value() [1/2]

template<typename Tag >
constexpr AXOM_HOST_DEVICE auto axom::slam::policies::RuntimeValue< Tag >::value ( ) const
inlineconstexpr

◆ value() [2/2]

template<typename Tag >
constexpr AXOM_HOST_DEVICE auto& axom::slam::policies::RuntimeValue< Tag >::value ( )
inlineconstexpr

◆ operator()() [1/2]

template<typename Tag >
constexpr auto axom::slam::policies::RuntimeValue< Tag >::operator() ( ) const
inlineconstexpr

◆ operator()() [2/2]

template<typename Tag >
constexpr auto& axom::slam::policies::RuntimeValue< Tag >::operator() ( )
inlineconstexpr

◆ isValid()

template<typename Tag >
constexpr bool axom::slam::policies::RuntimeValue< Tag >::isValid ( bool  ) const
inlineconstexpr

Member Data Documentation

◆ m_value

template<typename Tag >
IntType axom::slam::policies::RuntimeValue< Tag >::m_value
protected

The documentation for this class was generated from the following file: