mirror of
https://github.com/DerKoun/bsnes-hd.git
synced 2025-04-02 10:52:49 -04:00
43 lines
834 B
C++
43 lines
834 B
C++
#if defined(Hiro_Cursor)
|
|
|
|
Cursor::Cursor(int offset, int length) {
|
|
setCursor(offset, length);
|
|
}
|
|
|
|
Cursor::operator bool() const {
|
|
return offset() || length();
|
|
}
|
|
|
|
auto Cursor::operator==(const Cursor& source) const -> bool {
|
|
return offset() == source.offset() && length() == source.length();
|
|
}
|
|
|
|
auto Cursor::operator!=(const Cursor& source) const -> bool {
|
|
return !operator==(source);
|
|
}
|
|
|
|
auto Cursor::length() const -> int {
|
|
return state.length;
|
|
}
|
|
|
|
auto Cursor::offset() const -> int {
|
|
return state.offset;
|
|
}
|
|
|
|
auto Cursor::setCursor(int offset, int length) -> type& {
|
|
state.offset = offset;
|
|
state.length = length;
|
|
return *this;
|
|
}
|
|
|
|
auto Cursor::setLength(int length) -> type& {
|
|
state.length = length;
|
|
return *this;
|
|
}
|
|
|
|
auto Cursor::setOffset(int offset) -> type& {
|
|
state.offset = offset;
|
|
return *this;
|
|
}
|
|
|
|
#endif
|