https://mooseframework.inl.gov
Public Types | Public Member Functions | Private Attributes | List of all members
WebServerControl::TypedValueBase< T > Class Template Reference

Base class for a controllable value with a given type and name. More...

#include <WebServerControl.h>

Inheritance diagram for WebServerControl::TypedValueBase< T >:
[legend]

Public Types

using value_type = T
 The underlying type of the value. More...
 

Public Member Functions

 TypedValueBase (const std::string &name, const std::string &type)
 
 TypedValueBase (const std::string &name, const std::string &type, const T &value)
 
const T & value () const
 
virtual void setControllableValue (WebServerControl &control) override final
 Sets the controllable value given the name and type via the controllable interface in control. More...
 
const std::string & name () const
 
const std::string & type () const
 

Private Attributes

_value
 The underlying value. More...
 

Detailed Description

template<typename T>
class WebServerControl::TypedValueBase< T >

Base class for a controllable value with a given type and name.

Definition at line 66 of file WebServerControl.h.

Member Typedef Documentation

◆ value_type

template<typename T>
using WebServerControl::TypedValueBase< T >::value_type = T

The underlying type of the value.

Definition at line 76 of file WebServerControl.h.

Constructor & Destructor Documentation

◆ TypedValueBase() [1/2]

template<typename T>
WebServerControl::TypedValueBase< T >::TypedValueBase ( const std::string &  name,
const std::string &  type 
)
inline

Definition at line 69 of file WebServerControl.h.

69 : ValueBase(name, type) {}
ValueBase(const std::string &name, const std::string &type)
Constructor.

◆ TypedValueBase() [2/2]

template<typename T>
WebServerControl::TypedValueBase< T >::TypedValueBase ( const std::string &  name,
const std::string &  type,
const T &  value 
)
inline

Definition at line 70 of file WebServerControl.h.

72  {
73  }
T _value
The underlying value.
ValueBase(const std::string &name, const std::string &type)
Constructor.

Member Function Documentation

◆ name()

const std::string& Moose::WebServerControlTypeRegistry::ValueBase::name ( ) const
inlineinherited
Returns
The name that the value is for

Definition at line 57 of file WebServerControlTypeRegistry.h.

Referenced by WebServerControl::TypedValueBase< std::vector< T > >::setControllableValue().

57 { return _name; }
const std::string _name
The name that the value is for.

◆ setControllableValue()

template<typename T>
virtual void WebServerControl::TypedValueBase< T >::setControllableValue ( WebServerControl control)
inlinefinaloverridevirtual

Sets the controllable value given the name and type via the controllable interface in control.

Will broadcast the value for setting it.

Implements Moose::WebServerControlTypeRegistry::ValueBase.

Definition at line 83 of file WebServerControl.h.

84  {
85  control.comm().broadcast(_value);
86  control.setControllableValueByName<T>(name(), value());
87  }
const Parallel::Communicator & comm() const
T _value
The underlying value.
void broadcast(T &data, const unsigned int root_id=0, const bool identical_sizes=false) const
void setControllableValueByName(const std::string &name, const T &value)
Definition: Control.h:251

◆ type()

const std::string& Moose::WebServerControlTypeRegistry::ValueBase::type ( ) const
inlineinherited
Returns
The string representation of the type

Definition at line 61 of file WebServerControlTypeRegistry.h.

61 { return _type; }
const std::string _type
The string representation of the type.

◆ value()

template<typename T>
const T& WebServerControl::TypedValueBase< T >::value ( ) const
inline
Returns
The underlying value

Definition at line 81 of file WebServerControl.h.

Referenced by WebServerControl::TypedValueBase< std::vector< T > >::setControllableValue().

81 { return _value; }
T _value
The underlying value.

Member Data Documentation

◆ _value

template<typename T>
T WebServerControl::TypedValueBase< T >::_value
private

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