tbx  0.7.5
resiteratorbase.h
1 
2 #ifndef TBX_RES_RESITERATORBASE_H
3 #define TBX_RES_RESITERATORBASE_H
4 
8 template <class T> class ResIteratorBase
9 {
10 protected:
11  const T *_object;
12  int _offset;
13 
20  ResIteratorBase(const T *object, int offset) : _object(object), _offset(offset) {};
21 
22 public:
29  bool operator==(const ResIteratorBase &other) const {return _object == other._object && _offset == other._offset;}
36  bool operator!=(const ResIteratorBase &other) const {return _object != other._object || _offset != other._offset;}
37 };
38 
39 #endif
Base class for Resource component iterators.
Definition: resiteratorbase.h:8
const T * _object
Reference to object being iterated.
Definition: resiteratorbase.h:11
int _offset
Offset of current item being iterated.
Definition: resiteratorbase.h:12
ResIteratorBase(const T *object, int offset)
Construct from an object and initial offset.
Definition: resiteratorbase.h:20
bool operator!=(const ResIteratorBase &other) const
Check if this ResIteratorBase is not the same as another.
Definition: resiteratorbase.h:36
bool operator==(const ResIteratorBase &other) const
Check if this ResIteratorBase is the same as another.
Definition: resiteratorbase.h:29