Baigudin Software avatar
Baigudin Software logo
home
ru region
en region

Interface «api::Queue<Type>»

Queue interface.

Parameters:
Type — data type of queue element.

public: virtual ~Queue();

Destructor.

public: virtual bool add(const Type& element);

Inserts new element to this container.

Given element will be copied to self items structure by copy constructor calling.

Parameters:
element — inserting element.

Returns:
true if element is added.

public: virtual Type element() const;

Examines the head element of this container.

Returns:
the head element.

public: virtual Type illegal() const;

Returns illegal element which will be returned as error value.

Returns:
illegal element.

public: virtual void illegal(const Type value);

Sets illegal element which will be returned as error value.

Parameters:
value — illegal value.

public: virtual bool isConstructed() const;

Tests if this object has been constructed.

Returns:
true if object has been constructed successfully.

public: virtual bool isEmpty() const;

Tests if this collection has elements.

Returns:
true if this collection does not contain any elements.

public: virtual bool isIllegal(const Type& value) const;

Tests if given value is an illegal.

Parameters:
value — testing value.
true — if value is an illegal.

public: static bool isObject(const Type* obj);

Tests if given object has been constructed object.

Parameters:
obj — pointer to object.

Returns:
true if object has been constructed successfully.

public: virtual int32 length() const;

Returns a number of elements in this container.

Returns:
number of elements.

public: virtual bool remove();

Removes the head element of this container.

Returns:
true if an element is removed successfully.

Back to class list