BOOS Core API 3.1
- api::Collection<Type>
- api::Heap
- api::IllegalValue<Type>
- api::Interrupt
- api::Iterable<Type>
- api::Iterator<Type>
- api::Kernel
- api::List<Type>
- api::ListIterator<Type>
- api::Mutex
- api::Object
- api::ProcessorInterrupt
- api::ProcessorPll
- api::ProcessorRegisters
- api::ProcessorTimer
- api::Queue<Type>
- api::Resource
- api::Runtime
- api::Scheduler
- api::Semaphore
- api::Stack<Type>
- api::String<Char>
- api::Synchronizable
- api::System
- api::Task
- api::Thread
- api::Timer
- api::Toggle
- api::Value<Type>
- library::AbstractBuffer<Type,Alloc>
- library::AbstractLinkedList<Type,Alloc>
- library::Align<Type,SIZEOF,Alloc>
- library::Buffer<Type,COUNT,Alloc>
- library::CircularList<Type,Alloc>
- library::Heap
- library::LinkedList<Type,Alloc>
- library::LinkedNode<Type,Alloc>
- library::Memory
- library::Stack<Type,Alloc>
- library::String<Char,Alloc>
- library::Toggle<Alloc>
BOOS Core API 2.2
- core::Allocator
- core::Interrupt
- core::InterruptTask
- core::Mutex
- core::Object<Alloc>
- core::Semaphore
- core::Synchronizer
- core::System
- core::Thread
- core::ThreadTask
- core::Timer
- core::TimerInterrupt
- util::AbstractBuffer<Type,Alloc>
- util::AbstractLinkedList<Type,Alloc>
- util::Align<Type,SIZEOF,Alloc>
- util::Allocator
- util::Buffer<Type,COUNT,Alloc>
- util::CircularList<Type,Alloc>
- util::Heap
- util::LinkedList<Type,Alloc>
- util::LinkedNode<Type,Alloc>
- util::Memory
- util::Object<Alloc>
- util::Stack<Type,Alloc>
- util::Toggle<Alloc>
BOOS Core is unveiled in second revision
BOOS Core Revision 2 has been successfully unveiled within the framework of Baigudin Software project. In comparison with the first revision, the second has gotten considerable improvements. It saves the best features of previous realization and gets the new logical continuation.
Abstract class «util::AbstractLinkedList<Type,Alloc>»
Abstract class for sequential accessing to data store.
Parameters:
Type — data type of container element.
Alloc — heap memory allocator class.
- util::AbstractLinkedList<Type,Alloc>
- public util::Object<Alloc>
- public Object<Alloc>
- public api::Object
- public Object<Alloc>
- public api::List<Type>
- public api::Collection<Type>
- public api::IllegalValue<Type>
- public api::Object
- public api::IllegalValue<Type>
- public api::Collection<Type>
- public api::Queue<Type>
- public api::Collection<Type>
- public api::IllegalValue<Type>
- public api::Object
- public api::IllegalValue<Type>
- public api::Collection<Type>
- public api::Iterable<Type>
- public api::Object
- public util::Object<Alloc>
public:
AbstractLinkedList(const Type& illegal);
virtual ~AbstractLinkedList();
virtual bool add(const Type& element);
virtual bool add(const Type& element);
virtual bool add(int32 index, const Type& element);
virtual Type get(int32 index) const;
virtual Type getFirst() const;
virtual void illegal(const Type value);
virtual int32 indexOf(const Type& element) const;
virtual bool isConstructed() const;
virtual bool isIllegal(const Type& value) const;
virtual bool isIndex(int32 index) const;
static bool isObject(const Type* obj);
virtual ::api::Iterator<Type>* iterator();
virtual ::api::ListIterator<Type>* listIterator(int32 index);
void operator delete(void* ptr);
void* operator new(size_t size);
void* operator new(size_t size, void* ptr);
virtual bool remove(int32 index);
virtual bool removeElement(const Type& element);
protected:
public: AbstractLinkedList();
Constructor.
public: AbstractLinkedList(const Type& illegal);
Constructor.
Parameters:
illegal — illegal element.
public: virtual ~AbstractLinkedList();
Destructor.
public: virtual bool add(const Type& element);
Inserts new element to the end of 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 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 bool add(int32 index, const Type& element);
Inserts new element to the specified position in this container.
Given element will be copied to self items structure by a copy constructor calling.
Parameters:
index — position in this container.
element — inserting element.
Returns:
true if element is inserted.
public: virtual void clear();
Removes all elements from this container.
public: virtual Type element() const;
Examines the head element of this container.
Returns:
the head element.
public: virtual Type get(int32 index) const;
Returns an element from this container by index.
Parameters:
index — position in this container.
Returns:
indexed element of this container.
public: virtual Type getFirst() const;
Returns the first element in this container.
Returns:
the first element in this container.
public: virtual Type getLast() const;
Returns the last element in this container.
Returns:
the last element in this container.
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 int32 indexOf(const Type& element) const;
Returns the index of the first occurrence of the specified element in this container.
Parameters:
element — reference to the element.
Returns:
index or -1 if this container does not contain the element.
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: virtual bool isIndex(int32 index) const;
Tests if given index is available.
Parameters:
index — checking position in this container.
Returns:
true if index is present.
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 ::api::Iterator<Type>* iterator();
Returns an iterator of elements.
You have to call delete operator for returned iterator after it is used.
Returns:
pointer to new iterator.
public: virtual int32 length() const;
Returns a number of elements in this container.
Returns:
number of elements.
public: virtual ::api::ListIterator<Type>* listIterator(int32 index);
Returns a list iterator of this container elements.
You have to call delete operator for returned iterator after it is used. Given index must not be out of bounds (index < 0 || index > length()).
Parameters:
index — start position in this container.
Returns:
pointer to new list iterator.
public: void operator delete(void* ptr);
Operator delete.
Parameters:
ptr — address of allocated memory block or a null pointer.
public: void* operator new(size_t size);
Operator new.
Parameters:
size — number of bytes to allocate.
Returns:
allocated memory address or a null pointer.
public: void* operator new(size_t size, void* ptr);
Operator new.
Parameters:
size — unused.
ptr — pointer to reserved memory area
Returns:
given pointer.
public: virtual bool remove();
Removes the head element of this container.
Returns:
true if an element is removed successfully.
public: virtual bool remove(int32 index);
Removes the element at the specified position in this container.
Parameters:
index — position in this container.
Returns:
true if an element is removed successfully.
public: virtual bool removeElement(const Type& element);
Removes the first occurrence of the specified element from this container.
Parameters:
element — reference to element.
Returns:
true if an element is removed successfully.
public: virtual bool removeFirst();
Removes the first element from this container.
Returns:
true if an element is removed successfully.
public: virtual bool removeLast();
Removes the last element from this container.
Returns:
true if an element is removed successfully.
protected: static Type alloc(size_t size);
Allocates memory.
Parameters:
size — number of bytes to allocate.
Returns:
allocated memory address or a null pointer.
protected: static void free(void* ptr);
Frees an allocated memory.
Parameters:
ptr — address of allocated memory block or a null pointer.
protected: virtual void setConstruct(bool flag);
Sets the object constructed flag.
Parameters:
flag — constructed flag.









