1 #ifndef __BLOCKPARAMETERUSER_H__
\r
2 #define __BLOCKPARAMETERUSER_H__
\r
9 #include "BlockParameter.h"
\r
10 class BlockParameter;
\r
12 using namespace std;
\r
17 A BlockParameterUser represents string that will be put in the generated VHDL code
\r
18 each time a @val{param_name} is encountered. The default value of the string is given
\r
19 at construction. If it is empty, user will have to provide a value before VHDL generation.
\r
20 If it's not empty, user can still change this value before generation.
\r
21 Since this string can be almost everything, it may lead to incorrect VHDL code.
\r
22 But no validity check is done !
\r
24 The type of such a parameter is always "string".
\r
27 class BlockParameterUser : public BlockParameter {
\r
31 BlockParameterUser();
\r
32 BlockParameterUser(AbstractBlock* _owner, const QString& _name, const QString& _type, const QString& _value);
\r
35 QVariant getValue();
\r
36 inline QString getContext() { return "user";}
\r
38 void setValue(const QString& _value);
\r
39 inline void resetToDefaultValue() { userValue = defaultValue; }
\r
43 bool isDefaultValue();
\r
44 bool isUserParameter();
\r
47 BlockParameter* clone();
\r
48 QString toVHDL(int context, int flags);
\r
56 #endif // __BLOCKPARAMETERUSER_H__
\r