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

#include <OptionValue.hh>

Inheritance diagram for StringOptionValue:
Inheritance graph
Collaboration diagram for StringOptionValue:
Collaboration graph

Public Member Functions

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

Private Member Functions

 StringOptionValue (const StringOptionValue &)
 Copying not allowed. More...
 
StringOptionValueoperator= (const StringOptionValue &)
 Assignment not allowed. More...
 

Private Attributes

std::string value_
 The value of the option. More...
 

Detailed Description

OptionValue that has a string as a value.

Definition at line 133 of file OptionValue.hh.

Constructor & Destructor Documentation

◆ StringOptionValue() [1/2]

StringOptionValue::StringOptionValue ( const std::string  value)

Constructor.

Parameters
valueThe value of string option.

Definition at line 267 of file OptionValue.cc.

267  {
268  value_ = value;
269 }

References value_.

◆ ~StringOptionValue()

StringOptionValue::~StringOptionValue ( )
virtual

Destructor.

Definition at line 274 of file OptionValue.cc.

274  {
275 }

◆ StringOptionValue() [2/2]

StringOptionValue::StringOptionValue ( const StringOptionValue )
private

Copying not allowed.

Member Function Documentation

◆ operator=()

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

Assignment not allowed.

◆ setStringValue()

void StringOptionValue::setStringValue ( const std::string &  value)
virtual

Sets new value for string option.

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

Reimplemented from OptionValue.

Definition at line 284 of file OptionValue.cc.

284  {
285  value_ = value;
286 }

References value_.

◆ stringValue()

string StringOptionValue::stringValue ( int  index = 0) const
virtual

Returns the value of string option.

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

Reimplemented from OptionValue.

Definition at line 296 of file OptionValue.cc.

296  {
297  return value_;
298 }

References value_.

Member Data Documentation

◆ value_

std::string StringOptionValue::value_
private

The value of the option.

Definition at line 147 of file OptionValue.hh.

Referenced by setStringValue(), StringOptionValue(), and stringValue().


The documentation for this class was generated from the following files:
StringOptionValue::value_
std::string value_
The value of the option.
Definition: OptionValue.hh:147