decompiler 1.0.0
Public Member Functions | Private Attributes | List of all members
ghidra::HomogeneousAggregate Class Reference

Filter on a homogeneous aggregate data-type. More...

#include <modelrules.hh>

Inheritance diagram for ghidra::HomogeneousAggregate:
ghidra::SizeRestrictedFilter ghidra::DatatypeFilter

Public Member Functions

 HomogeneousAggregate (type_metatype meta)
 Constructor for use with decode()
 
 HomogeneousAggregate (type_metatype meta, int4 maxPrim, int4 min, int4 max)
 Constructor.
 
virtual DatatypeFilterclone (void) const
 Make a copy of this filter. More...
 
virtual bool filter (Datatype *dt) const
 Test whether the given data-type belongs to this filter's data-type class. More...
 
- Public Member Functions inherited from ghidra::SizeRestrictedFilter
 SizeRestrictedFilter (void)
 Constructor for use with decode()
 
 SizeRestrictedFilter (int4 min, int4 max)
 Constructor.
 
bool filterOnSize (Datatype *dt) const
 Enforce any size bounds on a given data-type. More...
 
virtual DatatypeFilterclone (void) const
 Make a copy of this filter. More...
 
virtual bool filter (Datatype *dt) const
 Test whether the given data-type belongs to this filter's data-type class. More...
 
virtual void decode (Decoder &decoder)
 Configure details of the data-type class being filtered from the given stream. More...
 
- Public Member Functions inherited from ghidra::DatatypeFilter
virtual ~DatatypeFilter (void)
 Destructor.
 
virtual DatatypeFilterclone (void) const =0
 Make a copy of this filter. More...
 
virtual bool filter (Datatype *dt) const =0
 Test whether the given data-type belongs to this filter's data-type class. More...
 
virtual void decode (Decoder &decoder)=0
 Configure details of the data-type class being filtered from the given stream. More...
 

Private Attributes

type_metatype metaType
 The expected meta-type.
 
int4 maxPrimitives
 Maximum number of primitives in the aggregate.
 

Additional Inherited Members

- Static Public Member Functions inherited from ghidra::DatatypeFilter
static bool extractPrimitives (Datatype *dt, int4 max, vector< Datatype * > &res)
 Extract an ordered list of primitive data-types making up the given data-type. More...
 
static DatatypeFilterdecodeFilter (Decoder &decoder)
 Instantiate a filter from the given stream. More...
 
- Protected Attributes inherited from ghidra::SizeRestrictedFilter
int4 minSize
 Minimum size of the data-type in bytes.
 
int4 maxSize
 Maximum size of the data-type in bytes.
 

Detailed Description

Filter on a homogeneous aggregate data-type.

All primitive data-types must be the same.

Member Function Documentation

◆ clone()

virtual DatatypeFilter * ghidra::HomogeneousAggregate::clone ( void  ) const
inlinevirtual

Make a copy of this filter.

Returns
the newly allocated copy

Reimplemented from ghidra::SizeRestrictedFilter.

References HomogeneousAggregate(), maxPrimitives, ghidra::SizeRestrictedFilter::maxSize, metaType, and ghidra::SizeRestrictedFilter::minSize.

◆ filter()

bool ghidra::HomogeneousAggregate::filter ( Datatype dt) const
virtual

Test whether the given data-type belongs to this filter's data-type class.

Parameters
dtis the given data-type to test
Returns
true if the data-type is in the class, false otherwise

Reimplemented from ghidra::SizeRestrictedFilter.

References ghidra::DatatypeFilter::extractPrimitives(), ghidra::Datatype::getMetatype(), metaType, ghidra::TYPE_ARRAY, and ghidra::TYPE_STRUCT.


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