In file /home/eternity/Source/Common/GMessage/H/queue.h:

class Queue

Queue class

Inheritance:

Queue


Public Methods

Void Queue::Delete (Void *obj)
Deletes 1st item (from "current") which "object" corresponds to
Void Queue::DeleteAll ()
Deletes all items in Q (not objects!)
Void* Queue::DeleteAt (Int index)
Deletes item at position ; returns the object
Void Queue::DeleteCurrent ()
Kratky_komentar_s_teckou_na_konci
Void* Queue::First ()
Returns the 1st object; sets "current" to this item
Err Queue::Insert (Void *obj)
Inserts the object to the end of queue
Int Queue::InsertAt (Void *obj, Int index)
Kratky_komentar_s_teckou_na_konci
Err Queue::InsertAtCurrent (Void *obj)
Kratky_komentar_s_teckou_na_konci
Void* Queue::ItemAt (Int index)
Returns object at the position sets "current" to this item
Int Queue::ItemsOfQ ()
Returns number of items in Q
Void* Queue::Next ()
Returns the next (=current's successor) object; sets "current" to this item
Queue::Queue ()
Kratky_komentar_s_teckou_na_konci
Void Queue::SetCurrent (Int index)
Kratky_komentar_s_teckou_na_konci
Void Queue::SetCurrent (Void *obj)
Kratky_komentar_s_teckou_na_konci
Queue::~Queue ()
Kratky_komentar_s_teckou_na_konci

Public

methods
Queue ()
constructor
virtual ~Queue ()
destructor
virtual Err Insert (Void *obj)
Inserts at the end of Q
virtual Int InsertAt (Void *obj, Int index)
Inserts at position ; returns the real position of storage
Void Delete (Void *obj)
Deletes 1st item which "object" corresponds to
Void* DeleteAt (Int index)
Deletes item at position; return the pointer to the object
Void DeleteAll ()
Deletes all items in Q
Void* First ()
Returns the 1st object in Q
Void* Next ()
Returns the "current's successor" object; sets the "current" to it
Void* ItemAt (Int index)
Returns the object at position
Int ItemsOfQ ()
Returns number of items in Q

Protected

attributes
methods
Void SetCurrent (Int index)
Sets "current" pointer to the item at -th position
Void SetCurrent (Void *obj)
Sets "current" to the item which object corresponds to
virtual Err InsertAtCurrent (Void *obj)
Inserts at "current"; doesn't care about "first" setting
Void DeleteCurrent ()
Deletes the "current" item (new current will be the next one)

Documentation

Queue class. A class which can store objects in queue. Important notices:
1) every 'delete' in this class deletes only the item not the object itself
2) every method, which returns an object, returns a void pointer; that is why the output has to be retyped
example: object = (RealTypeOfObject *)queue->First();
attributes

methods

Void SetCurrent(Int index)
Sets "current" pointer to the item at -th position

Void SetCurrent(Void *obj)
Sets "current" to the item which object corresponds to

virtual Err InsertAtCurrent(Void *obj)
Inserts at "current"; doesn't care about "first" setting

Void DeleteCurrent()
Deletes the "current" item (new current will be the next one)

methods

Queue()
constructor

virtual ~Queue()
destructor

virtual Err Insert(Void *obj)
Inserts at the end of Q

virtual Int InsertAt(Void *obj, Int index)
Inserts at position ; returns the real position of storage

Void Delete(Void *obj)
Deletes 1st item which "object" corresponds to

Void* DeleteAt(Int index)
Deletes item at position; return the pointer to the object

Void DeleteAll()
Deletes all items in Q

Void* First()
Returns the 1st object in Q

Void* Next()
Returns the "current's successor" object; sets the "current" to it

Void* ItemAt(Int index)
Returns the object at position

Int ItemsOfQ()
Returns number of items in Q

Void Queue::Delete(Void *obj)
Deletes 1st item (from "current") which "object" corresponds to . Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Ivanka
See Also:
co_se_toho_tyka

Void Queue::DeleteAll()
Deletes all items in Q (not objects!). Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Ivanka
See Also:
co_se_toho_tyka

Void* Queue::DeleteAt(Int index)
Deletes item at position ; returns the object. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Ivanka
See Also:
co_se_toho_tyka

Void Queue::DeleteCurrent()
Kratky_komentar_s_teckou_na_konci. Deletes "current" item; sets new "current" to it's successor does care about "first" setting !! every 'DELETE(method)' in Q should first set the "current" and then use this method (except 'DeleteAll' or st. like this).
Returns:
co
Parameters:
parametr -
Author:
Ivanka
See Also:
co_se_toho_tyka

Void* Queue::First()
Returns the 1st object; sets "current" to this item. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Ivanka
See Also:
co_se_toho_tyka

Err Queue::Insert(Void *obj)
Inserts the object to the end of queue. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Ivanka
See Also:
co_se_toho_tyka

Int Queue::InsertAt(Void *obj, Int index)
Kratky_komentar_s_teckou_na_konci. Inserts the object at position (if it's possible) returns the index, where the object is really stored.
Returns:
co
Parameters:
parametr -
Author:
Ivanka
See Also:
co_se_toho_tyka

Err Queue::InsertAtCurrent(Void *obj)
Kratky_komentar_s_teckou_na_konci. Inserts the object at "current" ("shift old_current to the right") doesn't care about "first" setting !! every 'insert method' in Q should first set the "current" and then use this method
Returns:
co
Parameters:
parametr -
Author:
Ivanka
See Also:
co_se_toho_tyka

Void* Queue::ItemAt(Int index)
Returns object at the position sets "current" to this item. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Ivanka
See Also:
co_se_toho_tyka

Int Queue::ItemsOfQ()
Returns number of items in Q. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Ivanka
See Also:
co_se_toho_tyka

Void* Queue::Next()
Returns the next (=current's successor) object; sets "current" to this item. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Ivanka
See Also:
co_se_toho_tyka

Queue::Queue()
Kratky_komentar_s_teckou_na_konci. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Ivanka
See Also:
co_se_toho_tyka

Void Queue::SetCurrent(Int index)
Kratky_komentar_s_teckou_na_konci. Sets the current pointer to the item at position we don't mind, if the index > numOfItems because the Q is cyclic.
Returns:
co
Parameters:
parametr -
Author:
Ivanka
See Also:
co_se_toho_tyka

Void Queue::SetCurrent(Void *obj)
Kratky_komentar_s_teckou_na_konci. Sets "current" to the item which object corresponds to if there is no such item, "current" will be the same.
Returns:
co
Parameters:
parametr -
Author:
Ivanka
See Also:
co_se_toho_tyka

Queue::~Queue()
Kratky_komentar_s_teckou_na_konci. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Ivanka
See Also:
co_se_toho_tyka


Direct child classes:
SortedQueue
FieldQueue
Author:
Ivana
See Also:

alphabetic index hierarchy of classes


generated by doc++