CommandLine::Item Class Referenceabstract

A single item in a command line menu. More...

#include <CommandLine.h>

Inheritance diagram for CommandLine::Item:
Reference::Able Reference::HeapTracked CommandLine::Argument CommandLine::Value< bool > CommandLine::Value< std::vector< T > > CommandLine::Action CommandLine::Alias CommandLine::Attribute< C, M, P > CommandLine::Parser CommandLine::UnaryAction< T > CommandLine::Value< T > CommandLine::Value< bool > CommandLine::Value< std::vector< T > >

Public Member Functions

virtual bool matches (int code) const =0
 Return true if code matches.
virtual void handle (const std::string &arg)=0
 Handle the argument.
virtual void set_handled (bool)
 Set the handled flag.
virtual Help get_help () const =0
 Return two columns of help text.
Public Member Functions inherited from Reference::Able
 Able ()
 Default constructor.
 Able (const Able &)
 Copy constructor.
Ableoperator= (const Able &)
 Assignment operator.
virtual ~Able ()
 Destructor.
unsigned get_reference_count () const
 Returns the number of references there are to this.
Public Member Functions inherited from Reference::HeapTracked
 HeapTracked ()
 Default constructor.
 HeapTracked (const HeapTracked &)
 Copy constructor.
HeapTrackedoperator= (const HeapTracked &)
 Assignment operator.
virtual ~HeapTracked ()
 Destructor.
bool __is_on_heap () const
 Return true if this instance is found in heap addresses.

Additional Inherited Members

Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 Returns the current number instances in existence.
Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 Records the addresses of new instances allocated on the heap.
static void operator delete (void *location, void *ptr)
 Placement delete overload to match the placement new overload.
static void operator delete (void *location)
 Regular delete overload.
static size_t get_heap_queue_size ()
 Return the number of heap addresses awaiting processing.
Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 Add the address of a reference to this object.
void __dereference (bool auto_delete=true) const
 Remove the address of a reference to this object.

Detailed Description

A single item in a command line menu.

Member Function Documentation

◆ get_help()

virtual Help CommandLine::Item::get_help ( ) const
pure virtual

Return two columns of help text.

Implemented in CommandLine::Alias, and CommandLine::Argument.

◆ handle()

◆ matches()

virtual bool CommandLine::Item::matches ( int code) const
pure virtual

Return true if code matches.

Implemented in CommandLine::Argument.

◆ set_handled()

virtual void CommandLine::Item::set_handled ( bool )
inlinevirtual

Set the handled flag.

Reimplemented in CommandLine::Alias, and CommandLine::Argument.


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

Generated using doxygen 1.14.0