CVC3
Public Member Functions | Private Attributes

CVC3::CLFlag Class Reference

#include <command_line_flags.h>

Collaboration diagram for CVC3::CLFlag:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Private Attributes


Detailed Description

Class CLFlag (for Command Line Flag)

Author: Sergey Berezin

Date: Fri May 30 14:10:48 2003

This class implements a data structure to hold a value of a single command line flag.

Definition at line 54 of file command_line_flags.h.


Constructor & Destructor Documentation

CVC3::CLFlag::CLFlag ( bool  b,
const std::string &  help,
bool  display = true 
) [inline]

Constructor for a boolean flag.

Definition at line 73 of file command_line_flags.h.

References b, and d_data.

CVC3::CLFlag::CLFlag ( int  i,
const std::string &  help,
bool  display = true 
) [inline]

Constructor for an integer flag.

Definition at line 77 of file command_line_flags.h.

References d_data, and i.

CVC3::CLFlag::CLFlag ( const std::string &  s,
const std::string &  help,
bool  display = true 
) [inline]

Constructor for a string flag.

Definition at line 81 of file command_line_flags.h.

References d_data.

CVC3::CLFlag::CLFlag ( const char *  s,
const std::string &  help,
bool  display = true 
) [inline]

Constructor for a string flag from char*.

Definition at line 86 of file command_line_flags.h.

References d_data.

CVC3::CLFlag::CLFlag ( const std::vector< std::pair< std::string, bool > > &  sv,
const std::string &  help,
bool  display = true 
) [inline]

Constructor for a vector flag.

Definition at line 91 of file command_line_flags.h.

References d_data, and sv.

CVC3::CLFlag::CLFlag ( ) [inline]

Default constructor.

Definition at line 97 of file command_line_flags.h.

CVC3::CLFlag::CLFlag ( const CLFlag f) [inline]

Copy constructor.

Definition at line 99 of file command_line_flags.h.

References CVC3::CLFLAG_STRING, CVC3::CLFLAG_STRVEC, d_data, and d_tp.

CVC3::CLFlag::~CLFlag ( ) [inline]

Destructor.

Definition at line 110 of file command_line_flags.h.

References CVC3::CLFLAG_STRING, CVC3::CLFLAG_STRVEC, and d_data.


Member Function Documentation

CLFlag& CVC3::CLFlag::operator= ( const CLFlag f) [inline]

Assignment from another flag.

Definition at line 118 of file command_line_flags.h.

References CVC3::CLFLAG_STRING, CVC3::CLFLAG_STRVEC, d_data, and d_tp.

CLFlag& CVC3::CLFlag::operator= ( bool  b) [inline]

Assignment of a boolean value.

The flag must already have the right type

Definition at line 149 of file command_line_flags.h.

CLFlag& CVC3::CLFlag::operator= ( int  i) [inline]

Assignment of an integer value.

The flag must already have the right type

Definition at line 157 of file command_line_flags.h.

CLFlag& CVC3::CLFlag::operator= ( const std::string &  s) [inline]

Assignment of a string value.

The flag must already have a string type.

Definition at line 165 of file command_line_flags.h.

CLFlag& CVC3::CLFlag::operator= ( const char *  s) [inline]

Assignment of an string value from char*.

The flag must already have a string type.

Definition at line 173 of file command_line_flags.h.

CLFlag& CVC3::CLFlag::operator= ( const std::pair< std::string, bool > &  p) [inline]

Assignment of a string value with a boolean tag to a vector flag.

The flag must already have a vector type. The pair of <string,bool> will be appended to the vector.

Definition at line 182 of file command_line_flags.h.

CLFlag& CVC3::CLFlag::operator= ( const std::vector< std::pair< std::string, bool > > &  sv) [inline]

Assignment of a vector value.

The flag must already have a vector type.

Definition at line 190 of file command_line_flags.h.

CLFlagType CVC3::CLFlag::getType ( ) const [inline]

Return the type of the flag.

Definition at line 198 of file command_line_flags.h.

References d_modified.

Referenced by CVC3::VCCmd::evaluateCommand(), and printUsage().

bool CVC3::CLFlag::modified ( ) const [inline]

Return true if the flag was modified from the default value (e.g. set on the command line)

Definition at line 201 of file command_line_flags.h.

References d_display.

Referenced by CVC3::VCCmd::evaluateCommand().

bool CVC3::CLFlag::display ( ) const [inline]

Return true if flag should be displayed in regular help.

Definition at line 203 of file command_line_flags.h.

Referenced by printUsage().

const bool& CVC3::CLFlag::getBool ( ) const [inline]

Definition at line 210 of file command_line_flags.h.

Referenced by printUsage().

const int& CVC3::CLFlag::getInt ( ) const [inline]

Definition at line 215 of file command_line_flags.h.

Referenced by printUsage().

const std::string& CVC3::CLFlag::getString ( ) const [inline]

Definition at line 220 of file command_line_flags.h.

Referenced by printUsage().

const std::vector<std::pair<std::string,bool> >& CVC3::CLFlag::getStrVec ( ) const [inline]

Definition at line 226 of file command_line_flags.h.

const std::string& CVC3::CLFlag::getHelp ( ) const [inline]

Definition at line 232 of file command_line_flags.h.

Referenced by printUsage().


Member Data Documentation

Type of the argument.

Definition at line 57 of file command_line_flags.h.

Referenced by CLFlag(), and operator=().

Definition at line 60 of file command_line_flags.h.

Referenced by CLFlag().

Definition at line 61 of file command_line_flags.h.

Referenced by CLFlag().

std::string* CVC3::CLFlag::s

Definition at line 62 of file command_line_flags.h.

std::vector<std::pair<std::string,bool> >* CVC3::CLFlag::sv

Definition at line 63 of file command_line_flags.h.

Referenced by CLFlag().

union { ... } CVC3::CLFlag::d_data [private]

Referenced by CLFlag(), operator=(), and ~CLFlag().

bool CVC3::CLFlag::d_modified [private]

This tag is set to true when the flag is assigned a new value.

Definition at line 66 of file command_line_flags.h.

Referenced by getType().

std::string CVC3::CLFlag::d_help [private]

Help string.

Definition at line 68 of file command_line_flags.h.

bool CVC3::CLFlag::d_display [private]

Whether to display this flag when user invokes cvc3 -h.

Definition at line 70 of file command_line_flags.h.

Referenced by modified().


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