Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Static Public Member Functions
nsQuickSortComparator< E, Comparator > Class Template Reference

#include <nsTArray.h>

List of all members.

Public Types

typedef E elem_type

Static Public Member Functions

static int Compare (const void *e1, const void *e2, void *data)

Detailed Description

template<class E, class Comparator>
class nsQuickSortComparator< E, Comparator >

Definition at line 152 of file nsTArray.h.


Member Typedef Documentation

template<class E , class Comparator >
typedef E nsQuickSortComparator< E, Comparator >::elem_type

Definition at line 154 of file nsTArray.h.


Member Function Documentation

template<class E , class Comparator >
static int nsQuickSortComparator< E, Comparator >::Compare ( const void e1,
const void e2,
void data 
) [inline, static]

Definition at line 158 of file nsTArray.h.

                                                                   {
      const Comparator* c = NS_REINTERPRET_CAST(const Comparator*, data);
      const elem_type* a = NS_STATIC_CAST(const elem_type*, e1);
      const elem_type* b = NS_STATIC_CAST(const elem_type*, e2);
      return c->LessThan(*a, *b) ? -1 : (c->Equals(*a, *b) ? 0 : 1);
    }

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