The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
Gaudi::Functional::details::LocationSpec Struct Reference

#include </builds/gaudi/Gaudi/GaudiFunctional/include/Gaudi/Functional/details.h>

Collaboration diagram for Gaudi::Functional::details::LocationSpec:

Public Types

using KeyValue = std::pair<std::string, std::string>
using KeyValues = std::pair<std::string, std::vector<std::string>>

Public Member Functions

 LocationSpec (std::string name_, std::string location_)
 LocationSpec (std::string name_, const char *location_)
 LocationSpec (std::string name_, std::vector< std::string > locations_)
 LocationSpec (std::string name_, std::initializer_list< std::string > locations_)
 operator KeyValue () const
 operator KeyValues () const

Public Attributes

KeyValues value
bool is_vector = false

Detailed Description

Definition at line 504 of file details.h.

Member Typedef Documentation

◆ KeyValue

using Gaudi::Functional::details::LocationSpec::KeyValue = std::pair<std::string, std::string>

Definition at line 505 of file details.h.

◆ KeyValues

using Gaudi::Functional::details::LocationSpec::KeyValues = std::pair<std::string, std::vector<std::string>>

Definition at line 506 of file details.h.

Constructor & Destructor Documentation

◆ LocationSpec() [1/4]

Gaudi::Functional::details::LocationSpec::LocationSpec ( std::string name_,
std::string location_ )
inline

Definition at line 511 of file details.h.

512 : value{ std::move( name_ ), { std::move( location_ ) } } {}

◆ LocationSpec() [2/4]

Gaudi::Functional::details::LocationSpec::LocationSpec ( std::string name_,
const char * location_ )
inline

Definition at line 513 of file details.h.

514 : LocationSpec{ std::move( name_ ), std::string{ location_ } } {}
LocationSpec(std::string name_, std::string location_)
Definition details.h:511

◆ LocationSpec() [3/4]

Gaudi::Functional::details::LocationSpec::LocationSpec ( std::string name_,
std::vector< std::string > locations_ )
inline

Definition at line 515 of file details.h.

516 : value{ std::move( name_ ), std::move( locations_ ) }, is_vector{ true } {}

◆ LocationSpec() [4/4]

Gaudi::Functional::details::LocationSpec::LocationSpec ( std::string name_,
std::initializer_list< std::string > locations_ )
inline

Definition at line 517 of file details.h.

518 : LocationSpec{ std::move( name_ ), std::vector<std::string>{ locations_ } } {}

Member Function Documentation

◆ operator KeyValue()

Gaudi::Functional::details::LocationSpec::operator KeyValue ( ) const
inline

Definition at line 520 of file details.h.

520 {
521 if ( is_vector ) {
522 throw GaudiException( "Expected a scalar location specification", "Gaudi::Functional::details::LocationSpec",
524 }
525 return { value.first, value.second.front() };
526 }
constexpr static const auto FAILURE
Definition StatusCode.h:100

◆ operator KeyValues()

Gaudi::Functional::details::LocationSpec::operator KeyValues ( ) const
inline

Definition at line 527 of file details.h.

527{ return value; }

Member Data Documentation

◆ is_vector

bool Gaudi::Functional::details::LocationSpec::is_vector = false

Definition at line 509 of file details.h.

◆ value

KeyValues Gaudi::Functional::details::LocationSpec::value

Definition at line 508 of file details.h.


The documentation for this struct was generated from the following file:
  • GaudiFunctional/include/Gaudi/Functional/details.h