https://mooseframework.inl.gov
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 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 54 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 57 of file WebServerControl.h.

57 : 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 58 of file WebServerControl.h.

60  {
61  }
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 55 of file WebServerControlTypeRegistry.h.

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

55 { 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 68 of file WebServerControl.h.

69  {
70  control.comm().broadcast(_value);
71  control.setControllableValueByName<T>(name(), value());
72  }
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:249

◆ type()

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

Definition at line 59 of file WebServerControlTypeRegistry.h.

59 { 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 66 of file WebServerControl.h.

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

66 { 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: