Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Rose::BinaryAnalysis::Partitioner2::DataBlock Class Reference


Data block information.

A data block represents data with a type.

Definition at line 19 of file DataBlock.h.

#include <DataBlock.h>

Inheritance diagram for Rose::BinaryAnalysis::Partitioner2::DataBlock:
Inheritance graph
Collaboration diagram for Rose::BinaryAnalysis::Partitioner2::DataBlock:
Collaboration graph

Public Types

typedef Sawyer::SharedPointer< DataBlockPtr
 Shared pointer to a data block. More...
- Public Types inherited from Sawyer::Attribute::Storage<>
typedef SynchronizationTraits< Sawyer::SingleThreadedTagSync

Public Member Functions

virtual Ptr create (rose_addr_t startVa, size_t size) const
 Virtual constructor. More...
bool isFrozen () const
 Determine if data block is read-only. More...
rose_addr_t address () const
 Returns the starting address. More...
size_t size () const
 Returns the size in bytes. More...
void size (size_t nBytes)
 Change size of data block. More...
size_t nAttachedOwners () const
 Number of attached basic block and function owners. More...
AddressInterval extent () const
 Addresses represented. More...
std::string printableName () const
 A printable name for this data block. More...
- Public Member Functions inherited from Sawyer::SharedObject
 SharedObject ()
 Default constructor. More...
 SharedObject (const SharedObject &)
 Copy constructor. More...
virtual ~SharedObject ()
 Virtual destructor. More...
SharedObjectoperator= (const SharedObject &)
 Assignment. More...
- Public Member Functions inherited from Sawyer::Attribute::Storage<>
 Storage ()
 Default constructor. More...
 Storage (const Storage &other)
 Copy constructor. More...
Storageoperator= (const Storage &other)
 Assignment operator. More...
bool attributeExists (Id id) const
 Check attribute existence. More...
void eraseAttribute (Id id)
 Erase an attribute. More...
void clearAttributes ()
 Erase all attributes. More...
void setAttribute (Id id, const T &value)
 Store an attribute. More...
bool setAttributeMaybe (Id id, const T &value)
 Store an attribute if not already present. More...
getAttribute (Id id) const
 Get an attribute that is known to exist. More...
attributeOrElse (Id id, const T &dflt) const
 Return an attribute or a specified value. More...
attributeOrDefault (Id id) const
 Return an attribute or a default-constructed value. More...
Sawyer::Optional< T > optionalAttribute (Id id) const
 Return the attribute as an optional value. More...
size_t nAttributes () const
 Number of attributes stored. More...
std::vector< IdattributeIds () const
 Returns ID numbers for all IDs stored in this container. More...

Static Public Member Functions

static Ptr instance (rose_addr_t startVa, size_t size)
 Static allocating constructor. More...

Protected Member Functions

 DataBlock (rose_addr_t startVa, size_t size)

Member Typedef Documentation

Shared pointer to a data block.

See Shared ownership.

Definition at line 22 of file DataBlock.h.

Member Function Documentation

static Ptr Rose::BinaryAnalysis::Partitioner2::DataBlock::instance ( rose_addr_t  startVa,
size_t  size 

Static allocating constructor.

The startVa is the starting address of the data block.

Definition at line 57 of file DataBlock.h.

Referenced by create().

virtual Ptr Rose::BinaryAnalysis::Partitioner2::DataBlock::create ( rose_addr_t  startVa,
size_t  size 
) const

Virtual constructor.

The startVa is the starting address for this data block.

Definition at line 64 of file DataBlock.h.

References instance().

bool Rose::BinaryAnalysis::Partitioner2::DataBlock::isFrozen ( ) const

Determine if data block is read-only.

Returns true if read-only, false otherwise.

Definition at line 71 of file DataBlock.h.

rose_addr_t Rose::BinaryAnalysis::Partitioner2::DataBlock::address ( ) const

Returns the starting address.

Definition at line 74 of file DataBlock.h.

Referenced by extent().

size_t Rose::BinaryAnalysis::Partitioner2::DataBlock::size ( ) const

Returns the size in bytes.

Definition at line 77 of file DataBlock.h.

Referenced by extent().

void Rose::BinaryAnalysis::Partitioner2::DataBlock::size ( size_t  nBytes)

Change size of data block.

The size of a data block can only be changed directly when it is not represented by the control flow graph. That is, when this object is not in a frozen state.

size_t Rose::BinaryAnalysis::Partitioner2::DataBlock::nAttachedOwners ( ) const

Number of attached basic block and function owners.

Returns the number of data blocks and functions that are attached to the CFG/AUM and that own this data block.

Definition at line 90 of file DataBlock.h.

AddressInterval Rose::BinaryAnalysis::Partitioner2::DataBlock::extent ( ) const

Addresses represented.

Definition at line 93 of file DataBlock.h.

References address(), Sawyer::Container::Interval< rose_addr_t >::baseSize(), and size().

std::string Rose::BinaryAnalysis::Partitioner2::DataBlock::printableName ( ) const

A printable name for this data block.

Returns a string like 'data block 0x10001234'.

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