From 9ee47e59995f858ec531b3ee467f131594e4ba1f Mon Sep 17 00:00:00 2001 From: Mattes D Date: Mon, 13 Apr 2020 18:38:06 +0200 Subject: Using Super. --- src/CompositeChat.h | 63 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 15 deletions(-) (limited to 'src/CompositeChat.h') diff --git a/src/CompositeChat.h b/src/CompositeChat.h index ab16e9f72..a715d0402 100644 --- a/src/CompositeChat.h +++ b/src/CompositeChat.h @@ -43,6 +43,8 @@ public: ptShowAchievement, } ; + + class cBasePart { public: @@ -57,70 +59,101 @@ public: virtual ~cBasePart() {} } ; - class cTextPart : + + + class cTextPart: public cBasePart { - typedef cBasePart super; + using Super = cBasePart; + public: + cTextPart(const AString & a_Text, const AString & a_Style = ""); } ; - class cClientTranslatedPart : + + + class cClientTranslatedPart: public cBasePart { - typedef cBasePart super; + using Super = cBasePart; + public: + AStringVector m_Parameters; cClientTranslatedPart(const AString & a_TranslationID, const AStringVector & a_Parameters, const AString & a_Style = ""); } ; - class cUrlPart : + + + class cUrlPart: public cBasePart { - typedef cBasePart super; + using Super = cBasePart; + public: + AString m_Url; cUrlPart(const AString & a_Text, const AString & a_Url, const AString & a_Style = ""); } ; - class cCommandPart : + + + class cCommandPart: public cBasePart { - typedef cBasePart super; + using Super = cBasePart; + public: + AString m_Command; cCommandPart(ePartType a_PartType, const AString & a_Text, const AString & a_Command, const AString & a_Style = ""); } ; - class cRunCommandPart : + + + class cRunCommandPart: public cCommandPart { - typedef cCommandPart super; + using Super = cCommandPart; + public: + cRunCommandPart(const AString & a_Text, const AString & a_Command, const AString & a_Style = ""); } ; - class cSuggestCommandPart : + + + class cSuggestCommandPart: public cCommandPart { - typedef cCommandPart super; + using Super = cCommandPart; + public: + cSuggestCommandPart(const AString & a_Text, const AString & a_Command, const AString & a_Style = ""); } ; - class cShowAchievementPart : + + + class cShowAchievementPart: public cBasePart { - typedef cBasePart super; + using Super = cBasePart; + public: + AString m_PlayerName; cShowAchievementPart(const AString & a_PlayerName, const AString & a_Achievement, const AString & a_Style = ""); } ; - typedef std::vector cParts; + + + using cParts = std::vector; + /** Creates a new empty chat message. Exported manually due to the other overload needing a manual export. */ -- cgit v1.2.3