retdec
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
retdec::common::CallingConvention Class Reference

#include <calling_convention.h>

Public Types

enum class  eCC {
  CC_UNKNOWN = 0 , CC_VOIDARG , CC_CDECL , CC_ELLIPSIS ,
  CC_STDCALL , CC_PASCAL , CC_FASTCALL , CC_THISCALL ,
  CC_MANUAL , CC_SPOILED , CC_SPECIALE , CC_SPECIALP ,
  CC_SPECIAL , CC_WATCOM , CC_X64 , CC_ARM ,
  CC_ARM64 , CC_MIPS , CC_MIPS64 , CC_POWERPC ,
  CC_POWERPC64 , CC_PIC32 , CC_ENDING
}
 

Public Member Functions

 CallingConvention ()
 
 CallingConvention (eCC cc)
 
CallingConventionoperator= (const eCC &cc)
 
bool operator< (const CallingConvention &cc) const
 
Calling convention query methods.
bool isUnknown () const
 
bool isKnown () const
 
bool isVoidarg () const
 
bool isCdecl () const
 
bool isEllipsis () const
 
bool isStdcall () const
 
bool isPascal () const
 
bool isFastcall () const
 
bool isThiscall () const
 
bool isManual () const
 
bool isSpoiled () const
 
bool isSpecialE () const
 
bool isSpecialP () const
 
bool isSpecial () const
 
eCC getID () const
 
Calling convention set methods.
void setIsUnknown ()
 
void setIsVoidarg ()
 
void setIsCdecl ()
 
void setIsEllipsis ()
 
void setIsStdcall ()
 
void setIsPascal ()
 
void setIsFastcall ()
 
void setIsThiscall ()
 
void setIsManual ()
 
void setIsSpoiled ()
 
void setIsSpecialE ()
 
void setIsSpecialP ()
 
void setIsSpecial ()
 
void set (eCC cc)
 

Static Public Member Functions

Calling convention named constructors.
static CallingConvention initVoidarg ()
 
static CallingConvention initCdecl ()
 
static CallingConvention initEllipsis ()
 
static CallingConvention initStdcall ()
 
static CallingConvention initPascal ()
 
static CallingConvention initFastcall ()
 
static CallingConvention initThiscall ()
 
static CallingConvention initManual ()
 
static CallingConvention initSpoiled ()
 
static CallingConvention initSpecialE ()
 
static CallingConvention initSpecialP ()
 
static CallingConvention initSpecial ()
 

Private Attributes

eCC _cc = eCC::CC_UNKNOWN
 

Friends

std::ostream & operator<< (std::ostream &out, const eCC &cc)
 
std::ostream & operator<< (std::ostream &out, const CallingConvention &cc)
 

Detailed Description

Represents functions' calling conventions. It supports the same calling convention types as IDA Pro. Convenient query methods are provided to get and set all conventions.

Member Enumeration Documentation

◆ eCC

Enumerator
CC_UNKNOWN 
CC_VOIDARG 
CC_CDECL 
CC_ELLIPSIS 
CC_STDCALL 
CC_PASCAL 
CC_FASTCALL 
CC_THISCALL 
CC_MANUAL 
CC_SPOILED 
CC_SPECIALE 
CC_SPECIALP 
CC_SPECIAL 
CC_WATCOM 
CC_X64 
CC_ARM 
CC_ARM64 
CC_MIPS 
CC_MIPS64 
CC_POWERPC 
CC_POWERPC64 
CC_PIC32 
CC_ENDING 

Constructor & Destructor Documentation

◆ CallingConvention() [1/2]

retdec::common::CallingConvention::CallingConvention ( )

Unknown calling convention is created.

◆ CallingConvention() [2/2]

retdec::common::CallingConvention::CallingConvention ( eCC  cc)

Member Function Documentation

◆ getID()

CallingConventionID retdec::common::CallingConvention::getID ( ) const

◆ initCdecl()

CallingConvention retdec::common::CallingConvention::initCdecl ( )
static

◆ initEllipsis()

CallingConvention retdec::common::CallingConvention::initEllipsis ( )
static

