Gadget
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fleetptrvector.h
Go to the documentation of this file.
1 #ifndef fleetptrvector_h
2 #define fleetptrvector_h
3 
4 class Fleet;
5 
11 public:
15  FleetPtrVector() { size = 0; v = 0; };
20  FleetPtrVector(const FleetPtrVector& initial);
30  void resize(Fleet* value);
36  void Delete(int pos);
41  int Size() const { return size; };
47  Fleet*& operator [] (int pos) { return v[pos]; };
53  Fleet* const& operator [] (int pos) const { return v[pos]; };
54 protected:
58  Fleet** v;
62  int size;
63 };
64 
65 #endif
This class implements a dynamic vector of Fleet values.
Definition: fleetptrvector.h:10
int size
This is the size of the vector.
Definition: fleetptrvector.h:62
FleetPtrVector()
This is the default FleetPtrVector constructor.
Definition: fleetptrvector.h:15
~FleetPtrVector()
This is the FleetPtrVector destructor.
Definition: fleetptrvector.cc:15
Fleet *& operator[](int pos)
This will return the value of an element of the vector.
Definition: fleetptrvector.h:47
void Delete(int pos)
This will delete an entry from the vector.
Definition: fleetptrvector.cc:37
void resize(Fleet *value)
This will add one new entry to the vector.
Definition: fleetptrvector.cc:22
int Size() const
This will return the size of the vector.
Definition: fleetptrvector.h:41
Fleet ** v
This is the vector of Fleet values.
Definition: fleetptrvector.h:53
This is the class used to model the predation that is due to the action of a fleet in the Gadget mode...
Definition: fleet.h:17