btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / debugger / settings / TeamSettings.h
blob2e5e45fc7246d2717ab80666aeab26c3083301f9
1 /*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Copyright 2013-2015, Rene Gollent, rene@gollent.com.
4 * Distributed under the terms of the MIT License.
5 */
6 #ifndef TEAM_SETTINGS_H
7 #define TEAM_SETTINGS_H
10 #include <String.h>
12 #include <ObjectList.h>
15 class BMessage;
16 class BreakpointSetting;
17 class Team;
18 class TeamFileManagerSettings;
19 class TeamSignalSettings;
20 class TeamUiSettings;
21 class TeamUiSettingsFactory;
24 class TeamSettings {
25 public:
26 TeamSettings();
27 TeamSettings(const TeamSettings& other);
28 // throws std::bad_alloc
29 ~TeamSettings();
31 status_t SetTo(Team* team);
32 status_t SetTo(const BMessage& archive,
33 const TeamUiSettingsFactory& factory);
34 status_t WriteTo(BMessage& archive) const;
36 const BString& TeamName() const { return fTeamName; }
38 int32 CountBreakpoints() const;
39 const BreakpointSetting* BreakpointAt(int32 index) const;
41 int32 CountUiSettings() const;
42 const TeamUiSettings* UiSettingAt(int32 index) const;
43 const TeamUiSettings* UiSettingFor(const char* id) const;
44 status_t AddUiSettings(TeamUiSettings* settings);
46 TeamSettings& operator=(const TeamSettings& other);
47 // throws std::bad_alloc
49 TeamFileManagerSettings*
50 FileManagerSettings() const;
51 status_t SetFileManagerSettings(
52 TeamFileManagerSettings* settings);
54 TeamSignalSettings* SignalSettings() const;
55 status_t SetSignalSettings(
56 TeamSignalSettings* settings);
58 private:
59 typedef BObjectList<BreakpointSetting> BreakpointList;
60 typedef BObjectList<TeamUiSettings> UiSettingsList;
62 private:
63 void _Unset();
65 private:
66 BreakpointList fBreakpoints;
67 UiSettingsList fUiSettings;
68 TeamFileManagerSettings*
69 fFileManagerSettings;
70 TeamSignalSettings* fSignalSettings;
71 BString fTeamName;
75 #endif // TEAM_SETTINGS_H