Arion 1.0.2-alpha
A high-performance C++ framework for emulating executable binaries.
 
Loading...
Searching...
No Matches
arion_type::FlagType Class Reference

Class for data types represented as a set of bit flags or discrete symbolic constants. More...

#include <type_utils.hpp>

Inheritance diagram for arion_type::FlagType:
arion_type::KernelType arion_lnx_type::AccessModeType arion_lnx_type::CloneFlagType arion_lnx_type::FileATFlagType arion_lnx_type::FileModeType arion_lnx_type::FutexOpType arion_lnx_type::MmapFlagType arion_lnx_type::OpenModeType arion_lnx_type::SeekWhenceType arion_lnx_type::SignalType arion_lnx_type::SocketDomainType arion_lnx_type::SocketTypeType arion_lnx_type::StatxAttrsType arion_lnx_type::StatxMaskType

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

 FlagType (std::string name, std::map< uint64_t, std::string > flag_map)
 
- Protected Member Functions inherited from arion_type::KernelType
 KernelType (std::string name, arion::LOG_COLOR color=arion::LOG_COLOR::DEFAULT)
 

Private Attributes

std::map< uint64_t, std::string > flag_map
 Map linking raw integer flag values to their string names (e.g., 0x1 to "MAP_SHARED").
 

Detailed Description

Class for data types represented as a set of bit flags or discrete symbolic constants.

Constructor & Destructor Documentation

◆ FlagType()

arion_type::FlagType::FlagType ( std::string  name,
std::map< uint64_t, std::string >  flag_map 
)
inlineprotected

Builder for FlagType instances.

Parameters
[in]nameThe display name of the type.
[in]flag_mapThe map of value-to-string mappings.

Member Function Documentation

◆ str()

std::string arion_type::FlagType::str ( std::shared_ptr< arion::Arion arion,
uint64_t  val 
)
overridevirtual

Converts a raw value into a string representation, combining known flags (e.g., "FLAG_A|FLAG_B").

Parameters
[in]arionShared pointer to the Arion instance.
[in]valThe raw 64-bit flag value.
Returns
The formatted string representation of the flags.

Reimplemented from arion_type::KernelType.

Member Data Documentation

◆ flag_map

std::map<uint64_t, std::string> arion_type::FlagType::flag_map
private

Map linking raw integer flag values to their string names (e.g., 0x1 to "MAP_SHARED").


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