2009-07-24 02:35:30 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef TEAM_SETTINGS_H
|
|
|
|
#define TEAM_SETTINGS_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <String.h>
|
|
|
|
|
|
|
|
#include <ObjectList.h>
|
|
|
|
|
|
|
|
|
|
|
|
class BMessage;
|
|
|
|
class Team;
|
|
|
|
class BreakpointSetting;
|
2011-11-01 12:45:01 +00:00
|
|
|
class TeamUISettings;
|
2009-07-24 02:35:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TeamSettings {
|
|
|
|
public:
|
|
|
|
TeamSettings();
|
|
|
|
TeamSettings(const TeamSettings& other);
|
|
|
|
// throws std::bad_alloc
|
|
|
|
~TeamSettings();
|
|
|
|
|
|
|
|
status_t SetTo(Team* team);
|
|
|
|
status_t SetTo(const BMessage& archive);
|
|
|
|
status_t WriteTo(BMessage& archive) const;
|
|
|
|
|
|
|
|
const BString& TeamName() const { return fTeamName; }
|
|
|
|
|
|
|
|
int32 CountBreakpoints() const;
|
|
|
|
const BreakpointSetting* BreakpointAt(int32 index) const;
|
2011-11-01 12:45:01 +00:00
|
|
|
|
|
|
|
int32 CountUISettings() const;
|
|
|
|
const TeamUISettings* UISettingAt(int32 index) const;
|
2009-07-24 02:35:30 +00:00
|
|
|
|
|
|
|
TeamSettings& operator=(const TeamSettings& other);
|
|
|
|
// throws std::bad_alloc
|
|
|
|
|
|
|
|
private:
|
|
|
|
typedef BObjectList<BreakpointSetting> BreakpointList;
|
2011-11-01 12:45:01 +00:00
|
|
|
typedef BObjectList<TeamUISettings> UISettingsList;
|
2009-07-24 02:35:30 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void _Unset();
|
|
|
|
|
|
|
|
private:
|
|
|
|
BreakpointList fBreakpoints;
|
2011-11-01 12:45:01 +00:00
|
|
|
UISettingsList fUISettings;
|
2009-07-24 02:35:30 +00:00
|
|
|
BString fTeamName;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // TEAM_SETTINGS_H
|