Arion 1.0.2-alpha
A high-performance C++ framework for emulating executable binaries.
 
Loading...
Searching...
No Matches
arion_poly_struct::ArionStructType< T > Class Template Reference

#include <struct_utils.hpp>

Inheritance diagram for arion_poly_struct::ArionStructType< T >:
arion_type::KernelType arion_poly_struct::AbsArionStructType

Public Member Functions

std::string str (std::shared_ptr< arion::Arion > arion, uint64_t val) override
 
- Public Member Functions inherited from arion_type::KernelType
virtual ~KernelType ()=default
 Virtual destructor to allow polymorphic deletion.
 
arion::LOG_COLOR get_color ()
 

Protected Member Functions

 ArionStructType (std::string name, std::shared_ptr< arion_poly_struct::PolymorphicStructFactory< T > > factory)
 
- Protected Member Functions inherited from arion_type::KernelType
 KernelType (std::string name, arion::LOG_COLOR color=arion::LOG_COLOR::DEFAULT)
 
- Protected Member Functions inherited from arion_poly_struct::AbsArionStructType
virtual ~AbsArionStructType ()=default
 
bool arion_is_mapped (std::shared_ptr< arion::Arion > arion, arion::ADDR addr)
 
arion::CPU_ARCH arion_curr_arch (std::shared_ptr< arion::Arion > arion)
 
std::vector< arion::BYTEarion_read_mem (std::shared_ptr< arion::Arion > arion, arion::ADDR addr, size_t sz)
 

Private Attributes

std::shared_ptr< arion_poly_struct::PolymorphicStructFactory< T > > factory
 The factory responsible for handling the polymorphic nature of the structure.
 

Detailed Description

template<typename T>
class arion_poly_struct::ArionStructType< T >

Represents a standard, polymorphic structure type (fixed layout, but size/field interpretation depends on architecture).

Template Parameters
TThe host-side C++ type corresponding to the structure being represented.

Constructor & Destructor Documentation

◆ ArionStructType()

template<typename T >
arion_poly_struct::ArionStructType< T >::ArionStructType ( std::string  name,
std::shared_ptr< arion_poly_struct::PolymorphicStructFactory< T > >  factory 
)
inlineprotected

Builder for ArionStructType instances.

Parameters
[in]nameThe display name of the structure type.
[in]factoryThe shared pointer to the factory defining the structure layout.

Member Function Documentation

◆ str()

template<typename T >
std::string arion_poly_struct::ArionStructType< T >::str ( std::shared_ptr< arion::Arion arion,
uint64_t  val 
)
inlineoverridevirtual

Converts a memory address pointing to the structure in emulated memory to a formatted string representation of the structure content.

Parameters
[in]arionShared pointer to the Arion instance.
[in]valThe memory address pointing to the structure.
Returns
The formatted string representation of the structure content.

Reimplemented from arion_type::KernelType.

Reimplemented in arion_lnx_type::StructSockaddrUnType.

Member Data Documentation

◆ factory

template<typename T >
std::shared_ptr<arion_poly_struct::PolymorphicStructFactory<T> > arion_poly_struct::ArionStructType< T >::factory
private

The factory responsible for handling the polymorphic nature of the structure.


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