OpenASIP  2.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
BoolOptionValue Class Reference

#include <OptionValue.hh>

Inheritance diagram for BoolOptionValue:
Inheritance graph
Collaboration diagram for BoolOptionValue:
Collaboration graph

Public Member Functions

 BoolOptionValue (bool value)
 
virtual ~BoolOptionValue ()
 
virtual bool isFlagOn () const
 
virtual bool isFlagOff () const
 
virtual void setBoolValue (bool value)
 
- Public Member Functions inherited from OptionValue
 OptionValue ()
 
virtual ~OptionValue ()
 
virtual void setStringValue (const std::string &)
 
virtual void setIntegerValue (int)
 
virtual void setUnsignedIntegerValue (unsigned)
 
virtual void setRealValue (double)
 
virtual void setIntegerListValue (std::vector< int > values)
 
virtual std::string stringValue (int index=0) const
 
virtual int integerValue (int index=0) const
 
virtual double realValue () const
 
virtual int listSize () const
 

Private Member Functions

 BoolOptionValue (const BoolOptionValue &)
 Copying not allowed. More...
 
BoolOptionValueoperator= (const BoolOptionValue &)
 Assignment not allowed. More...
 

Private Attributes

bool value_
 The value of option. More...
 

Detailed Description

OptionValue that has a boolean value.

This option is also called 'flag'.

Definition at line 184 of file OptionValue.hh.

Constructor & Destructor Documentation

◆ BoolOptionValue() [1/2]

BoolOptionValue::BoolOptionValue ( bool  value)

Constructor.

Parameters
valueThe value of boolean option.

Definition at line 350 of file OptionValue.cc.

350  {
351  value_ = value;
352 }

References value_.

◆ ~BoolOptionValue()

BoolOptionValue::~BoolOptionValue ( )
virtual

Destructor.

Definition at line 357 of file OptionValue.cc.

357  {
358 }

◆ BoolOptionValue() [2/2]

BoolOptionValue::BoolOptionValue ( const BoolOptionValue )
private

Copying not allowed.

Member Function Documentation

◆ isFlagOff()

bool BoolOptionValue::isFlagOff ( ) const
virtual

Returns the negative value of boolean option.

Returns
The negative value of boolean option.
Exceptions
WrongSubclassIs never thrown by this function.

Reimplemented from OptionValue.

Definition at line 389 of file OptionValue.cc.

389  {
390  return !value_;
391 }

References value_.

◆ isFlagOn()

bool BoolOptionValue::isFlagOn ( ) const
virtual

Returns the value of boolean option.

Returns
The value of boolean option.
Exceptions
WrongSubclassIs never thrown by this function.

Reimplemented from OptionValue.

Definition at line 378 of file OptionValue.cc.

378  {
379  return value_;
380 }

References value_.

◆ operator=()

BoolOptionValue& BoolOptionValue::operator= ( const BoolOptionValue )
private

Assignment not allowed.

◆ setBoolValue()

void BoolOptionValue::setBoolValue ( bool  value)
virtual

Sets new value for boolean option.

Parameters
valueNew value for the boolean option.
Exceptions
WrongSubclassIs never thrown by this function.

Reimplemented from OptionValue.

Definition at line 367 of file OptionValue.cc.

367  {
368  value_ = value;
369 }

References value_.

Member Data Documentation

◆ value_

bool BoolOptionValue::value_
private

The value of option.

Definition at line 200 of file OptionValue.hh.

Referenced by BoolOptionValue(), isFlagOff(), isFlagOn(), and setBoolValue().


The documentation for this class was generated from the following files:
BoolOptionValue::value_
bool value_
The value of option.
Definition: OptionValue.hh:200