TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GroupReference.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
3  * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License as published by the
7  * Free Software Foundation; either version 2 of the License, or (at your
8  * option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef _GROUPREFERENCE_H
20 #define _GROUPREFERENCE_H
21 
23 
24 class Group;
25 class Player;
26 
27 class TC_GAME_API GroupReference : public Reference<Group, Player>
28 {
29  protected:
31  void targetObjectBuildLink() override;
32  void targetObjectDestroyLink() override;
33  void sourceObjectDestroyLink() override;
34  public:
35  GroupReference() : Reference<Group, Player>(), iSubGroup(0) { }
39  uint8 getSubGroup() const { return iSubGroup; }
40  void setSubGroup(uint8 pSubGroup) { iSubGroup = pSubGroup; }
41 };
42 #endif
43 
void unlink()
Definition: Reference.h:61
GroupReference()
Definition: GroupReference.h:35
virtual void targetObjectDestroyLink()=0
virtual void sourceObjectDestroyLink()=0
uint8 getSubGroup() const
Definition: GroupReference.h:39
void setSubGroup(uint8 pSubGroup)
Definition: GroupReference.h:40
Definition: Reference.h:27
Reference< TO, FROM > * next()
Definition: Reference.h:83
GroupReference * next()
Definition: GroupReference.h:37
GroupReference const * next() const
Definition: GroupReference.h:38
#define TC_GAME_API
Definition: Define.h:134
uint8 iSubGroup
Definition: GroupReference.h:30
virtual void targetObjectBuildLink()=0
uint8_t uint8
Definition: Define.h:152
~GroupReference()
Definition: GroupReference.h:36
Definition: Group.h:191
Definition: GroupReference.h:27