faudes::Parameter Class Reference
Structure to model a parameter type within the Signature of a Function.
More...
#include <cfl_functions.h>
List of all members.
Public Types |
enum | ParamAttr { In,
Out,
InOut,
UnDef
} |
| A function parameter has has one out of four so called io-attrributes;.
More...
|
Public Member Functions |
| Parameter (void) |
| Constructor, default.
|
| Parameter (const std::string &rName, const std::string &rTypeName, ParamAttr attr=UnDef, bool cret=false) |
| Constructor, by member values.
|
| ~Parameter (void) |
| Desctructor.
|
const std::string & | Name (void) const |
| Get name.
|
void | Name (const std::string &rName) |
| Set name.
|
const std::string & | Type (void) const |
| Get type.
|
void | Type (const std::string &rTypeName) |
| Set type.
|
const ParamAttr & | Attribute (void) const |
| Get Attribute.
|
void | Attribute (const ParamAttr &rAttr) |
| Set Attribute.
|
void | Attribute (const std::string &rAttrStr) |
| Set Attribute by string.
|
bool | CReturn (void) const |
| Get C-Return flag.
|
void | CReturn (bool cret) |
| Set C-Return flag.
|
std::string | Str (void) const |
| Convenience method to produce a textual representation of a parameter.
|
void | Clear () |
| Set to "undefined".
|
bool | operator== (const Parameter &rOther) const |
| Test equality.
|
Static Public Member Functions |
static std::string | AStr (Parameter::ParamAttr attr) |
| Convenience method to produce a textual representation of an io attribute.
|
Protected Attributes |
std::string | mName |
| Name.
|
std::string | mTDName |
| Faudes type.
|
ParamAttr | mAttr |
| IO-Attribute.
|
bool | mCReturn |
| C-Return flag.
|
Detailed Description
Structure to model a parameter type within the Signature of a Function.
A Parameter is made of a descriptive name, a faudes type and an io-attribute. The latter specifies whether the parameter is a const argument (In
), a result (Out
) or a both-ways parameter (InOut
). To support the code generators of the run-time-interface, you may use the CReturn flag to indicate that the parameter is implemented as the return value in the corresponding C function. The current version of the code generators will handle this case for the elementary types Integer, Boolean and String. They will, however, fail on any other faudes types.
Definition at line 45 of file cfl_functions.h.
Member Enumeration Documentation
A function parameter has has one out of four so called io-attrributes;.
- Enumerator:
-
Definition at line 52 of file cfl_functions.h.
Constructor & Destructor Documentation
faudes::Parameter::Parameter |
( |
void |
|
) |
|
faudes::Parameter::Parameter |
( |
const std::string & |
rName, |
|
|
const std::string & |
rTypeName, |
|
|
ParamAttr |
attr = UnDef , |
|
|
bool |
cret = false | |
|
) |
| | |
faudes::Parameter::~Parameter |
( |
void |
|
) |
|
Member Function Documentation
Convenience method to produce a textual representation of an io attribute.
- Parameters:
-
| attr | Enum value denoting the attribute. |
- Returns:
- Parameter IO attribute as std::string
Definition at line 95 of file cfl_functions.cpp.
void faudes::Parameter::Attribute |
( |
const std::string & |
rAttrStr |
) |
|
Set Attribute by string.
Convenience method, defaults to UnDef.
- Parameters:
-
| rAttrStr | In/Out/InOut attribute of parameter. |
Definition at line 87 of file cfl_functions.cpp.
void faudes::Parameter::Attribute |
( |
const ParamAttr & |
rAttr |
) |
|
Set Attribute.
- Parameters:
-
| rAttr | In/Out/InOut attribute of parameter. |
Definition at line 75 of file cfl_functions.cpp.
Get Attribute.
- Returns:
- In/Out/InOut attribute of parameter.
Definition at line 71 of file cfl_functions.cpp.
void faudes::Parameter::Clear |
( |
void |
|
) |
|
void faudes::Parameter::CReturn |
( |
bool |
cret |
) |
|
Set C-Return flag.
- Parameters:
-
| cret | New value of C-Return flag. |
Definition at line 83 of file cfl_functions.cpp.
bool faudes::Parameter::CReturn |
( |
void |
|
) |
const |
void faudes::Parameter::Name |
( |
const std::string & |
rName |
) |
|
Set name.
- Parameters:
-
| rName | New name of parameter |
Definition at line 59 of file cfl_functions.cpp.
const std::string & faudes::Parameter::Name |
( |
void |
|
) |
const |
bool faudes::Parameter::operator== |
( |
const Parameter & |
rOther |
) |
const |
Test equality.
- Parameters:
-
| rOther | Other signature to compare with. |
Definition at line 120 of file cfl_functions.cpp.
std::string faudes::Parameter::Str |
( |
void |
|
) |
const |
Convenience method to produce a textual representation of a parameter.
Definition at line 106 of file cfl_functions.cpp.
void faudes::Parameter::Type |
( |
const std::string & |
rTypeName |
) |
|
Set type.
- Parameters:
-
| rTypeName | New faudes type of parameter |
Definition at line 67 of file cfl_functions.cpp.
const std::string & faudes::Parameter::Type |
( |
void |
|
) |
const |
Member Data Documentation
The documentation for this class was generated from the following files: