2009-07-24 06:35:30 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
2015-06-30 05:45:10 +03:00
|
|
|
* Copyright 2013-2015, Rene Gollent, rene@gollent.com.
|
2009-07-24 06:35:30 +04:00
|
|
|
* 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 BreakpointSetting;
|
2015-06-30 05:45:10 +03:00
|
|
|
class Team;
|
2013-09-16 15:28:28 +04:00
|
|
|
class TeamFileManagerSettings;
|
2015-06-30 05:45:10 +03:00
|
|
|
class TeamSignalSettings;
|
|
|
|
class TeamUiSettings;
|
2016-05-22 22:40:46 +03:00
|
|
|
class TeamUiSettingsFactory;
|
2009-07-24 06:35:30 +04:00
|
|
|
|
|
|
|
|
|
|
|
class TeamSettings {
|
|
|
|
public:
|
|
|
|
TeamSettings();
|
|
|
|
TeamSettings(const TeamSettings& other);
|
|
|
|
// throws std::bad_alloc
|
|
|
|
~TeamSettings();
|
|
|
|
|
|
|
|
status_t SetTo(Team* team);
|
2016-05-22 22:40:46 +03:00
|
|
|
status_t SetTo(const BMessage& archive,
|
|
|
|
const TeamUiSettingsFactory& factory);
|
2009-07-24 06:35:30 +04:00
|
|
|
status_t WriteTo(BMessage& archive) const;
|
|
|
|
|
|
|
|
const BString& TeamName() const { return fTeamName; }
|
|
|
|
|
|
|
|
int32 CountBreakpoints() const;
|
|
|
|
const BreakpointSetting* BreakpointAt(int32 index) const;
|
2011-11-02 23:04:24 +04:00
|
|
|
|
2012-07-24 02:28:16 +04:00
|
|
|
int32 CountUiSettings() const;
|
|
|
|
const TeamUiSettings* UiSettingAt(int32 index) const;
|
|
|
|
const TeamUiSettings* UiSettingFor(const char* id) const;
|
|
|
|
status_t AddUiSettings(TeamUiSettings* settings);
|
2009-07-24 06:35:30 +04:00
|
|
|
|
|
|
|
TeamSettings& operator=(const TeamSettings& other);
|
|
|
|
// throws std::bad_alloc
|
|
|
|
|
2013-09-16 15:28:28 +04:00
|
|
|
TeamFileManagerSettings*
|
|
|
|
FileManagerSettings() const;
|
|
|
|
status_t SetFileManagerSettings(
|
|
|
|
TeamFileManagerSettings* settings);
|
|
|
|
|
2015-06-30 05:45:10 +03:00
|
|
|
TeamSignalSettings* SignalSettings() const;
|
|
|
|
status_t SetSignalSettings(
|
|
|
|
TeamSignalSettings* settings);
|
|
|
|
|
2009-07-24 06:35:30 +04:00
|
|
|
private:
|
|
|
|
typedef BObjectList<BreakpointSetting> BreakpointList;
|
2012-07-24 02:28:16 +04:00
|
|
|
typedef BObjectList<TeamUiSettings> UiSettingsList;
|
2009-07-24 06:35:30 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
void _Unset();
|
|
|
|
|
|
|
|
private:
|
|
|
|
BreakpointList fBreakpoints;
|
2012-07-24 02:28:16 +04:00
|
|
|
UiSettingsList fUiSettings;
|
2013-09-16 15:28:28 +04:00
|
|
|
TeamFileManagerSettings*
|
|
|
|
fFileManagerSettings;
|
2015-06-30 05:45:10 +03:00
|
|
|
TeamSignalSettings* fSignalSettings;
|
2009-07-24 06:35:30 +04:00
|
|
|
BString fTeamName;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // TEAM_SETTINGS_H
|