LCOV - code coverage report
Current view: top level - src/actions - StartWebServerControlAction.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 7edd10 Lines: 12 13 92.3 %
Date: 2025-11-11 08:32:45 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://mooseframework.inl.gov
       3             : //*
       4             : //* All rights reserved, see COPYRIGHT for full restrictions
       5             : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
       6             : //*
       7             : //* Licensed under LGPL 2.1, please see LICENSE for details
       8             : //* https://www.gnu.org/licenses/lgpl-2.1.html
       9             : 
      10             : #include "StartWebServerControlAction.h"
      11             : #include "ChainControl.h"
      12             : #include "FEProblemBase.h"
      13             : #include "WebServerControl.h"
      14             : 
      15             : registerMooseAction("MooseApp", StartWebServerControlAction, "start_webservercontrol");
      16             : 
      17             : InputParameters
      18       69150 : StartWebServerControlAction::validParams()
      19             : {
      20       69150 :   InputParameters params = Action::validParams();
      21       69150 :   params.addClassDescription("Starts the web server(s) for the WebServerControl objects.");
      22       69150 :   return params;
      23           0 : }
      24             : 
      25       69150 : StartWebServerControlAction::StartWebServerControlAction(const InputParameters & parameters)
      26       69150 :   : Action(parameters)
      27             : {
      28       69150 : }
      29             : 
      30             : void
      31       62769 : StartWebServerControlAction::act()
      32             : {
      33       64390 :   for (auto & control_ptr : _problem->getControlWarehouse().getObjects())
      34        1625 :     if (auto wsc_ptr = dynamic_cast<WebServerControl *>(control_ptr.get()))
      35         191 :       wsc_ptr->startServer({});
      36       62765 : }

Generated by: LCOV version 1.14