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

#include <ExplorerPluginParameter.hh>

Collaboration diagram for ExplorerPluginParameter:
Collaboration graph

Public Member Functions

 ExplorerPluginParameter (const std::string &name, ExplorerPluginParameterType type, bool compulsory, const TCEString value, const TCEString description="")
 
virtual ~ExplorerPluginParameter ()
 
TCEString name () const
 
TCEString value () const
 
TCEString description () const
 
void setValue (const std::string &value)
 
ExplorerPluginParameterType type () const
 
TCEString typeAsString () const
 
bool isCompulsory () const
 
bool isSet () const
 

Private Attributes

TCEString name_
 Parameter name. More...
 
ExplorerPluginParameterType type_
 Parameter type. More...
 
bool compulsory_
 Is parameter compulsory. More...
 
TCEString value_
 The value of the parameter as a string, empty if none set. More...
 
TCEString description_
 The description (help text). More...
 

Detailed Description

Explorer plugin parameter class. Represents a parameter that an explorer plugin can have.

Definition at line 46 of file ExplorerPluginParameter.hh.

Constructor & Destructor Documentation

◆ ExplorerPluginParameter()

ExplorerPluginParameter::ExplorerPluginParameter ( const std::string &  name,
ExplorerPluginParameterType  type,
bool  compulsory,
const TCEString  value,
const TCEString  description = "" 
)

The constructor.

Definition at line 44 of file ExplorerPluginParameter.cc.

49  :
50  name_(name), type_(type), compulsory_(compulsory), value_(value),
52 }

◆ ~ExplorerPluginParameter()

ExplorerPluginParameter::~ExplorerPluginParameter ( )
virtual

The destructor.

Definition at line 58 of file ExplorerPluginParameter.cc.

58  {
59 }

Member Function Documentation

◆ description()

TCEString ExplorerPluginParameter::description ( ) const
inline

Definition at line 59 of file ExplorerPluginParameter.hh.

59 { return description_; }

References description_.

◆ isCompulsory()

bool ExplorerPluginParameter::isCompulsory ( ) const

Returns boolean indicating if the parameter is always needed.

Returns
True if parameter is compulsory, false otherwise.

Definition at line 135 of file ExplorerPluginParameter.cc.

135  {
136  return compulsory_;
137 }

References compulsory_.

◆ isSet()

bool ExplorerPluginParameter::isSet ( ) const

Returns boolean indicating if the parameter is always needed.

Returns
True if parameter is compulsory, false otherwise.

Definition at line 146 of file ExplorerPluginParameter.cc.

146  {
147  return value_.empty() ? false : true;;
148 }

References false, and value_.

◆ name()

TCEString ExplorerPluginParameter::name ( ) const

Returns the parameter name.

Returns
Name of the parameter as a string.

Definition at line 86 of file ExplorerPluginParameter.cc.

86  {
87  return name_;
88 }

References name_.

Referenced by CallExplorerPluginWindow::doEdit(), and CallExplorerPluginWindow::updateParameterList().

◆ setValue()

void ExplorerPluginParameter::setValue ( const std::string &  value)

Sets the value of the parameter.

Parameters
valueThe value to be set for the parameter as a string.

Definition at line 74 of file ExplorerPluginParameter.cc.

74  {
75  value_ = value;
76 }

References value(), and value_.

Here is the call graph for this function:

◆ type()

ExplorerPluginParameterType ExplorerPluginParameter::type ( ) const

Returns enum for parameter type.

Returns
ExplorerPluginParameterType enumeration for parameter type.

Definition at line 97 of file ExplorerPluginParameter.cc.

97  {
98  return type_;
99 }

References type_.

◆ typeAsString()

TCEString ExplorerPluginParameter::typeAsString ( ) const

Returns string describing the parameter type.

Returns
ExplorerPluginParameterType as a string.

Definition at line 108 of file ExplorerPluginParameter.cc.

108  {
109  switch (type_) {
110  case UINT:
111  return "unsigned int";
112  break;
113  case INT:
114  return "int";
115  break;
116  case STRING:
117  return "string";
118  break;
119  case BOOL:
120  return "boolean";
121  break;
122  default:
123  return "";
124  }
125 }

References BOOL, INT, STRING, type_, and UINT.

Referenced by CallExplorerPluginWindow::updateParameterList().

◆ value()

TCEString ExplorerPluginParameter::value ( ) const

Definition at line 63 of file ExplorerPluginParameter.cc.

63  {
64  return value_;
65 }

References value_.

Referenced by CallExplorerPluginWindow::doEdit(), setValue(), and CallExplorerPluginWindow::updateParameterList().

Member Data Documentation

◆ compulsory_

bool ExplorerPluginParameter::compulsory_
private

Is parameter compulsory.

Definition at line 74 of file ExplorerPluginParameter.hh.

Referenced by isCompulsory().

◆ description_

TCEString ExplorerPluginParameter::description_
private

The description (help text).

Definition at line 78 of file ExplorerPluginParameter.hh.

Referenced by description().

◆ name_

TCEString ExplorerPluginParameter::name_
private

Parameter name.

Definition at line 70 of file ExplorerPluginParameter.hh.

Referenced by name().

◆ type_

ExplorerPluginParameterType ExplorerPluginParameter::type_
private

Parameter type.

Definition at line 72 of file ExplorerPluginParameter.hh.

Referenced by type(), and typeAsString().

◆ value_

TCEString ExplorerPluginParameter::value_
private

The value of the parameter as a string, empty if none set.

Definition at line 76 of file ExplorerPluginParameter.hh.

Referenced by isSet(), setValue(), and value().


The documentation for this class was generated from the following files:
UINT
@ UINT
Definition: ExplorerPluginParameter.hh:40
ExplorerPluginParameter::name_
TCEString name_
Parameter name.
Definition: ExplorerPluginParameter.hh:70
ExplorerPluginParameter::name
TCEString name() const
Definition: ExplorerPluginParameter.cc:86
BOOL
@ BOOL
Definition: ExplorerPluginParameter.hh:40
ExplorerPluginParameter::value
TCEString value() const
Definition: ExplorerPluginParameter.cc:63
ExplorerPluginParameter::description
TCEString description() const
Definition: ExplorerPluginParameter.hh:59
STRING
@ STRING
Definition: ExplorerPluginParameter.hh:40
ExplorerPluginParameter::type_
ExplorerPluginParameterType type_
Parameter type.
Definition: ExplorerPluginParameter.hh:72
INT
@ INT
Definition: ExplorerPluginParameter.hh:40
ExplorerPluginParameter::type
ExplorerPluginParameterType type() const
Definition: ExplorerPluginParameter.cc:97
ExplorerPluginParameter::value_
TCEString value_
The value of the parameter as a string, empty if none set.
Definition: ExplorerPluginParameter.hh:76
false
find Finds info of the inner loops in the false
Definition: InnerLoopFinder.cc:81
ExplorerPluginParameter::compulsory_
bool compulsory_
Is parameter compulsory.
Definition: ExplorerPluginParameter.hh:74
ExplorerPluginParameter::description_
TCEString description_
The description (help text).
Definition: ExplorerPluginParameter.hh:78