HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_RTIPageList.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GA_RTIPageList.h ( GA Library, C++)
7  *
8  * COMMENTS: This is similar to GA_RangeOffset, except instead of
9  * specifying a range of offsets, we specify a list of pages.
10  */
11 
12 #ifndef __GA_RTIPageList__
13 #define __GA_RTIPageList__
14 
15 #include "GA_API.h"
16 #include "GA_RangeTypeInterface.h"
17 #include "GA_Types.h"
18 
19 #include <UT/UT_SharedPtr.h>
20 #include <UT/UT_VectorTypes.h>
21 
22 
23 class GA_IndexMap;
24 class GA_IteratorState;
25 class GA_Range;
26 
27 
28 /// @brief Define a range based on a specific offset list
30 {
31 public:
32  // Iterate over the entire range of the offset list
37 
38  // Copy c-tor
40 
41  ~GA_RTIPageList() override;
42 
43  /// @{
44  /// RangeTypeInterface implementation
45  GA_RangeTypeInterface *copy() const override;
46  bool isSplittable() const override { return false; }
47  bool isEmpty() const override;
48  GA_Size getMaxEntries() const override;
49  GA_Size getEntries() const override;
50  bool split(GA_RangeTypeInterface *list[2]) const override;
51  bool isEqual(const GA_RangeTypeInterface &src) const override;
52  void iterateCopy(GA_IteratorState &dest,
53  const GA_IteratorState &src) const override;
54  void iterateRewind(GA_IteratorState &state,
55  GA_Offset &start, GA_Offset &end) const override;
56  void iterateNext(GA_IteratorState &state,
57  GA_Offset &start, GA_Offset &end) const override;
58  bool areTraversalDeletionsSafe() const override { return true; }
59  GA_Size getPageCount() const override { return -1; }
60  bool getPageElementRange(GA_Range &, GA_Size, GA_Size) const override
64  /// @}
65 
66 private:
68  GA_Offset myStart, myEnd; // Range of offset list
69 };
70 
71 #endif
A class to manage an ordered array which has fixed offset handles.
Definition: GA_IndexMap.h:63
virtual bool isEmpty() const =0
Check whether the range is empty.
virtual GA_RangeTypeInterface * copy() const =0
Method to create a copy of this selection.
virtual void iterateCopy(GA_IteratorState &dest, const GA_IteratorState &src) const =0
Copy iterator state. The dest state will not have been constructed.
GA_Offset getFirstOffsetInPage(GA_Size) const override
virtual bool split(GA_RangeTypeInterface *list[2]) const =0
GLuint start
Definition: glcorearb.h:474
Define a range based on a specific offset list.
#define GA_API
Definition: GA_API.h:14
GLenum src
Definition: glcorearb.h:1792
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
A range of elements in an index-map.
Definition: GA_Range.h:42
bool getPageElementRangeNonSplittable() const
Method which can be called for getPageElementRange()
GA_Size GA_Offset
Definition: GA_Types.h:640
bool isSplittable() const override
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:30
GA_Offset getFirstOffsetInPageNonSplittable() const
Method which can be called for getFirstOffsetInPage()
GLuint GLuint end
Definition: glcorearb.h:474
virtual void iterateRewind(GA_IteratorState &state, GA_Offset &start, GA_Offset &end) const =0
bool getPageElementRange(GA_Range &, GA_Size, GA_Size) const override
Abstract implementation of a range.
virtual GA_Size getMaxEntries() const =0
Get an upper bound on the size of the range.
GA_Size getPageCount() const override
bool areTraversalDeletionsSafe() const override
virtual GA_Size getEntries() const =0
virtual void iterateNext(GA_IteratorState &state, GA_Offset &start, GA_Offset &end) const =0
virtual bool isEqual(const GA_RangeTypeInterface &src) const =0