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;
|
||||
|
||||
std::intptr_t id() const;
|
||||
|
||||
virtual std::string stringMeta(size_t pos) const = 0;
|
||||
virtual std::vector<char> data() const = 0; // usefull when writing to files, etc...
|
||||
|
||||
|
|
|
@ -177,6 +177,10 @@ namespace MultiArrayTools
|
|||
{
|
||||
return this != ∈
|
||||
}
|
||||
|
||||
|
||||
std::intptr_t RangeBase::id() const
|
||||
{
|
||||
return reinterpret_cast<std::intptr_t>(this);
|
||||
}
|
||||
|
||||
} // end namespace MultiArrayTools
|
||||
|
|
Loading…
Reference in a new issue