WolPSX
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Range Struct Reference

Structure to store a range of addresses to allow easy checking. More...

#include <bus.hpp>

Public Member Functions

 Range (uint32_t start, uint32_t end)
 Construct a new Range object.
 
bool contains (uint32_t addr)
 Checks if the given address is in the range.
 
uint32_t offset (uint32_t addr)
 Gets the offset of the given address from the start of the range.
 

Public Attributes

uint32_t start
 Start of the range (inclusive)
 
uint32_t end
 End of the range (inclusive)
 

Detailed Description

Structure to store a range of addresses to allow easy checking.

Definition at line 26 of file bus.hpp.

Constructor & Destructor Documentation

◆ Range()

Range::Range ( uint32_t start,
uint32_t end )
inline

Construct a new Range object.

Parameters
startStart of the range (inclusive)
endEnd of the range (inclusive)

Definition at line 46 of file bus.hpp.

Member Function Documentation

◆ contains()

bool Range::contains ( uint32_t addr)
inline

Checks if the given address is in the range.

Parameters
addrAddress to check
Returns
true Address is in the range
false Address is not in the range

Definition at line 55 of file bus.hpp.

◆ offset()

uint32_t Range::offset ( uint32_t addr)
inline

Gets the offset of the given address from the start of the range.

Parameters
addrAddress to get the offset of
Returns
uint32_t Offset of the address from the start of the range

Definition at line 66 of file bus.hpp.

Member Data Documentation

◆ end

uint32_t Range::end

End of the range (inclusive)

Definition at line 38 of file bus.hpp.

◆ start

uint32_t Range::start

Start of the range (inclusive)

Definition at line 32 of file bus.hpp.


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