AsmGrader 0.0.0
Loading...
Searching...
No Matches
asmgrader::AsmData< T > Class Template Reference

#include <asm_data.hpp>

Inheritance diagram for asmgrader::AsmData< T >:
[legend]

Public Member Functions

 AsmData (Program &prog, std::uintptr_t address)
 
virtual ~AsmData ()=default
 
std::uintptr_t get_address () const
 
virtual Result< T > get_value () const
 Get the value currently present in the asm program.
 
template<MemoryIOCompatible< T > U>
requires (MemoryWriteSupported<U>)
set_value (const U &val) const
 Set the value of type T in the asm program.
 
zero () const
 Zeros the object of type T residing in the asm program.
 

Protected Member Functions

Result< T > get_value_impl () const
 
Programget_program () const
 

Constructor & Destructor Documentation

◆ AsmData()

template<typename T >
requires (MemoryReadSupported<T>)
asmgrader::AsmData< T >::AsmData ( Program & prog,
std::uintptr_t address )

◆ ~AsmData()

template<typename T >
virtual asmgrader::AsmData< T >::~AsmData ( )
virtualdefault

Member Function Documentation

◆ get_address()

template<typename T >
std::uintptr_t asmgrader::AsmData< T >::get_address ( ) const
inline

◆ get_program()

template<typename T >
Program & asmgrader::AsmData< T >::get_program ( ) const
inlineprotected

◆ get_value()

template<typename T >
requires (MemoryReadSupported<T>)
Result< T > asmgrader::AsmData< T >::get_value ( ) const
virtual

Get the value currently present in the asm program.

Reimplemented in asmgrader::AsmSymbol< T >.

◆ get_value_impl()

template<typename T >
requires (MemoryReadSupported<T>)
Result< T > asmgrader::AsmData< T >::get_value_impl ( ) const
protected

◆ set_value()

template<typename T >
requires (MemoryWriteSupported<U>)
template<MemoryIOCompatible< T > U>
requires (MemoryWriteSupported<U>)
T asmgrader::AsmData< T >::set_value ( const U & val) const

Set the value of type T in the asm program.

Returns the previously held value

◆ zero()

template<typename T >
requires (MemoryWriteSupported<T>)
T asmgrader::AsmData< T >::zero ( ) const

Zeros the object of type T residing in the asm program.

This is equivalent to set_value(T{}) if T is default-constructable. If not, simply sets the bytes in the range [address, address + sizeof(T)] to 0


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