Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
container.h
Go to the documentation of this file.
1 #ifndef _UNITCONTAINER_H_
2 #define _UNITCONTAINER_H_
3 
4 #include "debug_vs.h"
5 
6 class Unit;
7 
9 {
10 protected:
12 public: UnitContainer();
13  UnitContainer( Unit* );
15  {
16  VSCONSTRUCT1( 'U' )
17  unit = 0;
18  SetUnit( un.unit );
19  }
21  {
22  SetUnit( a.unit );
23  return a;
24  }
25  bool operator==( const Unit *oth ) const
26  {
27  return unit == oth;
28  }
29  bool operator!=( const Unit *oth ) const
30  {
31  return unit != oth;
32  }
33  bool operator==( const UnitContainer oth ) const
34  {
35  return unit == oth.unit;
36  }
37  bool operator!=( const UnitContainer oth ) const
38  {
39  return unit != oth.unit;
40  }
42  void SetUnit( Unit* );
43  Unit * GetUnit();
44 };
45 
46 #endif
47