Add team information model class.

This commit is contained in:
Rene Gollent 2013-04-25 18:46:06 -04:00
parent 4cbcabff5f
commit aecef63c52
3 changed files with 70 additions and 0 deletions

View File

@ -156,6 +156,7 @@ Application Debugger :
SymbolInfo.cpp
SystemInfo.cpp
Team.cpp
TeamInfo.cpp
TeamMemory.cpp
TeamMemoryBlock.cpp
TeamTypeInformation.cpp

View 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);
}

View 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