HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GA_RTIRepeater.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_RTIRepeater.h ( GA Library, C++)
7  *
8  * COMMENTS: This is like the "Python" range function. That is, the end is
9  * non-inclusive:
10  * GA_RTIRepeater(list, 0, 3) = [0, 1, 2]
11  */
12 
13 #ifndef __GA_RTIRepeater__
14 #define __GA_RTIRepeater__
15 
16 #include "GA_API.h"
17 #include "GA_RangeTypeInterface.h"
18 #include "GA_Types.h"
19 
20 
21 class GA_IndexMap;
22 class GA_IteratorState;
23 class GA_Range;
24 
25 
27 {
28 public:
29  // Range which repeats the @c offset for @c count times
31 
32  // Copy c-tor
34  virtual ~GA_RTIRepeater();
35 
36  /// @{
37  /// RangeTypeInterface implementation
38  virtual GA_RangeTypeInterface *copy() const;
39  virtual bool isSplittable() const { return false; }
40  virtual bool isEmpty() const;
41  virtual GA_Size getMaxEntries() const;
42  virtual GA_Size getEntries() const;
43  virtual bool split(GA_RangeTypeInterface *list[2]) const;
44  virtual bool isEqual(const GA_RangeTypeInterface &src) const;
45  virtual void iterateCopy(GA_IteratorState &dest,
46  const GA_IteratorState &src) const;
47  virtual void iterateRewind(GA_IteratorState &state,
48  GA_Offset &start, GA_Offset &end) const;
49  virtual void iterateNext(GA_IteratorState &state,
50  GA_Offset &start, GA_Offset &end) const;
51  virtual bool areTraversalDeletionsSafe() const { return true; }
52  virtual GA_Size getPageCount() const { return -1; }
53  virtual bool getPageElementRange(GA_Range &, GA_Size, GA_Size) const
57  /// @}
58 
59 private:
60  /// @{
61  /// RangeTypeInterface implementation
62  virtual void singleRewind(GA_IteratorState &state) const;
63  virtual bool singleGet(const GA_IteratorState &state,
64  GA_Offset &value) const;
65  virtual void singleNext(GA_IteratorState &state) const;
66  /// @}
67 
68  GA_Offset myOffset;
69  GA_Size myCount;
70 };
71 
72 #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.
virtual bool split(GA_RangeTypeInterface *list[2]) const =0
GLuint start
Definition: glcorearb.h:474
#define GA_API
Definition: GA_API.h:12
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:211
A range of elements in an index-map.
Definition: GA_Range.h:42
virtual bool areTraversalDeletionsSafe() const
bool getPageElementRangeNonSplittable() const
Method which can be called for getPageElementRange()
GA_Size GA_Offset
Definition: GA_Types.h:617
virtual GA_Offset getFirstOffsetInPage(GA_Size) const
virtual GA_Size getPageCount() const
GA_Offset getFirstOffsetInPageNonSplittable() const
Method which can be called for getFirstOffsetInPage()
GLuint GLuint end
Definition: glcorearb.h:474
GLintptr offset
Definition: glcorearb.h:664
virtual void iterateRewind(GA_IteratorState &state, GA_Offset &start, GA_Offset &end) const =0
Abstract implementation of a range.
GLint GLsizei count
Definition: glcorearb.h:404
virtual bool isSplittable() const
GLsizei const GLfloat * value
Definition: glcorearb.h:823
virtual GA_Size getMaxEntries() const =0
Get an upper bound on the size of the range.
virtual bool getPageElementRange(GA_Range &, GA_Size, GA_Size) const
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
GLenum src
Definition: glcorearb.h:1792