This class contains a single method parameter for a C++ function.
More...
#include "mlir/TableGen/Class.h"
|
template<typename TypeT , typename NameT , typename DefaultT > |
| MethodParameter (TypeT &&type, NameT &&name, DefaultT &&defaultValue, bool optional=false) |
| Create a method parameter with a C++ type, parameter name, and an optional default value. More...
|
|
template<typename TypeT , typename NameT > |
| MethodParameter (TypeT &&type, NameT &&name, bool optional=false) |
| Create a method parameter with a C++ type, parameter name, and no default value. More...
|
|
void | writeDeclTo (raw_indented_ostream &os) const |
| Write the parameter as part of a method declaration. More...
|
|
void | writeDefTo (raw_indented_ostream &os) const |
| Write the parameter as part of a method definition. More...
|
|
StringRef | getType () const |
| Get the C++ type. More...
|
|
StringRef | getName () const |
| Get the C++ parameter name. More...
|
|
bool | hasDefaultValue () const |
| Returns true if the parameter has a default value. More...
|
|
This class contains a single method parameter for a C++ function.
Definition at line 43 of file Class.h.
◆ MethodParameter() [1/2]
template<typename TypeT , typename NameT , typename DefaultT >
mlir::tblgen::MethodParameter::MethodParameter |
( |
TypeT && |
type, |
|
|
NameT && |
name, |
|
|
DefaultT && |
defaultValue, |
|
|
bool |
optional = false |
|
) |
| |
|
inline |
Create a method parameter with a C++ type, parameter name, and an optional default value.
Marking a parameter as "optional" is a cosmetic effect on the generated code.
Definition at line 49 of file Class.h.
◆ MethodParameter() [2/2]
template<typename TypeT , typename NameT >
mlir::tblgen::MethodParameter::MethodParameter |
( |
TypeT && |
type, |
|
|
NameT && |
name, |
|
|
bool |
optional = false |
|
) |
| |
|
inline |
Create a method parameter with a C++ type, parameter name, and no default value.
Definition at line 59 of file Class.h.
◆ getName()
StringRef mlir::tblgen::MethodParameter::getName |
( |
| ) |
const |
|
inline |
Get the C++ parameter name.
Definition at line 71 of file Class.h.
◆ getType()
StringRef mlir::tblgen::MethodParameter::getType |
( |
| ) |
const |
|
inline |
Get the C++ type.
Definition at line 69 of file Class.h.
◆ hasDefaultValue()
bool mlir::tblgen::MethodParameter::hasDefaultValue |
( |
| ) |
const |
|
inline |
Returns true if the parameter has a default value.
Definition at line 73 of file Class.h.
Referenced by writeDeclTo().
◆ writeDeclTo()
◆ writeDefTo()
The documentation for this class was generated from the following files: