quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_dstr_a #include <PriorityQueue.h> boolean push(TObject* item, COMPARE_FUNC comp_func = compare); TObject* pop(TObject* item = (TObject*)NULL); const TObject* top() const; TObject* top(); boolean isEmpty() const; long length() const; long getCapacity() const; boolean setLength(long length, boolean preserve_values = true); boolean setCapacity(long capacity, boolean preserve_values = true);
description:// declare a priority queue // Long* lng_00; Long lng_01(3); PriorityQueue<Long> pq_00; pq_0.push(&lng_01); lng_01 = pq_0.top(); pq_0.pop(&lng_01);
static const String CLASS_NAME = L"PriorityQueue";
static const String CLASS_NAME;
static const String DEF_PARAM;
static const long DEF_END_POS = -1;
typedef Integral::COMPARE (*COMPARE_FUNC)(TObject* item1, TObject* item2);
TObject** v_d;
ALLOCATION alloc_d;
Long length_d;
Long capacity_d;
static Integral::DEBUG debug_level_d;
static MemoryManager mgr_d;
static const String& name();
static boolean setDebug(Integral::DEBUG debug_level);
boolean debug(const unichar* message) const;
~PriorityQueue();
PriorityQueue(ALLOCATION alloc = DEF_ALLOCATION);
PriorityQueue(const PriorityQueue<TObject>& copy_queue);
boolean assign(const PriorityQueue<TObject>& copy_stack);
PriorityQueue<TObject>& operator=(const PriorityQueue<TObject>& arg);
long sofSize() const;
boolean read(Sof& sof, long tag);
boolean write(Sof& sof, long tag) const;
boolean read(Sof& sof, long tag, const String& name);
boolean write(Sof& sof, long tag, const String& name) const;
boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = true);
boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;
boolean eq(const PriorityQueue<TObject>& arg) const;
static void* operator new(size_t size);
static void* operator new[](size_t size);
static void operator delete(void* ptr);
static void operator delete[](void* ptr);
static boolean setGrowSize(long grow_size);
boolean clear(Integral::CMODE cmode = Integral::DEF_CMODE);
boolean push(TObject* item, COMPARE_FUNC comp_func = compare);
TObject* pop(TObject* item = (TObject*)NULL);
const TObject* top() const;
TObject* top();
boolean isEmpty() const;
long length() const;
long getCapacity() const;
boolean setLength(long length, boolean preserve_values = true);
boolean setCapacity(long capacity, boolean preserve_values = true);
long parent(long val);
long left(long val);
long right(long val);
static Integral::COMPARE compare(TObject* item1, TObject* item2);
boolean heapify(long index, COMPARE_FUNC comp_func = compare);
boolean buildHeap();
boolean heapSort();
TObject* accessByMode(TObject* item);