CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
cxxopts::KeyValue Class Reference

#include <cxxopts.h>

Public Member Functions

template<typename T >
T as () const
 
const std::string & key () const
 
 KeyValue (std::string key_, std::string value_)
 
const std::string & value () const
 

Private Attributes

std::string m_key
 
std::string m_value
 

Detailed Description

Definition at line 675 of file cxxopts.h.

Constructor & Destructor Documentation

◆ KeyValue()

cxxopts::KeyValue::KeyValue ( std::string  key_,
std::string  value_ 
)
inline

Definition at line 677 of file cxxopts.h.

677 : m_key(std::move(key_)), m_value(std::move(value_)) {}
std::string m_key
Definition: cxxopts.h:691
std::string m_value
Definition: cxxopts.h:692
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

◆ as()

template<typename T >
T cxxopts::KeyValue::as ( ) const
inline

Definition at line 684 of file cxxopts.h.

References m_value, cxxopts::values::parse_value(), and mps_fire::result.

684  {
685  T result;
687  return result;
688  }
void parse_value(const std::string &text, uint8_t &value)
Definition: cxxopts.h:402
std::string m_value
Definition: cxxopts.h:692
long double T

◆ key()

const std::string& cxxopts::KeyValue::key ( ) const
inline

Definition at line 679 of file cxxopts.h.

References m_key.

679 { return m_key; }
std::string m_key
Definition: cxxopts.h:691

◆ value()

const std::string& cxxopts::KeyValue::value ( void  ) const
inline

Definition at line 681 of file cxxopts.h.

References m_value.

681 { return m_value; }
std::string m_value
Definition: cxxopts.h:692

Member Data Documentation

◆ m_key

std::string cxxopts::KeyValue::m_key
private

Definition at line 691 of file cxxopts.h.

Referenced by key().

◆ m_value

std::string cxxopts::KeyValue::m_value
private

Definition at line 692 of file cxxopts.h.

Referenced by as(), and value().