ReactOS  0.4.15-dev-3303-g1ade494
SortBuffer Struct Reference
Collaboration diagram for SortBuffer:

Public Types

enum  { kBufferSize = 100 }
 

Public Member Functions

SortClassbegin ()
 
const SortClassbegin () const
 
SortClassend ()
 
const SortClassend () const
 
void PrepareMerge ()
 
 SortBuffer ()
 
 SortBuffer (const SortBuffer &rhs)
 

Private Attributes

SortClass items [kBufferSize]
 

Detailed Description

Definition at line 37 of file test_algo.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kBufferSize 

Definition at line 39 of file test_algo.cpp.

Constructor & Destructor Documentation

◆ SortBuffer() [1/2]

SortBuffer::SortBuffer ( )
inline

Definition at line 56 of file test_algo.cpp.

57  {
58  PrepareMerge();
59  }
void PrepareMerge()
Definition: test_algo.cpp:48

◆ SortBuffer() [2/2]

SortBuffer::SortBuffer ( const SortBuffer rhs)
inline

Definition at line 61 of file test_algo.cpp.

62  {
63  SortClass* q = begin();
64  for ( const SortClass* p = rhs.begin() ; p != rhs.end(); p++,q++ )
65  *q = *p;
66  }
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
SortClass * end()
Definition: test_algo.cpp:43
GLfloat GLfloat p
Definition: glext.h:8902
SortClass * begin()
Definition: test_algo.cpp:41

Member Function Documentation

◆ begin() [1/2]

SortClass* SortBuffer::begin ( )
inline

Definition at line 41 of file test_algo.cpp.

41 { return items; }
SortClass items[kBufferSize]
Definition: test_algo.cpp:69

Referenced by assert_sorted_version(), test_stable_partition::operator()(), PrepareMerge(), and SortBuffer().

◆ begin() [2/2]

const SortClass* SortBuffer::begin ( ) const
inline

Definition at line 42 of file test_algo.cpp.

42 { return items; }
SortClass items[kBufferSize]
Definition: test_algo.cpp:69

◆ end() [1/2]

SortClass* SortBuffer::end ( )
inline

Definition at line 43 of file test_algo.cpp.

43 { return items + kBufferSize; }
SortClass items[kBufferSize]
Definition: test_algo.cpp:69

Referenced by assert_sorted_version(), test_stable_partition::operator()(), PrepareMerge(), and SortBuffer().

◆ end() [2/2]

const SortClass* SortBuffer::end ( ) const
inline

Definition at line 44 of file test_algo.cpp.

44 { return items + kBufferSize; }
SortClass items[kBufferSize]
Definition: test_algo.cpp:69

◆ PrepareMerge()

void SortBuffer::PrepareMerge ( )
inline

Definition at line 48 of file test_algo.cpp.

49  {
50  EH_STD::sort( begin(), begin() + ( end() - begin() )/2 );
51  EH_STD::sort( begin() + ( end() - begin() )/2, end() );
52  for ( SortClass* p = begin(); p != end(); p++ )
53  p->ResetAddress();
54  }
_STLP_MOVE_TO_STD_NAMESPACE void sort(_RandomAccessIter __first, _RandomAccessIter __last)
Definition: _algo.c:993
SortClass * end()
Definition: test_algo.cpp:43
GLfloat GLfloat p
Definition: glext.h:8902
SortClass * begin()
Definition: test_algo.cpp:41

Referenced by SortBuffer(), and test_algo().

Member Data Documentation

◆ items

SortClass SortBuffer::items[kBufferSize]
private

Definition at line 69 of file test_algo.cpp.

Referenced by begin(), and end().


The documentation for this struct was generated from the following file: