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

Used types in a module. More...

#include <used_types_visitor.h>

Collaboration diagram for retdec::llvmir2hll::UsedTypes:
Collaboration graph
[legend]

Public Types

using type_iterator = TypeSet::const_iterator
 Types iterator. More...
 
using struct_type_iterator = StructTypeSet::const_iterator
 Struct types iterator. More...
 

Public Member Functions

 UsedTypes (const UsedTypes &other)
 Constructs a new UsedTypes object from other. More...
 
UsedTypesoperator= (const UsedTypes &other)
 Assigns other to the current object. More...
 
bool operator== (const UsedTypes &other) const
 Returns true if the current object is equal to other, false otherwise. More...
 
bool operator!= (const UsedTypes &other) const
 Returns true if the current object is not equal to other, false otherwise. More...
 
TypeSet getIntTypes () const
 Returns the integer types. More...
 
TypeSet getSignedIntTypes () const
 Returns the signed integer types. More...
 
TypeSet getUnsignedIntTypes () const
 Returns the unsigned integer types. More...
 
TypeSet getFloatTypes () const
 Returns the float types. More...
 
StructTypeSet getStructTypes () const
 Returns the structure types. More...
 
TypeSet getOtherTypes () const
 Returns the other types (int, float, struct not included). More...
 
TypeSet getAllTypes () const
 Returns the all types (int, float, struct included). More...
 
std::size_t getCount (bool intTy=true, bool floatTy=true, bool structTy=true, bool otherTy=true) const
 Returns the number of used types. More...
 
bool isUsedBool () const
 Returns true if the bool type was detected, false otherwise. More...
 
Used Types Accessors
type_iterator int_begin () const
 Returns an iterator to the first int type. More...
 
type_iterator int_end () const
 Returns an iterator past the last int type. More...
 
type_iterator signed_int_begin () const
 Returns an iterator to the first signed int type. More...
 
type_iterator signed_int_end () const
 Returns an iterator past the last signed int type. More...
 
type_iterator unsigned_int_begin () const
 Returns an iterator to the first unsigned int type. More...
 
type_iterator unsigned_int_end () const
 Returns an iterator past the last unsigned int type. More...
 
type_iterator float_begin () const
 Returns an iterator to the first float type. More...
 
type_iterator float_end () const
 Returns an iterator past the last float type. More...
 
struct_type_iterator struct_begin () const
 Returns an iterator to the first struct type. More...
 
struct_type_iterator struct_end () const
 Returns an iterator past the last struct type. More...
 
type_iterator other_begin () const
 Returns an iterator to the first other type. More...
 
type_iterator other_end () const
 Returns an iterator past the last other type. More...
 
type_iterator all_begin () const
 Returns an iterator to the first type. More...
 
type_iterator all_end () const
 Returns an iterator past the last type. More...
 

Private Member Functions

 UsedTypes ()
 Constructs a new UsedTypes object. More...
 

Private Attributes

TypeSet intTypes
 Set of all integer types. More...
 
TypeSet signedIntTypes
 Set of signed integer types. More...
 
TypeSet unsignedIntTypes
 Set of unsigned integer types. More...
 
TypeSet floatTypes
 Set of float types. More...
 
StructTypeSet structTypes
 Set of structure types. More...
 
TypeSet otherTypes
 Set of other types (integer, float, structs are not included). More...
 
TypeSet allTypes
 Set of all types (integer, float, structs and other). More...
 
bool usedBool
 Is bool type used? More...
 

Friends

class UsedTypesVisitor
 

Detailed Description

Used types in a module.

See UsedTypesVisitor for a way of creating instances of this class.

Instances of this class have value object semantics.

Member Typedef Documentation

◆ struct_type_iterator

using retdec::llvmir2hll::UsedTypes::struct_type_iterator = StructTypeSet::const_iterator

Struct types iterator.

◆ type_iterator

using retdec::llvmir2hll::UsedTypes::type_iterator = TypeSet::const_iterator

Types iterator.

Constructor & Destructor Documentation

◆ UsedTypes() [1/2]

retdec::llvmir2hll::UsedTypes::UsedTypes ( const UsedTypes other)
default

Constructs a new UsedTypes object from other.

◆ UsedTypes() [2/2]

retdec::llvmir2hll::UsedTypes::UsedTypes ( )
private

Constructs a new UsedTypes object.

Member Function Documentation

◆ all_begin()

UsedTypes::type_iterator retdec::llvmir2hll::UsedTypes::all_begin ( ) const

Returns an iterator to the first type.

◆ all_end()

UsedTypes::type_iterator retdec::llvmir2hll::UsedTypes::all_end ( ) const

Returns an iterator past the last type.

◆ float_begin()

UsedTypes::type_iterator retdec::llvmir2hll::UsedTypes::float_begin ( ) const

Returns an iterator to the first float type.

◆ float_end()

UsedTypes::type_iterator retdec::llvmir2hll::UsedTypes::float_end ( ) const

Returns an iterator past the last float type.

◆ getAllTypes()

TypeSet retdec::llvmir2hll::UsedTypes::getAllTypes ( ) const

