ReactOS 0.4.15-dev-7958-gcd0bb1a
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.

39{ kBufferSize = 100 };

Constructor & Destructor Documentation

◆ SortBuffer() [1/2]

SortBuffer::SortBuffer ( )
inline

Definition at line 56 of file test_algo.cpp.

57 {
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
GLfloat GLfloat p
Definition: glext.h:8902
SortClass * end()
Definition: test_algo.cpp:43
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; }

◆ end() [1/2]

SortClass * SortBuffer::end ( )
inline

◆ end() [2/2]

const SortClass * SortBuffer::end ( ) const
inline

Definition at line 44 of file test_algo.cpp.

44{ return items + kBufferSize; }

◆ 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 }

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: