CVC3::CLFlag Class Reference

`#include <cvc3_compat.h>`

Collaboration diagram for CVC3::CLFlag:
[legend]

## Public Member Functions

| CLFlag (bool b, const std::string &help, bool display=true)
| Constructor for a boolean flag.
| CLFlag (int i, const std::string &help, bool display=true)
| Constructor for an integer flag.
| CLFlag (const std::string &s, const std::string &help, bool display=true)
| Constructor for a string flag.
| CLFlag (const char *s, const std::string &help, bool display=true)
| Constructor for a string flag from char*.
| CLFlag (const std::vector< std::pair< std::string, bool > > &sv, const std::string &help, bool display=true)
| Constructor for a vector flag.
| CLFlag ()
| Default constructor.
| CLFlag (const CLFlag &f)
| Copy constructor.
| ~CLFlag ()
| Destructor.
CLFlag & | operator= (const CLFlag &f)
| Assignment from another flag.
CLFlag & | operator= (bool b)
| Assignment of a boolean value.
CLFlag & | operator= (int i)
| Assignment of an integer value.
CLFlag & | operator= (const std::string &s)
| Assignment of a string value.
CLFlag & | operator= (const char *s)
| Assignment of an string value from char*.
CLFlag & | operator= (const std::pair< std::string, bool > &p)
| Assignment of a string value with a boolean tag to a vector flag.
CLFlag & | operator= (const std::vector< std::pair< std::string, bool > > &sv)
| Assignment of a vector value.
CLFlagType | getType () const
| Return the type of the flag.
bool | modified () const
| Return true if the flag was modified from the default value (e.g. set on the command line)
bool | display () const
| Return true if flag should be displayed in regular help.
const bool & | getBool () const
const int & | getInt () const
const std::string & | getString () const
const std::vector< std::pair< std::string, bool > > & | getStrVec () const
const std::string & | getHelp () const

## 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 110 of file cvc3_compat.h.

## Constructor & Destructor Documentation

## CLFlag() [1/7]

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

Constructor for a boolean flag.

## CLFlag() [2/7]

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

Constructor for an integer flag.

## CLFlag() [3/7]

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

Constructor for a string flag.

## CLFlag() [4/7]

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

Constructor for a string flag from char*.

## CLFlag() [5/7]

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

Constructor for a vector flag.

## CLFlag() [6/7]

CVC3::CLFlag::CLFlag | ( |  | ) |

Default constructor.

## CLFlag() [7/7]

CVC3::CLFlag::CLFlag | ( | const CLFlag & | f | ) |

Copy constructor.

## ~CLFlag()

CVC3::CLFlag::~CLFlag | ( |  | ) |

Destructor.

## Member Function Documentation

## display()

bool CVC3::CLFlag::display | ( |  | ) | const

Return true if flag should be displayed in regular help.

## getBool()

const bool & CVC3::CLFlag::getBool | ( |  | ) | const

## getHelp()

const std::string & CVC3::CLFlag::getHelp | ( |  | ) | const

## getInt()

const int & CVC3::CLFlag::getInt | ( |  | ) | const

## getString()

const std::string & CVC3::CLFlag::getString | ( |  | ) | const

## getStrVec()

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

## getType()

CLFlagType CVC3::CLFlag::getType | ( |  | ) | const

Return the type of the flag.

## modified()

bool CVC3::CLFlag::modified | ( |  | ) | const

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

## operator=() [1/7]

CLFlag & CVC3::CLFlag::operator= | ( | bool | b | ) |

Assignment of a boolean value.

The flag must already have the right type

## operator=() [2/7]

CLFlag & CVC3::CLFlag::operator= | ( | const char * | s | ) |

Assignment of an string value from char*.

The flag must already have a string type.

## operator=() [3/7]

CLFlag & CVC3::CLFlag::operator= | ( | const CLFlag & | f | ) |

Assignment from another flag.

## operator=() [4/7]

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

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.

## operator=() [5/7]

CLFlag & CVC3::CLFlag::operator= | ( | const std::string & | s | ) |

Assignment of a string value.

The flag must already have a string type.

## operator=() [6/7]

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

Assignment of a vector value.

The flag must already have a vector type.

## operator=() [7/7]

CLFlag & CVC3::CLFlag::operator= | ( | int | i | ) |

Assignment of an integer value.

The flag must already have the right type

## Field Documentation

## b

bool CVC3::CLFlag::b

Definition at line 115 of file cvc3_compat.h.

## i

int CVC3::CLFlag::i

Definition at line 116 of file cvc3_compat.h.

## s

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

Definition at line 117 of file cvc3_compat.h.

## sv

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

Definition at line 118 of file cvc3_compat.h.

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

- src/compat/cvc3_compat.h