https://mooseframework.inl.gov
Public Types | 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 Types

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

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 98 of file WebServerControl.h.

Member Typedef Documentation

◆ value_type

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

The underlying type of the value.

Definition at line 76 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 101 of file WebServerControl.h.

101  : TypedValueBase<T>(name, type)
102  {
103  }

◆ 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 104 of file WebServerControl.h.

107  : TypedValueBase<T>(name, type, getScalarJSONValue<T, json_type>(json_value))
108  {
109  }

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

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