OpenASIP 2.2
Loading...
Searching...
No Matches
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.
 
ExplorerPluginParameterType type_
 Parameter type.
 
bool compulsory_
 Is parameter compulsory.
 
TCEString value_
 The value of the parameter as a string, empty if none set.
 
TCEString description_
 The description (help text).
 

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 43 of file ExplorerPluginParameter.cc.

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

◆ ~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}
find Finds info of the inner loops in the false

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(), EditParameterDialog::setTexts(), 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_.

Referenced by EditParameterDialog::onOk().

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 EditParameterDialog::setTexts(), and CallExplorerPluginWindow::updateParameterList().

◆ value()

TCEString ExplorerPluginParameter::value ( ) const

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: