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

Class containing a value to be controlled. More...

#include <WebServerControl.h>

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

Public Types

using value_type = T
 The underlying type of the value.
 

Public Member Functions

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

Private Attributes

_value
 The underlying value.
 
const std::string _name
 The name that the value is for.
 
const std::string _type
 The string representation of the type.
 

Detailed Description

template<class T>
class WebServerControl::ControlledValue< T >

Class containing a value to be controlled.

Is responsible for building the value from JSON input, broadcasting the value over all ranks, and setting the value on all ranks.

These objects are registered in Moose::WebServerControlTypeRegistration.

Definition at line 57 of file WebServerControl.h.

Member Typedef Documentation

◆ value_type

template<class T >
using WebServerControl::ControlledValue< T >::value_type = T

The underlying type of the value.

Definition at line 70 of file WebServerControl.h.

Constructor & Destructor Documentation

◆ ControlledValue() [1/2]

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

Definition at line 60 of file WebServerControl.h.

62 {
63 }
Moose::WebServerControlTypeRegistry::ControlledValueBase ControlledValueBase

◆ ControlledValue() [2/2]

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

Definition at line 64 of file WebServerControl.h.

66 {
67 }

Member Function Documentation

◆ name()

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

Definition at line 59 of file WebServerControlTypeRegistry.h.

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

Referenced by WebServerControl::ControlledValue< T >::setControllableValue().

◆ setControllableValue()

template<class T >
virtual void WebServerControl::ControlledValue< T >::setControllableValue ( WebServerControl control)
inlinefinaloverridevirtual

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

Will broadcast the value and set it in the derived, type-aware class.

Implements Moose::WebServerControlTypeRegistry::ControlledValueBase.

Definition at line 72 of file WebServerControl.h.

73 {
74 control.comm().broadcast(_value);
76 }
void setControllableValueByName(const std::string &name, const T &value)
Definition Control.h:251
void broadcast(T &data, const unsigned int root_id=0, const bool identical_sizes=false) const
const Parallel::Communicator & comm() const

◆ type()

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

Definition at line 63 of file WebServerControlTypeRegistry.h.

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

Member Data Documentation

◆ _name

const std::string Moose::WebServerControlTypeRegistry::ControlledValueBase::_name
privateinherited

The name that the value is for.

Definition at line 75 of file WebServerControlTypeRegistry.h.

Referenced by Moose::WebServerControlTypeRegistry::ControlledValueBase::name().

◆ _type

const std::string Moose::WebServerControlTypeRegistry::ControlledValueBase::_type
privateinherited

The string representation of the type.

Definition at line 77 of file WebServerControlTypeRegistry.h.

Referenced by Moose::WebServerControlTypeRegistry::ControlledValueBase::type().

◆ _value

template<class T >
T WebServerControl::ControlledValue< T >::_value
private

The underlying value.

Definition at line 80 of file WebServerControl.h.

Referenced by WebServerControl::ControlledValue< T >::setControllableValue().


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