11 #ifndef __GA_RangeTypeInterface__
12 #define __GA_RangeTypeInterface__
28 #define GA_SPLIT_GRANULARITY GA_PAGE_SIZE
53 return isSplittable() && getPageCount() > 1;
81 virtual bool isSplittable()
const = 0;
84 virtual GA_Size getPageCount()
const = 0;
109 virtual bool isEmpty()
const = 0;
122 virtual GA_Size getMaxEntries()
const = 0;
126 virtual GA_Size getEntries()
const = 0;
159 virtual bool isOrdered()
const;
163 virtual bool areTraversalDeletionsSafe()
const;
191 static void *
operator new(
size_t size,
void *p) {
return p; }
192 static void *
operator new(
size_t size);
193 static void operator delete(
void *p,
size_t size);
198 bool getPageElementRangeNonSplittable()
const;
201 GA_Offset getFirstOffsetInPageNonSplittable()
const;
204 GA_Size computeEntries()
const;
A class to manage an ordered array which has fixed offset handles.
bool is_divisible() const
Convenience method to test whether the range is divisible.
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
virtual void iterateDestroy(GA_IteratorState &state) const
virtual bool canContainDuplicates() const
Abstract base class for a range membership query object.
bool operator==(const GA_RangeTypeInterface &src) const
exint GA_Size
Defines the bit width for index and offset types in GA.
A range of elements in an index-map.
virtual void iterateCreate(GA_IteratorState &state) const
Abstract implementation of a range.
const GA_IndexMap & getIndexMap() const
Accessor for the index map.
void OIIO_UTIL_API split(string_view str, std::vector< string_view > &result, string_view sep=string_view(), int maxsplit=-1)