Returns the all types (int, float, struct included).

◆ getCount()

std::size_t retdec::llvmir2hll::UsedTypes::getCount ( bool  intTy = true,
bool  floatTy = true,
bool  structTy = true,
bool  otherTy = true 
) const

Returns the number of used types.

Parameters
[in]intTyInclude the number of integer types.
[in]floatTyInclude the number of float types.
[in]structTyInclude the number of struct types.
[in]otherTyInclude the number of other types (int, float, struct not included).

If all params are true, returns the number of all used types.

◆ getFloatTypes()

TypeSet retdec::llvmir2hll::UsedTypes::getFloatTypes ( ) const

Returns the float types.

◆ getIntTypes()

TypeSet retdec::llvmir2hll::UsedTypes::getIntTypes ( ) const

Returns the integer types.

◆ getOtherTypes()

TypeSet retdec::llvmir2hll::UsedTypes::getOtherTypes ( ) const

Returns the other types (int, float, struct not included).

◆ getSignedIntTypes()

TypeSet retdec::llvmir2hll::UsedTypes::getSignedIntTypes ( ) const

Returns the signed integer types.

◆ getStructTypes()

StructTypeSet retdec::llvmir2hll::UsedTypes::getStructTypes ( ) const

Returns the structure types.

◆ getUnsignedIntTypes()

TypeSet retdec::llvmir2hll::UsedTypes::getUnsignedIntTypes ( ) const

Returns the unsigned integer types.

◆ int_begin()

UsedTypes::type_iterator retdec::llvmir2hll::UsedTypes::int_begin ( ) const

Returns an iterator to the first int type.

◆ int_end()

UsedTypes::type_iterator retdec::llvmir2hll::UsedTypes::int_end ( ) const

Returns an iterator past the last int type.

◆ isUsedBool()

bool retdec::llvmir2hll::UsedTypes::isUsedBool ( ) const

Returns true if the bool type was detected, false otherwise.

◆ operator!=()

bool retdec::llvmir2hll::UsedTypes::operator!= ( const UsedTypes other) const

Returns true if the current object is not equal to other, false otherwise.

◆ operator=()

UsedTypes & retdec::llvmir2hll::UsedTypes::operator= ( const UsedTypes other)
default

Assigns other to the current object.

◆ operator==()

bool retdec::llvmir2hll::UsedTypes::operator== ( const UsedTypes other) const

Returns true if the current object is equal to other, false otherwise.

◆ other_begin()

UsedTypes::type_iterator retdec::llvmir2hll::UsedTypes::other_begin ( ) const

Returns an iterator to the first other type.

◆ other_end()

UsedTypes::type_iterator retdec::llvmir2hll::UsedTypes::other_end ( ) const

Returns an iterator past the last other type.

◆ signed_int_begin()

UsedTypes::type_iterator retdec::llvmir2hll::UsedTypes::signed_int_begin ( ) const

Returns an iterator to the first signed int type.

◆ signed_int_end()

UsedTypes::type_iterator retdec::llvmir2hll::UsedTypes::signed_int_end ( ) const

Returns an iterator past the last signed int type.

◆ struct_begin()

UsedTypes::struct_type_iterator retdec::llvmir2hll::UsedTypes::struct_begin ( ) const

Returns an iterator to the first struct type.

◆ struct_end()

UsedTypes::struct_type_iterator retdec::llvmir2hll::UsedTypes::struct_end ( ) const

Returns an iterator past the last struct type.

◆ unsigned_int_begin()

UsedTypes::type_iterator retdec::llvmir2hll::UsedTypes::unsigned_int_begin ( ) const

Returns an iterator to the first unsigned int type.

◆ unsigned_int_end()

UsedTypes::type_iterator retdec::llvmir2hll::UsedTypes::unsigned_int_end ( ) const

Returns an iterator past the last unsigned int type.

Friends And Related Function Documentation

◆ UsedTypesVisitor

friend class UsedTypesVisitor
friend

Member Data Documentation

◆ allTypes

TypeSet retdec::llvmir2hll::UsedTypes::allTypes
private

Set of all types (integer, float, structs and other).

◆ floatTypes

TypeSet retdec::llvmir2hll::UsedTypes::floatTypes
private

Set of float types.

◆ intTypes

TypeSet retdec::llvmir2hll::UsedTypes::intTypes
private

Set of all integer types.

◆ otherTypes

TypeSet retdec::llvmir2hll::UsedTypes::otherTypes
private

Set of other types (integer, float, structs are not included).

◆ signedIntTypes

TypeSet retdec::llvmir2hll::UsedTypes::signedIntTypes
private

Set of signed integer types.

◆ structTypes

StructTypeSet retdec::llvmir2hll::UsedTypes::structTypes
private

Set of structure types.

◆ unsignedIntTypes

TypeSet retdec::llvmir2hll::UsedTypes::unsignedIntTypes
private

Set of unsigned integer types.

◆ usedBool

bool retdec::llvmir2hll::UsedTypes::usedBool
private

Is bool type used?


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