https://mooseframework.inl.gov
Public Member Functions | Private Attributes | List of all members
Moose::WebServerControlTypeRegistry::RegisteredTypeBase Class Referenceabstract

Base registry class for a type that is used to build values. More...

#include <WebServerControlTypeRegistry.h>

Inheritance diagram for Moose::WebServerControlTypeRegistry::RegisteredTypeBase:
[legend]

Public Member Functions

 RegisteredTypeBase (const std::string &type)
 
virtual ~RegisteredTypeBase ()
 
const std::string & type () const
 
virtual std::unique_ptr< ControlledValueBasebuild (const std::string &name, const nlohmann::json &json_value) const =0
 Builds a value with the given type, name name, and JSON value json_value. More...
 
virtual std::unique_ptr< ControlledValueBasebuild (const std::string &name) const =0
 Builds a value with the given type, name name, and a default value. More...
 

Private Attributes

const std::string _type
 The string representation of the underlying type. More...
 

Detailed Description

Base registry class for a type that is used to build values.

Definition at line 83 of file WebServerControlTypeRegistry.h.

Constructor & Destructor Documentation

◆ RegisteredTypeBase()

Moose::WebServerControlTypeRegistry::RegisteredTypeBase::RegisteredTypeBase ( const std::string &  type)

Definition at line 43 of file WebServerControlTypeRegistry.C.

44  : _type(type)
45 {
46 }
const std::string _type
The string representation of the underlying type.

◆ ~RegisteredTypeBase()

virtual Moose::WebServerControlTypeRegistry::RegisteredTypeBase::~RegisteredTypeBase ( )
inlinevirtual

Definition at line 88 of file WebServerControlTypeRegistry.h.

88 {}

Member Function Documentation

◆ build() [1/2]

virtual std::unique_ptr<ControlledValueBase> Moose::WebServerControlTypeRegistry::RegisteredTypeBase::build ( const std::string &  name,
const nlohmann::json &  json_value 
) const
pure virtual

Builds a value with the given type, name name, and JSON value json_value.

This will be called on receipt of a controllable value on rank 0 in the WebServerControl. It will at that point parse the value from JSON and store it. Later on during sync, it will be used to broadcast the value and then locally set it.

Implemented in Moose::WebServerControlTypeRegistry::RegisteredType< ControlledValue, ValueType >.

◆ build() [2/2]

virtual std::unique_ptr<ControlledValueBase> Moose::WebServerControlTypeRegistry::RegisteredTypeBase::build ( const std::string &  name) const
pure virtual

Builds a value with the given type, name name, and a default value.

This will be called by the WebServerControl on ranks that are not rank 0. It will be used during the sync step, where the value is broadcasted to the rest of the ranks and then set locally.

Implemented in Moose::WebServerControlTypeRegistry::RegisteredType< ControlledValue, ValueType >.

◆ type()

const std::string& Moose::WebServerControlTypeRegistry::RegisteredTypeBase::type ( ) const
inline
Returns
The string representation of the type

Definition at line 93 of file WebServerControlTypeRegistry.h.

Referenced by Moose::WebServerControlTypeRegistry::RegisteredType< ControlledValue, ValueType >::build().

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

Member Data Documentation

◆ _type

const std::string Moose::WebServerControlTypeRegistry::RegisteredTypeBase::_type
private

The string representation of the underlying type.

Definition at line 115 of file WebServerControlTypeRegistry.h.

Referenced by type().


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