retdec
|
A representation of a function parameter. More...
#include <parameter.h>
Public Types | |
using | Annotations = std::set< std::shared_ptr< Annotation > > |
using | annotation_iterator = Annotations::iterator |
using | const_annotation_iterator = Annotations::const_iterator |
Public Member Functions | |
Parameter (const std::string &name, const std::shared_ptr< Type > &type, const Annotations &annotations={}) | |
Constructs a new parameter. More... | |
const std::string & | getName () const |
Returns parameter's name. More... | |
std::shared_ptr< Type > | getType () const |
Returns parameter's type. More... | |
bool | operator== (const Parameter &other) const |
bool | operator!= (const Parameter &other) const |
Parameter annotations. | |
annotation_iterator | annotation_begin () |
Returns an iterator to the annotation. More... | |
const_annotation_iterator | annotation_begin () const |
Returns a constant iterator to the annotation. More... | |
annotation_iterator | annotation_end () |
Returns an iterator past the last annotation. More... | |
const_annotation_iterator | annotation_end () const |
Returns a constant iterator past the last annotation. More... | |
bool | isIn () const |
Returns true when parameter is input, false otherwise. More... | |
bool | isOut () const |
Returns true when parameter is output, false otherwise. More... | |
bool | isInOut () const |
Returns true when parameter will be changed by the function, false otherwise. More... | |
bool | isOptional () const |
Returns true when parameter may be null , false otherwise. More... | |
Private Types | |
using | AnnotationTypeHandler = bool(Annotation::*)() const |
Pointer to Annotation's member functions. More... | |
Private Member Functions | |
bool | hasAnnotationOfType (const AnnotationTypeHandler &annotationType) const |
Private Attributes | |
std::string | name |
std::shared_ptr< Type > | type |
Annotations | annotations |
A representation of a function parameter.
using retdec::ctypes::Parameter::annotation_iterator = Annotations::iterator |
using retdec::ctypes::Parameter::Annotations = std::set<std::shared_ptr<Annotation> > |
|
private |
Pointer to Annotation's member functions.
using retdec::ctypes::Parameter::const_annotation_iterator = Annotations::const_iterator |
retdec::ctypes::Parameter::Parameter | ( | const std::string & | name, |
const std::shared_ptr< Type > & | type, | ||
const Annotations & | annotations = {} |
||
) |
Constructs a new parameter.
Parameter::annotation_iterator retdec::ctypes::Parameter::annotation_begin | ( | ) |
Returns an iterator to the annotation.
Parameter::const_annotation_iterator retdec::ctypes::Parameter::annotation_begin | ( | ) | const |
Returns a constant iterator to the annotation.
Parameter::annotation_iterator retdec::ctypes::Parameter::annotation_end | ( | ) |
Returns an iterator past the last annotation.
Parameter::const_annotation_iterator retdec::ctypes::Parameter::annotation_end | ( | ) | const |
Returns a constant iterator past the last annotation.
const std::string & retdec::ctypes::Parameter::getName | ( | ) | const |
Returns parameter's name.
std::shared_ptr< Type > retdec::ctypes::Parameter::getType | ( | ) | const |
Returns parameter's type.
|
private |
bool retdec::ctypes::Parameter::isIn | ( | ) | const |
Returns true when parameter is input, false otherwise.
bool retdec::ctypes::Parameter::isInOut | ( | ) | const |
Returns true when parameter will be changed by the function, false otherwise.
bool retdec::ctypes::Parameter::isOptional | ( | ) | const |
Returns true when parameter may be null
, false otherwise.
bool retdec::ctypes::Parameter::isOut | ( | ) | const |
Returns true when parameter is output, false otherwise.
bool retdec::ctypes::Parameter::operator!= | ( | const Parameter & | other | ) | const |
bool retdec::ctypes::Parameter::operator== | ( | const Parameter & | other | ) | const |
|
private |
|
private |
|
private |