retdec
Public Member Functions | Public Attributes | Protected Attributes | List of all members
retdec::common::Object Class Reference

#include <object.h>

Collaboration diagram for retdec::common::Object:
Collaboration graph
[legend]

Public Member Functions

 Object ()
 
 Object (const std::string &name, const common::Storage &storage)
 
bool operator== (const Object &o) const
 
bool operator< (const Object &o) const
 
Object query methods.
bool isFromDebug () const
 
Object set methods.
void setName (const std::string &n)
 
void setRealName (const std::string &n)
 
void setCryptoDescription (const std::string &d)
 
void setIsFromDebug (bool b)
 
void setStorage (const common::Storage &s)
 
Object get methods.
const std::string & getId () const
 
const std::string & getName () const
 
const std::string & getRealName () const
 
const std::string & getCryptoDescription () const
 
const common::StoragegetStorage () const
 

Public Attributes

common::Type type
 

Protected Attributes

std::string _name
 Unique ID – name used in LLVM IR. More...
 
common::Storage _storage
 
std::string _realName
 
std::string _cryptoDescription
 
bool _fromDebug = false
 

Detailed Description

Represents object (i.e. register, stack, global, parameter).

Object's name is its unique ID.

Besides common members like name and type, objects may also have additional information meaningful only to their particular flavour (storage type). Global objects have addresses they are located on. Register objects have names of registers they are stored in. Stack objects have their stack frame offset. Parameters have no additional information.

Constructor & Destructor Documentation

◆ Object() [1/2]

retdec::common::Object::Object ( )

◆ Object() [2/2]

retdec::common::Object::Object ( const std::string &  name,
const common::Storage storage 
)

Member Function Documentation

◆ getCryptoDescription()

const std::string & retdec::common::Object::getCryptoDescription ( ) const

◆ getId()

const std::string & retdec::common::Object::getId ( ) const
Returns
Object's ID is its name.

◆ getName()

const std::string & retdec::common::Object::getName ( ) const

◆ getRealName()

const std::string & retdec::common::Object::getRealName ( ) const
Returns
Real name of this object to appear in output C. This may or may not differ from name.

◆ getStorage()

const common::Storage & retdec::common::Object::getStorage ( ) const

◆ isFromDebug()

bool retdec::common::Object::isFromDebug ( ) const

◆ operator<()

bool retdec::common::Object::operator< ( const Object o) const

Objects are compared by their uniqie IDs (i.e. names).

◆ operator==()

bool retdec::common::Object::operator== ( const Object o) const

Object are equal if their names are equal.

Parameters
oOther object.

◆ setCryptoDescription()

void retdec::common::Object::setCryptoDescription ( const std::string &  d)

◆ setIsFromDebug()

void retdec::common::Object::setIsFromDebug ( bool  b)

◆ setName()

void retdec::common::Object::setName ( const std::string &  n)

◆ setRealName()

void retdec::common::Object::setRealName ( const std::string &  n)

◆ setStorage()

void retdec::common::Object::setStorage ( const common::Storage s)

Member Data Documentation

◆ _cryptoDescription

std::string retdec::common::Object::_cryptoDescription
protected

◆ _fromDebug

bool retdec::common::Object::_fromDebug = false
protected

◆ _name

std::string retdec::common::Object::_name
protected

Unique ID – name used in LLVM IR.

◆ _realName

std::string retdec::common::Object::_realName
protected

Real name of this object to appear in output C. This may or may not differ from name.

◆ _storage

common::Storage retdec::common::Object::_storage
protected

◆ type

common::Type retdec::common::Object::type

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