retdec
Private Attributes | List of all members
retdec::fileformat::DotnetMethod Class Reference

#include <dotnet_method.h>

Inheritance diagram for retdec::fileformat::DotnetMethod:
Inheritance graph
[legend]
Collaboration diagram for retdec::fileformat::DotnetMethod:
Collaboration graph
[legend]

Public Member Functions

Getters
const MethodDefgetRawRecord () const
 
std::string getNameWithGenericParameters () const
 
const DotnetDataTypeBasegetReturnType () const
 
const std::vector< std::unique_ptr< DotnetParameter > > & getParameters () const
 
const std::vector< std::string > & getGenericParameters () const
 
std::size_t getDeclaredParametersCount () const
 
Setters
void setRawRecord (const MethodDef *record)
 
void setReturnType (std::unique_ptr< DotnetDataTypeBase > &&methodReturnType)
 
void setIsStatic (bool set)
 
void setIsVirtual (bool set)
 
void setIsAbstract (bool set)
 
void setIsFinal (bool set)
 
void setIsConstructor (bool set)
 
void setDeclaredParametersCount (std::size_t paramsCount)
 
Detection
bool isStatic () const
 
bool isVirtual () const
 
bool isAbstract () const
 
bool isFinal () const
 
bool isConstructor () const
 
Parameter
void addParameter (std::unique_ptr< DotnetParameter > &&param)
 
void addGenericParameter (std::string &&genericParam)
 
- Public Member Functions inherited from retdec::fileformat::DotnetType
virtual ~DotnetType ()=default
 
std::string getName () const
 
const std::string & getNameSpace () const
 
DotnetTypeVisibility getVisibility () const
 
std::string getFullyQualifiedName () const
 
const std::string & getVisibilityString () const
 
void setName (const std::string &typeName)
 
void setNameSpace (const std::string &typeNameSpace)
 
void setVisibility (DotnetTypeVisibility typeVisibility)
 
bool isPublic () const
 
bool isProtected () const
 
bool isPrivate () const
 

Private Attributes

const MethodDefrawRecord
 
std::unique_ptr< DotnetDataTypeBasereturnType
 
std::vector< std::unique_ptr< DotnetParameter > > parameters
 
std::vector< std::string > genericParameters
 
bool methodIsStatic
 
bool methodIsVirtual
 
bool methodIsAbstract
 
bool methodIsFinal
 
bool methodIsConstructor
 
std::size_t declaredParamsCount
 

Additional Inherited Members

- Protected Attributes inherited from retdec::fileformat::DotnetType
std::string name
 
std::string nameSpace
 
DotnetTypeVisibility visibility
 

Detailed Description

.NET method

Member Function Documentation

◆ addGenericParameter()

void retdec::fileformat::DotnetMethod::addGenericParameter ( std::string &&  genericParam)

Adds the generic parameter to the method.

Parameters
genericParamGeneric parameter to add.

◆ addParameter()

void retdec::fileformat::DotnetMethod::addParameter ( std::unique_ptr< DotnetParameter > &&  param)

Adds the parameter to the method.

Parameters
paramParameter to add.

◆ getDeclaredParametersCount()

std::size_t retdec::fileformat::DotnetMethod::getDeclaredParametersCount ( ) const

Returns the declared number of parameters according to metadata tables.

Returns
The declared number of parameters.

◆ getGenericParameters()

const std::vector< std::string > & retdec::fileformat::DotnetMethod::getGenericParameters ( ) const

Returns the generic parameters of the method.

Returns
The method generic parameters.

◆ getNameWithGenericParameters()

std::string retdec::fileformat::DotnetMethod::getNameWithGenericParameters ( ) const

Returns the name of the method appended with generic paramters.

Returns
Name with generic parameters.

◆ getParameters()

const std::vector< std::unique_ptr< DotnetParameter > > & retdec::fileformat::DotnetMethod::getParameters ( ) const

Returns the parameters of the method.

Returns
The method parameters.

◆ getRawRecord()

