14 template <
class T>
class TypeSet;
46 template <
class IntType>
54 static inline IntegerID
get( IntType i )
55 {
return IntegerID(i); }
57 inline IntType
getI()
const {
return nr_; }
58 inline void setI( IntType i ) { nr_ = i; }
61 {
return nr_ == oth.
nr_;};
63 {
return nr_ != oth.
nr_;};
67 inline bool isValid()
const {
return !isInvalid(); }
69 static inline IntegerID
getInvalid() {
return IntegerID(-1); }
83 #define mDefIntegerIDType(IntType,classname) \ 85 class classname : public IntegerID<IntType> \ 89 inline classname() {} \ 91 static inline classname get( IntType i ) \ 92 { return classname(i); } \ 94 inline bool operator ==( const classname& oth ) const \ 95 { return IntegerID<IntType>::operator ==(oth); } \ 96 inline bool operator !=( const classname& oth ) const \ 97 { return IntegerID<IntType>::operator !=(oth); } \ 99 static inline classname getInvalid() { return classname(-1); } \ 103 inline classname( IntType i ) \ 104 : IntegerID<IntType>(i) {} \ 106 friend class TypeSet<classname>; \ IntType IDType
Definition: integerid.h:51
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:51
bool isValid() const
Definition: integerid.h:67
void setI(IntType i)
Definition: integerid.h:58
IntType getI() const
Definition: integerid.h:57
single integer ID with comparison but no automatic conversion. Note that you will want to make a subc...
Definition: integerid.h:47
IntegerID(IntType i)
Definition: integerid.h:75
void setInvalid()
Definition: integerid.h:68
Set of (small) copyable elements.
Definition: commontypes.h:26
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:60
IntegerID()
Definition: integerid.h:53
bool isInvalid() const
Definition: integerid.h:66
IntType nr_
Definition: integerid.h:73
static IntegerID getInvalid()
Definition: integerid.h:69
#define mClass(module)
Definition: commondefs.h:161