LONGLIST Struct Reference

Similar to a SIMPLE_ARRAY<UINT32>, but with some differences. More...

#include <mi32/longlist.h>

List of all members.

Public Member Functions

 LONGLIST ()
 ~LONGLIST ()
ERRVALUE Add (INT32 value)
ERRVALUE AddUnique (INT32 value)
ERRVALUE AddUniqueWithFlag (INT32 value, UINT8 flag)
ERRVALUE AddWithFlag (INT32 value, UINT8 flag)
bool CheckIn (INT32 value) const
void Clear ()
void Free ()
bool GetFirst (INT32 *ip, INT32 *valp) const
UINT8 GetFlags (INT32 Index) const
bool GetLast (INT32 *valp) const
ERRVALUE GetList (SIMPLE_ARRAY< INT32 > &List) const
INT32 GetList (INT32 **listp) const
bool GetNext (INT32 *ip, INT32 *valp) const
INT32 GetNumItems () const
INT32 GetUserData () const
INT32 GetValue (INT32 Index) const
bool HasFlags () const
bool IsSorted () const
ERRVALUE Remove (INT32 value)
ERRVALUE SetBits (const UNSIGNEDSET &set)
void SetSorted (bool val=true)
void SetUseBits (bool val=true)
void SetUserData (INT32 val)
ERRVALUE Sort (int(*cmpfunc)(INT32, INT32, void *)=0, void *cmpdata=0)

Detailed Description

Similar to a SIMPLE_ARRAY<UINT32>, but with some differences.

A LONGLIST serves two purposes. When possible, it keeps track of a list of numbers using a BITSET. It can also be made to keep track of a set of numbers like a SIMPLE_ARRAY but with an extra UINT8 flags for each entry.


Constructor & Destructor Documentation

LONGLIST::LONGLIST (  ) 
LONGLIST::~LONGLIST (  ) 

Member Function Documentation

ERRVALUE LONGLIST::Add ( INT32  value  ) 
ERRVALUE LONGLIST::AddUnique ( INT32  value  ) 
ERRVALUE LONGLIST::AddUniqueWithFlag ( INT32  value,
UINT8  flag 
)
ERRVALUE LONGLIST::AddWithFlag ( INT32  value,
UINT8  flag 
)
bool LONGLIST::CheckIn ( INT32  value  )  const
void LONGLIST::Clear (  ) 

Clear the list, but does not free memory.

void LONGLIST::Free (  ) 
bool LONGLIST::GetFirst ( INT32 ip,
INT32 valp 
) const
UINT8 LONGLIST::GetFlags ( INT32  Index  )  const [inline]
bool LONGLIST::GetLast ( INT32 valp  )  const
ERRVALUE LONGLIST::GetList ( SIMPLE_ARRAY< INT32 > &  List  )  const
INT32 LONGLIST::GetList ( INT32 **  listp  )  const
bool LONGLIST::GetNext ( INT32 ip,
INT32 valp 
) const
INT32 LONGLIST::GetNumItems (  )  const [inline]
INT32 LONGLIST::GetUserData (  )  const [inline]
INT32 LONGLIST::GetValue ( INT32  Index  )  const [inline]
bool LONGLIST::HasFlags (  )  const [inline]
bool LONGLIST::IsSorted (  )  const [inline]
ERRVALUE LONGLIST::Remove ( INT32  value  ) 
ERRVALUE LONGLIST::SetBits ( const UNSIGNEDSET set  ) 
void LONGLIST::SetSorted ( bool  val = true  )  [inline]

Set the sorted flag without actually sorting.

This is useful if you know you added the items in sorted order. You may also want to set it to false to force a re-sort if you change the sort criteria.

void LONGLIST::SetUseBits ( bool  val = true  )  [inline]
void LONGLIST::SetUserData ( INT32  val  )  [inline]
ERRVALUE LONGLIST::Sort ( int(*)(INT32, INT32, void *)  cmpfunc = 0,
void *  cmpdata = 0 
)

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

Generated on Sun Oct 7 21:33:33 2012 for TNTsdk 2012 by  doxygen 1.6.1