const MethodDef * retdec::fileformat::DotnetMethod::getRawRecord ( ) const

Returns the raw metadata table record for this method.

Returns
Raw type record.

◆ getReturnType()

const DotnetDataTypeBase * retdec::fileformat::DotnetMethod::getReturnType ( ) const

Returns the return type of the method.

Returns
Return type.

◆ isAbstract()

bool retdec::fileformat::DotnetMethod::isAbstract ( ) const

Returns whether the method is abstract.

Returns
true if abstract, otherwise false.

◆ isConstructor()

bool retdec::fileformat::DotnetMethod::isConstructor ( ) const

Returns whether the method is constructor.

Returns
true if constructor, otherwise false.

◆ isFinal()

bool retdec::fileformat::DotnetMethod::isFinal ( ) const

Returns whether the method is final.

Returns
true if final, otherwise false.

◆ isStatic()

bool retdec::fileformat::DotnetMethod::isStatic ( ) const

Returns whether the method is static.

Returns
true if static, otherwise false.

◆ isVirtual()

bool retdec::fileformat::DotnetMethod::isVirtual ( ) const

Returns whether the method is virtual.

Returns
true if virtual, otherwise false.

◆ setDeclaredParametersCount()

void retdec::fileformat::DotnetMethod::setDeclaredParametersCount ( std::size_t  paramsCount)

Sets the declared number of parameters.

Parameters
paramsCountDeclared number of parameters.

◆ setIsAbstract()

void retdec::fileformat::DotnetMethod::setIsAbstract ( bool  set)

Sets whether the method is abstract.

Parameters
settrue for abstract, otherwise not abstract.

◆ setIsConstructor()

void retdec::fileformat::DotnetMethod::setIsConstructor ( bool  set)

Sets whether the method is constructor.

Parameters
settrue for constructor, otherwise not constructor.

◆ setIsFinal()

void retdec::fileformat::DotnetMethod::setIsFinal ( bool  set)

Sets whether the method is final.

Parameters
settrue for final, otherwise not final.

◆ setIsStatic()

void retdec::fileformat::DotnetMethod::setIsStatic ( bool  set)

Sets whether the method is static.

Parameters
settrue for static, otherwise not static.

◆ setIsVirtual()

void retdec::fileformat::DotnetMethod::setIsVirtual ( bool  set)

Sets whether the method is virtual.

Parameters
settrue for virtual, otherwise not virtual.

◆ setRawRecord()

void retdec::fileformat::DotnetMethod::setRawRecord ( const MethodDef record)

Sets the raw metadata table record for this method.

Parameters
recordRaw metadata table record.

◆ setReturnType()

void retdec::fileformat::DotnetMethod::setReturnType ( std::unique_ptr< DotnetDataTypeBase > &&  methodReturnType)

Sets the return type of this method.

Parameters
methodReturnTypeThe return type.

Member Data Documentation

◆ declaredParamsCount

std::size_t retdec::fileformat::DotnetMethod::declaredParamsCount
private

◆ genericParameters

std::vector<std::string> retdec::fileformat::DotnetMethod::genericParameters
private

◆ methodIsAbstract

bool retdec::fileformat::DotnetMethod::methodIsAbstract
private

◆ methodIsConstructor

bool retdec::fileformat::DotnetMethod::methodIsConstructor
private

◆ methodIsFinal

bool retdec::fileformat::DotnetMethod::methodIsFinal
private

◆ methodIsStatic

bool retdec::fileformat::DotnetMethod::methodIsStatic
private

◆ methodIsVirtual

bool retdec::fileformat::DotnetMethod::methodIsVirtual
private

◆ parameters

std::vector<std::unique_ptr<DotnetParameter> > retdec::fileformat::DotnetMethod::parameters
private

◆ rawRecord

const MethodDef* retdec::fileformat::DotnetMethod::rawRecord
private

◆ returnType

std::unique_ptr<DotnetDataTypeBase> retdec::fileformat::DotnetMethod::returnType
private

The documentation for this class was generated from the following files: