OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
cellselection.hpp
Go to the documentation of this file.
1 #ifndef CSM_WOLRD_CELLSELECTION_H
2 #define CSM_WOLRD_CELLSELECTION_H
3 
4 #include <set>
5 
6 #include <QMetaType>
7 
8 #include "cellcoordinates.hpp"
9 
10 namespace CSMWorld
11 {
16  {
17  public:
18 
19  typedef std::set<CellCoordinates> Container;
20  typedef Container::const_iterator Iterator;
21 
22  private:
23 
25 
26  public:
27 
28  Iterator begin() const;
29 
30  Iterator end() const;
31 
32  bool add (const CellCoordinates& coordinates);
36 
37  void remove (const CellCoordinates& coordinates);
39 
40  bool has (const CellCoordinates& coordinates) const;
42 
43  int getSize() const;
45 
46  CellCoordinates getCentre() const;
50 
51  void move (int x, int y);
52  };
53 }
54 
55 Q_DECLARE_METATYPE (CSMWorld::CellSelection)
56 
57 #endif
Selection of cells in a paged worldspace.
Definition: cellselection.hpp:15
void move(int x, int y)
Definition: cellselection.cpp:74
bool add(const CellCoordinates &coordinates)
Definition: cellselection.cpp:17
Iterator begin() const
Definition: cellselection.cpp:7
Container mCells
Definition: cellselection.hpp:24
Container::const_iterator Iterator
Definition: cellselection.hpp:20
std::set< CellCoordinates > Container
Definition: cellselection.hpp:19
Definition: cellcoordinates.hpp:12
Iterator end() const
Definition: cellselection.cpp:12
CellCoordinates getCentre() const
Definition: cellselection.cpp:37
bool has(const CellCoordinates &coordinates) const
Definition: cellselection.cpp:27
int getSize() const
Return number of cells.
Definition: cellselection.cpp:32