Add model classes for representing area information.
This commit is contained in:
@@ -139,6 +139,7 @@ Application Debugger :
|
||||
RetrieveMemoryBlockJob.cpp
|
||||
|
||||
# model
|
||||
AreaInfo.cpp
|
||||
Breakpoint.cpp
|
||||
DisassembledCode.cpp
|
||||
FileSourceCode.cpp
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright 2013, Rene Gollent, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "AreaInfo.h"
|
||||
|
||||
|
||||
AreaInfo::AreaInfo()
|
||||
:
|
||||
fTeam(-1),
|
||||
fArea(-1),
|
||||
fName(),
|
||||
fAddress(0),
|
||||
fSize(0),
|
||||
fRamSize(0),
|
||||
fLock(0),
|
||||
fProtection(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
AreaInfo::AreaInfo(const AreaInfo &other)
|
||||
:
|
||||
fTeam(other.fTeam),
|
||||
fArea(other.fArea),
|
||||
fName(other.fName),
|
||||
fAddress(other.fAddress),
|
||||
fSize(other.fSize),
|
||||
fRamSize(other.fRamSize),
|
||||
fLock(other.fLock),
|
||||
fProtection(other.fProtection)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
AreaInfo::AreaInfo(team_id team, area_id area, const BString& name,
|
||||
target_addr_t address, target_size_t size, target_size_t ramSize,
|
||||
uint32 lock, uint32 protection)
|
||||
:
|
||||
fTeam(team),
|
||||
fArea(area),
|
||||
fName(name),
|
||||
fAddress(address),
|
||||
fSize(size),
|
||||
fRamSize(ramSize),
|
||||
fLock(lock),
|
||||
fProtection(protection)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AreaInfo::SetTo(team_id team, area_id area, const BString& name,
|
||||
target_addr_t address, target_size_t size, target_size_t ramSize,
|
||||
uint32 lock, uint32 protection)
|
||||
{
|
||||
fTeam = team;
|
||||
fArea = area;
|
||||
fName = name;
|
||||
fAddress = address;
|
||||
fSize = size;
|
||||
fRamSize = ramSize;
|
||||
fLock = lock;
|
||||
fProtection = protection;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2013, Rene Gollent, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef AREA_INFO_H
|
||||
#define AREA_INFO_H
|
||||
|
||||
#include <OS.h>
|
||||
#include <String.h>
|
||||
|
||||
#include "Types.h"
|
||||
|
||||
|
||||
class AreaInfo {
|
||||
public:
|
||||
AreaInfo();
|
||||
AreaInfo(const AreaInfo& other);
|
||||
AreaInfo(team_id team, area_id area,
|
||||
const BString& name, target_addr_t address,
|
||||
target_size_t size, target_size_t ram_size,
|
||||
uint32 lock, uint32 protection);
|
||||
|
||||
void SetTo(team_id team, area_id area,
|
||||
const BString& name, target_addr_t address,
|
||||
target_size_t size, target_size_t ram_size,
|
||||
uint32 lock, uint32 protection);
|
||||
|
||||
team_id TeamID() const { return fTeam; }
|
||||
area_id AreaID() const { return fArea; }
|
||||
const BString& Name() const { return fName; }
|
||||
|
||||
target_addr_t BaseAddress() const { return fAddress; }
|
||||
target_size_t Size() const { return fSize; }
|
||||
target_size_t RamSize() const { return fRamSize; }
|
||||
uint32 Lock() const { return fLock; }
|
||||
uint32 Protection() const { return fProtection; }
|
||||
|
||||
|
||||
private:
|
||||
team_id fTeam;
|
||||
area_id fArea;
|
||||
BString fName;
|
||||
target_addr_t fAddress;
|
||||
target_size_t fSize;
|
||||
target_size_t fRamSize;
|
||||
uint32 fLock;
|
||||
uint32 fProtection;
|
||||
};
|
||||
|
||||
|
||||
#endif // AREA_INFO_H
|
||||
Reference in New Issue
Block a user