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

#include <OptionValue.hh>

Inheritance diagram for IntegerOptionValue:
Inheritance graph
Collaboration diagram for IntegerOptionValue:
Collaboration graph

Public Member Functions

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

Private Member Functions

 IntegerOptionValue (const IntegerOptionValue &)
 Copying not allowed. More...
 
IntegerOptionValueoperator= (const IntegerOptionValue &)
 Assignment not allowed. More...
 

Private Attributes

int value_
 The value of option. More...
 

Detailed Description

Models an option that has an integer value.

Definition at line 85 of file OptionValue.hh.

Constructor & Destructor Documentation

◆ IntegerOptionValue() [1/2]

IntegerOptionValue::IntegerOptionValue ( int  value)

Constructor.

Parameters
valueThe value of integer option.

Definition at line 204 of file OptionValue.cc.

204  {
205  value_ = value;
206 }

References value_.

◆ ~IntegerOptionValue()

IntegerOptionValue::~IntegerOptionValue ( )
virtual

Destructor.

Definition at line 211 of file OptionValue.cc.

211  {
212 }

◆ IntegerOptionValue() [2/2]

IntegerOptionValue::IntegerOptionValue ( const IntegerOptionValue )
private

Copying not allowed.

Member Function Documentation

◆ integerValue()

int IntegerOptionValue::integerValue ( int  index = 0) const
virtual

Returns the value of integer option.

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

Reimplemented from OptionValue.

Definition at line 233 of file OptionValue.cc.

233  {
234  return value_;
235 }

References value_.

◆ operator=()

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

Assignment not allowed.

◆ setIntegerValue()

void IntegerOptionValue::setIntegerValue ( int  value)
virtual

Sets new value for integer option.

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

Reimplemented from OptionValue.

Definition at line 221 of file OptionValue.cc.

221  {
222  value_ = value;
223 }

References value_.

Member Data Documentation

◆ value_

int IntegerOptionValue::value_
private

The value of option.

Definition at line 99 of file OptionValue.hh.

Referenced by IntegerOptionValue(), integerValue(), and setIntegerValue().


The documentation for this class was generated from the following files:
IntegerOptionValue::value_
int value_
The value of option.
Definition: OptionValue.hh:99