Add team information model class.
This commit is contained in:
parent
4cbcabff5f
commit
aecef63c52
@ -156,6 +156,7 @@ Application Debugger :
|
||||
SymbolInfo.cpp
|
||||
SystemInfo.cpp
|
||||
Team.cpp
|
||||
TeamInfo.cpp
|
||||
TeamMemory.cpp
|
||||
TeamMemoryBlock.cpp
|
||||
TeamTypeInformation.cpp
|
||||
|
36
src/apps/debugger/model/TeamInfo.cpp
Normal file
36
src/apps/debugger/model/TeamInfo.cpp
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2013, Rene Gollent, rene@gollent.com.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "TeamInfo.h"
|
||||
|
||||
|
||||
TeamInfo::TeamInfo()
|
||||
:
|
||||
fTeam(-1),
|
||||
fArguments()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
TeamInfo::TeamInfo(const TeamInfo &other)
|
||||
{
|
||||
fTeam = other.fTeam;
|
||||
fArguments = other.fArguments;
|
||||
}
|
||||
|
||||
|
||||
TeamInfo::TeamInfo(team_id team, const team_info& info)
|
||||
{
|
||||
SetTo(team, info);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TeamInfo::SetTo(team_id team, const team_info& info)
|
||||
{
|
||||
fTeam = team;
|
||||
fArguments.SetTo(info.args);
|
||||
}
|
33
src/apps/debugger/model/TeamInfo.h
Normal file
33
src/apps/debugger/model/TeamInfo.h
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright 2013, Rene Gollent, rene@gollent.com.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef TEAM_INFO_H
|
||||
#define TEAM_INFO_H
|
||||
|
||||
#include <OS.h>
|
||||
#include <String.h>
|
||||
|
||||
#include "Types.h"
|
||||
|
||||
|
||||
class TeamInfo {
|
||||
public:
|
||||
TeamInfo();
|
||||
TeamInfo(const TeamInfo& other);
|
||||
TeamInfo(team_id team,
|
||||
const team_info& info);
|
||||
|
||||
void SetTo(team_id team, const team_info& info);
|
||||
|
||||
team_id TeamID() const { return fTeam; }
|
||||
|
||||
const BString& Arguments() const { return fArguments; }
|
||||
|
||||
private:
|
||||
team_id fTeam;
|
||||
BString fArguments;
|
||||
};
|
||||
|
||||
|
||||
#endif // TEAM_INFO_H
|
Loading…
x
Reference in New Issue
Block a user