Zero  0.1.0
Public Member Functions | Private Member Functions | List of all members
w_descend_list_t< T, LOCK, K > Class Template Reference

List maintained in descending order. More...

#include <w_list.h>

Inheritance diagram for w_descend_list_t< T, LOCK, K >:
w_keyed_list_t< T, LOCK, K > w_list_t< T, LOCK > w_list_base_t w_vbase_t w_base_t

Public Member Functions

 w_descend_list_t (uint32_t key_offset, uint32_t link_offset, LOCK *l)
 
 ~w_descend_list_t ()
 
virtual Tsearch (const K &k)
 
virtual void put_in_order (T *t)
 
- Public Member Functions inherited from w_keyed_list_t< T, LOCK, K >
Tfirst ()
 
Tlast ()
 
 w_keyed_list_t (LOCK *lock)
 
 w_keyed_list_t (uint32_t key_offset, uint32_t link_offset, LOCK *lock)
 
 ~w_keyed_list_t ()
 
void set_offset (uint32_t key_offset, uint32_t link_offset)
 
- Public Member Functions inherited from w_list_t< T, LOCK >
 w_list_t (uint32_t link_offset, LOCK *l)
 Linked list constructor. More...
 
 w_list_t ()
 
 ~w_list_t ()
 
void set_offset (uint32_t link_offset)
 
w_list_t< T, LOCK > & push_front (T *t)
 
w_list_t< T, LOCK > & push_back (T *t)
 
Tfront ()
 
Tback ()
 
Tpop_front ()
 
Tpop_back ()
 
w_list_t< T, LOCK > & push (T *t)
 Insert. More...
 
w_list_t< T, LOCK > & append (T *t)
 Insert at tail. More...
 
void insert_after (T *t, T *pos)
 
void insert_before (T *t, T *pos)
 
Tpop ()
 Remove. More...
 
Tchop ()
 Remove from rear. More...
 
void remove (T *t)
 
Ttop ()
 Get first but don't remove. More...
 
Tbottom ()
 Get last but don't remove. More...
 
Tnext (w_link_t *p)
 Get next. More...
 
Tprev (w_link_t *p)
 Get prev. More...
 
Tnext_of (T *t)
 
Tprev_of (T *t)
 
uint32_t count ()
 
- Public Member Functions inherited from w_list_base_t
bool is_empty () const
 
uint32_t num_members () const
 
void dump ()
 
- Public Member Functions inherited from w_vbase_t
 w_vbase_t ()
 
virtual ~w_vbase_t ()
 

Private Member Functions

 w_descend_list_t (const w_descend_list_t< T, LOCK, K > &)
 

Additional Inherited Members

- Public Types inherited from w_base_t
enum  CompareOp {
  badOp = 0x0, eqOp = 0x1, gtOp = 0x2, geOp = 0x3,
  ltOp = 0x4, leOp = 0x5, NegInf = 0x100, eqNegInf,
  gtNegInf, geNegInf, ltNegInf, leNegInf,
  PosInf = 0x400, eqPosInf, gtPosInf, gePosInf,
  ltPosInf, lePosInf
}
 Comparison Operators. More...
 
typedef unsigned char u_char
 
typedef unsigned short u_short
 
typedef unsigned long u_long
 
typedef uint64_t large_stat_t
 
typedef int32_t base_stat_t
 
typedef float base_float_t
 
typedef float f4_t
 
typedef double f8_t
 
- Static Public Member Functions inherited from w_base_t
static bool is_aligned (size_t sz)
 
static bool is_aligned (const void *s)
 
static bool is_big_endian ()
 
static bool is_little_endian ()
 
static int64_t strtoi8 (const char *, char **end=0, int base=0)
 Convert string to 8-byte integer. More...
 
static uint64_t strtou8 (const char *, char **end=0, int base=0)
 Convert string to 8-byte unsigned integer. More...
 
static bool is_finite (const f8_t x)
 
static bool is_infinite (const f8_t x)
 
static bool is_nan (const f8_t x)
 
static bool is_infinite_or_nan (const f8_t x)
 
static uint16_t w_ntohs (uint16_t)
 
static uint16_t w_htons (uint16_t)
 
static uint32_t w_ntohl (uint32_t)
 
static uint32_t w_htonl (uint32_t)
 
static void assert_failed (const char *desc, const char *file, uint32_t line)
 print a message and abort More...
 
static void abort ()
 dump core More...
 
- Static Public Attributes inherited from w_base_t
static const int8_t int1_max = 0x7f
 
static const int8_t int1_min = (int8_t)0x80u
 
static const int16_t int2_max = 0x7fff
 
static const int16_t int2_min = (int16_t)0x8000u
 
static const int32_t int4_max = 0x7fffffff
 
static const int32_t int4_min = 0x80000000
 
static const int64_t int8_max
 
static const int64_t int8_min
 
static const uint8_t uint1_max = 0xff
 
static const uint8_t uint1_min = 0x0
 
static const uint16_t uint2_max = 0xffff
 
static const uint16_t uint2_min = 0x0
 
static const uint32_t uint4_max = 0xffffffff
 
static const uint32_t uint4_min = 0x0
 
static const uint64_t uint8_max
 
static const uint64_t uint8_min
 
- Protected Member Functions inherited from w_keyed_list_t< T, LOCK, K >
const K & key_of (const T &t)
 
- Protected Member Functions inherited from w_list_t< T, LOCK >
w_link_tlink_of (T *t)
 
const w_link_tlink_of (const T *t) const
 const version of the above More...
 
Tbase_of (w_link_t *p) const
 return object of which the given link is a member More...
 
const Tbase_of (const w_link_t *p) const
 const version of the above More...
 
- Protected Member Functions inherited from w_list_base_t
 w_list_base_t ()
 
 w_list_base_t (uint32_t offset)
 
 ~w_list_base_t ()
 
void set_offset (uint32_t offset)
 
- Protected Attributes inherited from w_list_base_t
w_link_t _tail
 
uint32_t _cnt
 
uint32_t _adj
 

Detailed Description

template<class T, class LOCK, class K>
class w_descend_list_t< T, LOCK, K >

List maintained in descending order.

T is the type of the objects in the list. K is the type of the key used for sorting. This type must have an operator >=.

Constructor & Destructor Documentation

§ w_descend_list_t() [1/2]

template<class T, class LOCK, class K>
w_descend_list_t< T, LOCK, K >::w_descend_list_t ( uint32_t  key_offset,
uint32_t  link_offset,
LOCK *  l 
)
inline

§ ~w_descend_list_t()

template<class T, class LOCK, class K>
w_descend_list_t< T, LOCK, K >::~w_descend_list_t ( )
inline

§ w_descend_list_t() [2/2]

template<class T, class LOCK, class K>
w_descend_list_t< T, LOCK, K >::w_descend_list_t ( const w_descend_list_t< T, LOCK, K > &  )
private

Member Function Documentation

§ put_in_order()

template<class T, class LOCK , class K >
void w_descend_list_t< T, LOCK, K >::put_in_order ( T t)
virtual

For ordered lists, this uses the ordering. For unordered lists (simply w_list_t<T,LOCK>), it just inserts.

Reimplemented from w_list_t< T, LOCK >.

§ search()

template<class T , class LOCK , class K>
T * w_descend_list_t< T, LOCK, K >::search ( const K &  k)
virtual

Reimplemented from w_keyed_list_t< T, LOCK, K >.


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