add 'id' function to range base
This commit is contained in:
parent
ef6876adc9
commit
29c0f48f77
2 changed files with 7 additions and 1 deletions
|
@ -78,6 +78,8 @@ namespace MultiArrayTools
|
||||||
bool operator==(const RangeBase& in) const;
|
bool operator==(const RangeBase& in) const;
|
||||||
bool operator!=(const RangeBase& in) const;
|
bool operator!=(const RangeBase& in) const;
|
||||||
|
|
||||||
|
std::intptr_t id() const;
|
||||||
|
|
||||||
virtual std::string stringMeta(size_t pos) const = 0;
|
virtual std::string stringMeta(size_t pos) const = 0;
|
||||||
virtual std::vector<char> data() const = 0; // usefull when writing to files, etc...
|
virtual std::vector<char> data() const = 0; // usefull when writing to files, etc...
|
||||||
|
|
||||||
|
|
|
@ -178,5 +178,9 @@ namespace MultiArrayTools
|
||||||
return this != ∈
|
return this != ∈
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::intptr_t RangeBase::id() const
|
||||||
|
{
|
||||||
|
return reinterpret_cast<std::intptr_t>(this);
|
||||||
|
}
|
||||||
|
|
||||||
} // end namespace MultiArrayTools
|
} // end namespace MultiArrayTools
|
||||||
|
|
Loading…
Reference in a new issue