[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / src / shared / Base.h
blobd5907fdf47315a415f9c3100083f6147ccf65c80
1 /*
2 Base class interface
3 Copyright (C) 1998,1999 by Andrew Zabolotny
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the Free
17 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __BASE_H__
21 #define __BASE_H__
23 #include "Common.h"
25 /**
26 * This class is intended to be a base class for every other class.
27 * It defines the basic interface available for any object.
29 class Base
31 private:
32 /// Object reference count
33 int RefCount;
35 protected:
36 /**
37 * Destroy this object. Destructor is virtual, because class contains
38 * virtual methods; also it is private because it is never intended
39 * to be called directly; use DecRef() instead: when reference counter
40 * reaches zero, the object will be destroyed.
42 virtual ~Base ();
44 public:
46 Base ();
48 void IncRef ();
50 void DecRef ();
51 int GetRefCount ();
54 #endif // __BASE_H__