phaser-server  0.0.7
Public Member Functions | Protected Member Functions | List of all members
CavityNameResponse Class Reference

Provide the names of the RF cavities. More...

#include <response.h>

Inheritance diagram for CavityNameResponse:
Inheritance graph
[legend]
Collaboration diagram for CavityNameResponse:
Collaboration graph
[legend]

Public Member Functions

 CavityNameResponse (const std::vector< std::string > &names)
 Construct an instance. More...
 
- Public Member Functions inherited from JsonResponse
 JsonResponse (Response_t type)
 Construct with the outcome enumeration.
 
std::string operator() (void)
 Get the JSON encoded response string.
 

Protected Member Functions

virtual void Create (JSONObject &) override
 Add the cavity names as a JSON array value tagged as "cavities". More...
 

Additional Inherited Members

- Public Types inherited from JsonResponse
enum class  Response_t { R_ok , R_warning , R_error }
 Status of processed request.
 

Detailed Description

Provide the names of the RF cavities.

The standard "ok" response has a JSON array object as the value of the tag "cavities".

Note
The collection of names passed to the constructor must stay in scope for the lifetime of the instance.

Constructor & Destructor Documentation

◆ CavityNameResponse()

CavityNameResponse::CavityNameResponse ( const std::vector< std::string > &  names)

Construct an instance.

Note
The name collection must stay in scope for the life of the object.
Parameters
names- RF cavity names.

Member Function Documentation

◆ Create()

void CavityNameResponse::Create ( JSONObject &  root)
overrideprotectedvirtual

Add the cavity names as a JSON array value tagged as "cavities".

Parameters
root- Collection of JSON objects to update.

Implements JsonResponse.


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