diff options
author | andrew <xdotftw@gmail.com> | 2014-01-20 15:45:40 +0100 |
---|---|---|
committer | andrew <xdotftw@gmail.com> | 2014-01-20 15:45:40 +0100 |
commit | ff2302ebd53453242175683587b19ae5de5d1aed (patch) | |
tree | a231b4f920f435800d5569e7649bd18533015896 /src/Scoreboard.h | |
parent | Scoreboard deserialization (diff) | |
download | cuberite-ff2302ebd53453242175683587b19ae5de5d1aed.tar cuberite-ff2302ebd53453242175683587b19ae5de5d1aed.tar.gz cuberite-ff2302ebd53453242175683587b19ae5de5d1aed.tar.bz2 cuberite-ff2302ebd53453242175683587b19ae5de5d1aed.tar.lz cuberite-ff2302ebd53453242175683587b19ae5de5d1aed.tar.xz cuberite-ff2302ebd53453242175683587b19ae5de5d1aed.tar.zst cuberite-ff2302ebd53453242175683587b19ae5de5d1aed.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Scoreboard.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/Scoreboard.h b/src/Scoreboard.h index f7285a9cf..2ce614de7 100644 --- a/src/Scoreboard.h +++ b/src/Scoreboard.h @@ -54,10 +54,11 @@ public: public: - cObjective(const AString & a_DisplayName, eType a_Type); + cObjective(const AString & a_Name, const AString & a_DisplayName, eType a_Type); eType GetType(void) const { return m_Type; } + const AString & GetName(void) const { return m_Name; } const AString & GetDisplayName(void) const { return m_DisplayName; } /// Resets the objective @@ -80,16 +81,19 @@ public: private: - typedef std::pair<AString, Score> TrackedPlayer; + typedef std::pair<AString, Score> cTrackedPlayer; - typedef std::map<AString, Score> ScoreMap; + typedef std::map<AString, Score> cScoreMap; - ScoreMap m_Scores; + cScoreMap m_Scores; AString m_DisplayName; + AString m_Name; eType m_Type; + friend class cScoreboardSerializer; + }; @@ -152,6 +156,8 @@ private: cPlayerNameSet m_Players; + friend class cScoreboardSerializer; + }; @@ -198,7 +204,7 @@ public: void SetDisplay(const AString & a_Objective, eDisplaySlot a_Slot); - cObjective* GetObjectiveIn(eDisplaySlot a_Slot); + cObjective * GetObjectiveIn(eDisplaySlot a_Slot); /// Execute callback for each objective with the specified type void ForEachObjectiveWith(cObjective::eType a_Type, cObjectiveCallback& a_Callback); @@ -223,6 +229,8 @@ private: cObjective* m_Display[E_DISPLAY_SLOT_COUNT]; + friend class cScoreboardSerializer; + } ; |