CPNElementTraits< Proud::RefCount< T > > Class Template Reference

Public Types

typedef Proud::RefCount< T > Type
 
typedef const TypeINARGTYPE
 
typedef TypeOUTARGTYPE
 

Static Public Member Functions

static uint32_t Hash (INARGTYPE a)
 
static bool CompareElements (INARGTYPE element1, INARGTYPE element2)
 
static int CompareElementsOrdered (INARGTYPE element1, INARGTYPE element2)
 

Detailed Description

template<typename T>
class CPNElementTraits< Proud::RefCount< T > >

It is convenient to use this type as Traits in order to use RefCount object as key of CFastMap or CFastSet.

Member Function Documentation

template<typename T >
static bool CPNElementTraits< Proud::RefCount< T > >::CompareElements ( INARGTYPE  element1,
INARGTYPE  element2 
)
inlinestatic

' Compare two elements

Parameters
element1First element to be compared
element2Second element to be compared
Returns
True if the same, otherwise false.
template<typename T >
static int CPNElementTraits< Proud::RefCount< T > >::CompareElementsOrdered ( INARGTYPE  element1,
INARGTYPE  element2 
)
inlinestatic

Compare two elements

Parameters
element1First element to be compared
element2Second element to be compared
Returns
1 if element 1 is bigger, -1 if smaller, 0 if equal.