Libpf::Core::Enumerator Class Reference

Dynamic enumerator, to define the valid values for a StringOption. More...

#include <Enumerator.h>

Inheritance diagram for Libpf::Core::Enumerator:

Public Member Functions

 Enumerator (std::string name, std::string description)
 
 Enumerator (const Libpf::Utility::EnumeratorInterface &ei)
 
const std::string & name (void) const
 
const std::string & description (void) const
 
std::vector< Libpf::Utility::Option >::const_iterator options_cbegin () const
 
std::vector< Libpf::Utility::Option >::const_iterator options_cend () const
 
std::size_t options_size (void) const
 
void addOption (const Libpf::Utility::Option &option)
 
- Public Member Functions inherited from Libpf::Utility::EnumeratorInterface
virtual ~EnumeratorInterface ()=default
 
virtual const std::string & name (void) const =0
 
virtual const std::string & description (void) const =0
 
virtual std::vector< Option >::const_iterator options_cbegin () const =0
 
virtual std::vector< Option >::const_iterator options_cend () const =0
 
virtual std::size_t options_size (void) const =0
 
std::string json (void) const
 

Detailed Description

Dynamic enumerator, to define the valid values for a StringOption.

See also
StringOption, Option

Constructor & Destructor Documentation

◆ Enumerator() [1/2]

Libpf::Core::Enumerator::Enumerator ( std::string  name,
std::string  description 
)

◆ Enumerator() [2/2]

Libpf::Core::Enumerator::Enumerator ( const Libpf::Utility::EnumeratorInterface ei)

Member Function Documentation

◆ addOption()

void Libpf::Core::Enumerator::addOption ( const Libpf::Utility::Option option)

◆ description()

const std::string & Libpf::Core::Enumerator::description ( void  ) const
virtual
Returns
the description of the enumerator

Implements Libpf::Utility::EnumeratorInterface.

◆ name()

const std::string & Libpf::Core::Enumerator::name ( void  ) const
virtual
Returns
the name of the enumerator

Implements Libpf::Utility::EnumeratorInterface.

◆ options_cbegin()

std::vector< Libpf::Utility::Option >::const_iterator Libpf::Core::Enumerator::options_cbegin ( ) const
virtual

◆ options_cend()

std::vector< Libpf::Utility::Option >::const_iterator Libpf::Core::Enumerator::options_cend ( ) const
virtual

◆ options_size()

std::size_t Libpf::Core::Enumerator::options_size ( void  ) const
virtual

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