https://mooseframework.inl.gov
Public Member Functions | List of all members
WebServerControl::ScalarValue< T, json_type > Class Template Reference

Class that stores a scalar controllable value to be set. More...

#include <WebServerControl.h>

Inheritance diagram for WebServerControl::ScalarValue< T, json_type >:
[legend]

Public Member Functions

 ScalarValue (const std::string &name, const std::string &type)
 
 ScalarValue (const std::string &name, const std::string &type, const miniJson::Json &json_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
 

Detailed Description

template<typename T, miniJson::JsonType json_type>
class WebServerControl::ScalarValue< T, json_type >

Class that stores a scalar controllable value to be set.

Definition at line 83 of file WebServerControl.h.

Constructor & Destructor Documentation

◆ ScalarValue() [1/2]

template<typename T , miniJson::JsonType json_type>
WebServerControl::ScalarValue< T, json_type >::ScalarValue ( const std::string &  name,
const std::string &  type 
)
inline

Definition at line 86 of file WebServerControl.h.

86  : TypedValueBase<T>(name, type)
87  {
88  }

◆ ScalarValue() [2/2]

template<typename T , miniJson::JsonType json_type>
WebServerControl::ScalarValue< T, json_type >::ScalarValue ( const std::string &  name,
const std::string &  type,
const miniJson::Json &  json_value 
)
inline

Definition at line 89 of file WebServerControl.h.

92  : TypedValueBase<T>(name, type, getScalarJSONValue<T, json_type>(json_value))
93  {
94  }

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)
inlinefinaloverridevirtualinherited

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
inlineinherited
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.

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