CMS 3D CMS Logo

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

#include <cxxopts.h>

Public Member Functions

const Stringdescription () const
 
const std::string & long_name () const
 
std::shared_ptr< Valuemake_storage () const
 
 OptionDetails (const std::string &short_, const std::string &long_, const String &desc, std::shared_ptr< const Value > val)
 
 OptionDetails (const OptionDetails &rhs)
 
 OptionDetails (OptionDetails &&rhs)=default
 
const std::string & short_name () const
 
const Valuevalue () const
 

Private Attributes

int m_count
 
String m_desc
 
std::string m_long
 
std::string m_short
 
std::shared_ptr< const Valuem_value
 

Detailed Description

Definition at line 585 of file cxxopts.h.

Constructor & Destructor Documentation

◆ OptionDetails() [1/3]

cxxopts::OptionDetails::OptionDetails ( const std::string &  short_,
const std::string &  long_,
const String desc,
std::shared_ptr< const Value val 
)
inline

Definition at line 587 of file cxxopts.h.

591  : m_short(short_), m_long(long_), m_desc(desc), m_value(val), m_count(0) {}
std::string m_long
Definition: cxxopts.h:611
std::shared_ptr< const Value > m_value
Definition: cxxopts.h:613
std::string m_short
Definition: cxxopts.h:610

◆ OptionDetails() [2/3]

cxxopts::OptionDetails::OptionDetails ( const OptionDetails rhs)
inline

Definition at line 593 of file cxxopts.h.

References m_value.

593  : m_desc(rhs.m_desc), m_count(rhs.m_count) {
594  m_value = rhs.m_value->clone();
595  }
std::shared_ptr< const Value > m_value
Definition: cxxopts.h:613

◆ OptionDetails() [3/3]

cxxopts::OptionDetails::OptionDetails ( OptionDetails &&  rhs)
default

Member Function Documentation

◆ description()

const String& cxxopts::OptionDetails::description ( ) const
inline

Definition at line 599 of file cxxopts.h.

References m_desc.

599 { return m_desc; }

◆ long_name()

const std::string& cxxopts::OptionDetails::long_name ( ) const
inline

Definition at line 607 of file cxxopts.h.

References m_long.

607 { return m_long; }
std::string m_long
Definition: cxxopts.h:611

◆ make_storage()

std::shared_ptr<Value> cxxopts::OptionDetails::make_storage ( ) const
inline

Definition at line 603 of file cxxopts.h.

References m_value.

603 { return m_value->clone(); }
std::shared_ptr< const Value > m_value
Definition: cxxopts.h:613

◆ short_name()

const std::string& cxxopts::OptionDetails::short_name ( ) const
inline

Definition at line 605 of file cxxopts.h.

References m_short.

605 { return m_short; }
std::string m_short
Definition: cxxopts.h:610

◆ value()

const Value& cxxopts::OptionDetails::value ( void  ) const
inline

Definition at line 601 of file cxxopts.h.

References m_value.

601 { return *m_value; }
std::shared_ptr< const Value > m_value
Definition: cxxopts.h:613

Member Data Documentation

◆ m_count

int cxxopts::OptionDetails::m_count
private

Definition at line 614 of file cxxopts.h.

◆ m_desc

String cxxopts::OptionDetails::m_desc
private

Definition at line 612 of file cxxopts.h.

Referenced by description().

◆ m_long

std::string cxxopts::OptionDetails::m_long
private

Definition at line 611 of file cxxopts.h.

Referenced by long_name().

◆ m_short

std::string cxxopts::OptionDetails::m_short
private

Definition at line 610 of file cxxopts.h.

Referenced by short_name().

◆ m_value

std::shared_ptr<const Value> cxxopts::OptionDetails::m_value
private

Definition at line 613 of file cxxopts.h.

Referenced by make_storage(), OptionDetails(), and value().