Arion 1.0.2-alpha
A high-performance C++ framework for emulating executable binaries.
 
Loading...
Searching...
No Matches
arion_poly_struct::ArionVariableStructType Class Referenceabstract

#include <struct_utils.hpp>

Inheritance diagram for arion_poly_struct::ArionVariableStructType:
arion_type::KernelType arion_lnx_type::StructSockaddrType

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

 ArionVariableStructType (std::string name)
 
- Protected Member Functions inherited from arion_type::KernelType
 KernelType (std::string name, arion::LOG_COLOR color=arion::LOG_COLOR::DEFAULT)
 

Private Member Functions

virtual std::shared_ptr< arion_poly_struct::AbsArionStructTypeprocess (std::shared_ptr< arion::Arion > arion, uint64_t val)=0
 

Detailed Description

Represents a variable polymorphic structure type (e.g., sockaddr), where the final structure type depends on runtime data (like a family field).

Constructor & Destructor Documentation

◆ ArionVariableStructType()

arion_poly_struct::ArionVariableStructType::ArionVariableStructType ( std::string  name)
inlineprotected

Builder for ArionVariableStructType instances.

Parameters
[in]nameThe display name of the structure type.

Member Function Documentation

◆ process()

virtual std::shared_ptr< arion_poly_struct::AbsArionStructType > arion_poly_struct::ArionVariableStructType::process ( std::shared_ptr< arion::Arion arion,
uint64_t  val 
)
privatepure virtual

**(Pure Virtual)** Logic to dynamically determine the concrete structure type based on the content of the emulated memory.

Parameters
[in]arionShared pointer to the Arion instance.
[in]valThe memory address pointing to the generic structure.
Returns
A shared pointer to the concrete AbsArionStructType instance (e.g., StructSockaddrInType).

Implemented in arion_lnx_type::StructSockaddrType.

◆ str()

std::string arion_poly_struct::ArionVariableStructType::str ( std::shared_ptr< arion::Arion arion,
uint64_t  val 
)
inlineoverridevirtual

Overrides the string conversion to first call process to determine the concrete type, and then uses that concrete type's str method.

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

Reimplemented from arion_type::KernelType.


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