◆ initFastcall()

CallingConvention retdec::common::CallingConvention::initFastcall ( )
static

◆ initManual()

CallingConvention retdec::common::CallingConvention::initManual ( )
static

◆ initPascal()

CallingConvention retdec::common::CallingConvention::initPascal ( )
static

◆ initSpecial()

CallingConvention retdec::common::CallingConvention::initSpecial ( )
static

◆ initSpecialE()

CallingConvention retdec::common::CallingConvention::initSpecialE ( )
static

◆ initSpecialP()

CallingConvention retdec::common::CallingConvention::initSpecialP ( )
static

◆ initSpoiled()

CallingConvention retdec::common::CallingConvention::initSpoiled ( )
static

◆ initStdcall()

CallingConvention retdec::common::CallingConvention::initStdcall ( )
static

◆ initThiscall()

CallingConvention retdec::common::CallingConvention::initThiscall ( )
static

◆ initVoidarg()

CallingConvention retdec::common::CallingConvention::initVoidarg ( )
static

◆ isCdecl()

bool retdec::common::CallingConvention::isCdecl ( ) const

◆ isEllipsis()

bool retdec::common::CallingConvention::isEllipsis ( ) const

◆ isFastcall()

bool retdec::common::CallingConvention::isFastcall ( ) const

◆ isKnown()

bool retdec::common::CallingConvention::isKnown ( ) const

◆ isManual()

bool retdec::common::CallingConvention::isManual ( ) const

◆ isPascal()

bool retdec::common::CallingConvention::isPascal ( ) const

◆ isSpecial()

bool retdec::common::CallingConvention::isSpecial ( ) const

◆ isSpecialE()

bool retdec::common::CallingConvention::isSpecialE ( ) const

◆ isSpecialP()

bool retdec::common::CallingConvention::isSpecialP ( ) const

◆ isSpoiled()

bool retdec::common::CallingConvention::isSpoiled ( ) const

◆ isStdcall()

bool retdec::common::CallingConvention::isStdcall ( ) const

◆ isThiscall()

bool retdec::common::CallingConvention::isThiscall ( ) const

◆ isUnknown()

bool retdec::common::CallingConvention::isUnknown ( ) const

◆ isVoidarg()

bool retdec::common::CallingConvention::isVoidarg ( ) const

◆ operator<()

bool retdec::common::CallingConvention::operator< ( const CallingConvention cc) const

◆ operator=()

CallingConvention & retdec::common::CallingConvention::operator= ( const eCC cc)

◆ set()

void retdec::common::CallingConvention::set ( eCC  cc)

◆ setIsCdecl()

void retdec::common::CallingConvention::setIsCdecl ( )

◆ setIsEllipsis()

void retdec::common::CallingConvention::setIsEllipsis ( )

◆ setIsFastcall()

void retdec::common::CallingConvention::setIsFastcall ( )

◆ setIsManual()

void retdec::common::CallingConvention::setIsManual ( )

◆ setIsPascal()

void retdec::common::CallingConvention::setIsPascal ( )

◆ setIsSpecial()

void retdec::common::CallingConvention::setIsSpecial ( )

◆ setIsSpecialE()

void retdec::common::CallingConvention::setIsSpecialE ( )

◆ setIsSpecialP()

void retdec::common::CallingConvention::setIsSpecialP ( )

◆ setIsSpoiled()

void retdec::common::CallingConvention::setIsSpoiled ( )

◆ setIsStdcall()

void retdec::common::CallingConvention::setIsStdcall ( )

◆ setIsThiscall()

void retdec::common::CallingConvention::setIsThiscall ( )

◆ setIsUnknown()

void retdec::common::CallingConvention::setIsUnknown ( )

◆ setIsVoidarg()

void retdec::common::CallingConvention::setIsVoidarg ( )

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  out,
const CallingConvention cc 
)
friend

◆ operator<< [2/2]

std::ostream& operator<< ( std::ostream &  out,
const eCC cc 
)
friend

Member Data Documentation

◆ _cc

eCC retdec::common::CallingConvention::_cc = eCC::CC_UNKNOWN
private

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