Baigudin Software avatar
EOOS Systems logo
home
ru region
en region

Class «eoos::lib::Fifo<T,L,A>»

Abstract list class.

public: Fifo();

Constructor.

[Default mode] FIFO is not locked on overrun. Once the FIFO is full the next incoming message will overwrite the previous one.

public: Fifo(bool_t isLocked);

Constructor.

[Default mode] FIFO is not locked on overrun. Once the FIFO is full the next incoming message will overwrite the previous one. FIFO is locked against overrun. Once the FIFO is full the next incoming message will be discarded.

Parameters:
isLocked — FIFO locked mode flag.

public: Fifo(bool_t isLocked, T const& illegal);

Constructor.

[Default mode] FIFO is not locked on overrun. Once the FIFO is full the next incoming message will overwrite the previous one. FIFO is locked against overrun. Once the FIFO is full the next incoming message will be discarded.

Parameters:
isLocked — FIFO locked mode flag.
illegal — An illegal value.

public: virtual ~Fifo();

Destructor.

public: virtual bool_t add(T const& element);

Inserts a new element to the end of this container.

Parameters:
element — An inserting element.

Returns:
True if element is added.

public: virtual T const& getIllegal();

Returns illegal element which will be returned as error value.

Returns:
Illegal element.

public: virtual size_t getLength();

Returns a number of elements in this container.

Returns:
Number of elements, or always 0 if an error occurred.

public: virtual bool_t isConstructed() const;

Tests if this object has been constructed.

Returns:
True if object has been constructed successfully.

public: static bool_t isConstructed(api::Object* obj);

Tests if an object has been constructed.

Parameters:
obj — Object to be tested.

Returns:
True if object has been constructed successfully.

public: virtual bool_t isEmpty();

Tests if this collection has elements.

Returns:
True if this collection does not contain any elements, or always true if an error occurred.

public: bool_t isFull() const;

Tests if this FIFO is full.

Returns:
True if this FIFO is full.

public: virtual bool_t isIllegal(T const& value) const;

Tests if given value is an illegal.

Parameters:
value — A testing value.

Returns:
True if value is an illegal.

public: bool_t isLocked() const;

Tests if this FIFO is locked.

Returns:
True if this FIFO is locked.

public: bool_t isOverrun() const;

Tests if this FIFO is overrun.

Returns:
True if this FIFO is overrun.

public: static void operator delete(void* ptr);

Operator delete.

Parameters:
ptr — An address of allocated memory block or a null pointer.

public: static void operator delete(void*, void*);

Operator delete.

public: static void* operator new(size_t size);

Operator new.

Parameters:
size — A number of bytes to allocate.

Returns:
Allocated memory address or a null pointer.

public: static void* operator new(size_t, void* ptr);

Operator new.

Parameters:
ptr — A pointer to reserved memory area.

Returns:
The given pointer.

public: Object& operator=(Object const& obj);

Copy assignment operator.

Parameters:
obj — Reference to a source object.

Returns:
Reference to this object.

public: Object& operator=(Object&& obj) & noexcept;

Move assignment operator.

Parameters:
obj — Right reference to a source object.

Returns:
Reference to this object.

public: virtual T& peek();

Examines the head element of this container.

Returns:
The head element.

public: virtual bool_t remove();

Removes the head element of this container.

Returns:
True if an element is removed successfully.

public: virtual void setIllegal(T const& value);

Sets illegal element which will be returned as error value.

Parameters:
value — An illegal value.

Back to class list