PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
kcenon::pacs::web::metadata_response Struct Reference

Response for selective metadata retrieval. More...

#include <metadata_service.h>

Collaboration diagram for kcenon::pacs::web::metadata_response:
Collaboration graph

Static Public Member Functions

static metadata_response ok (std::unordered_map< std::string, std::string > tag_map)
 Create a success result.
 
static metadata_response error (std::string message)
 Create an error result.
 

Public Attributes

bool success {false}
 Whether the operation succeeded.
 
std::string error_message
 Error message if failed.
 
std::unordered_map< std::string, std::string > tags
 Retrieved tag values.
 

Detailed Description

Response for selective metadata retrieval.

Definition at line 91 of file metadata_service.h.

Member Function Documentation

◆ error()

static metadata_response kcenon::pacs::web::metadata_response::error ( std::string message)
inlinestatic

Create an error result.

Definition at line 111 of file metadata_service.h.

111 {
112 metadata_response r;
113 r.success = false;
114 r.error_message = std::move(message);
115 return r;
116 }

References error_message, and success.

Referenced by kcenon::pacs::web::metadata_service::get_metadata().

Here is the caller graph for this function:

◆ ok()

static metadata_response kcenon::pacs::web::metadata_response::ok ( std::unordered_map< std::string, std::string > tag_map)
inlinestatic

Create a success result.

Definition at line 102 of file metadata_service.h.

103 {
104 metadata_response r;
105 r.success = true;
106 r.tags = std::move(tag_map);
107 return r;
108 }

References success, and tags.

Referenced by kcenon::pacs::web::metadata_service::get_metadata().

Here is the caller graph for this function:

Member Data Documentation

◆ error_message

std::string kcenon::pacs::web::metadata_response::error_message

Error message if failed.

Definition at line 96 of file metadata_service.h.

Referenced by error().

◆ success

bool kcenon::pacs::web::metadata_response::success {false}

Whether the operation succeeded.

Definition at line 93 of file metadata_service.h.

93{false};

Referenced by error(), and ok().

◆ tags

std::unordered_map<std::string, std::string> kcenon::pacs::web::metadata_response::tags

Retrieved tag values.

Definition at line 99 of file metadata_service.h.

Referenced by ok().


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