|
FreeNOS
|
Index is a N-sized array of pointers to items of type T. More...
#include <Index.h>
Public Member Functions | |
| Index () | |
| Constructor. | |
| virtual bool | insert (Size &position, T *item) |
| Adds the given item, if possible. | |
| virtual bool | insert (T *item) |
| Adds the given item, if possible. | |
| virtual bool | insertAt (const Size position, T *item) |
| Inserts the given item at the given position. | |
| virtual bool | remove (const Size position) |
| Removes the item at the given position. | |
| void | deleteAll () |
| Removes and delete()'s all items. | |
| virtual T * | get (const Size position) const |
| Returns the item at the given position. | |
| virtual bool | contains (const T *item) const |
| Check if the given item is stored in this Sequence. | |
| virtual Size | size () const |
| Size of the Index. | |
| virtual Size | count () const |
| Item count in the Index. | |
| T * | operator[] (const Size i) |
| Returns the item at the given position in the Index. | |
Private Attributes | |
| T * | m_array [N] |
| Array of pointers to items. | |
| Size | m_count |
| Amount of valid pointers in the array. | |
Index is a N-sized array of pointers to items of type T.
|
inlinevirtual |
Check if the given item is stored in this Sequence.
Definition at line 201 of file Index.h.
References Index< T, N >::m_array.
Item count in the Index.
Definition at line 225 of file Index.h.
References Index< T, N >::m_count.
Referenced by DeviceServer::initialize().
Removes and delete()'s all items.
Definition at line 166 of file Index.h.
References Index< T, N >::m_array, Index< T, N >::m_count, and ZERO.
Referenced by ChannelServer< Base, MsgType >::~ChannelServer(), and DirectoryScanner::~DirectoryScanner().
|
inlinevirtual |
Returns the item at the given position.
| position | The position of the item to get. |
Definition at line 187 of file Index.h.
References Index< T, N >::m_array, and ZERO.
Referenced by CoreServer::bootAll(), MpiProxy::createChannels(), ProcessManager::get(), DeviceServer::interruptHandler(), Index< T, N >::operator[](), ICMP::process(), MpiProxy::processSend(), ChannelServer< Base, MsgType >::readChannels(), ChannelServer< Base, MsgType >::readKernelEvents(), MpiTarget::receive(), CoreServer::receiveFromSlave(), DeviceServer::registerInterrupt(), CoreServer::runCore(), MpiTarget::send(), CoreServer::sendToSlave(), and CoreServer::setupChannels().
|
inlinevirtual |
Adds the given item, if possible.
| position | On output the position of the item in the Index. |
| item | Pointer to the item to add. |
Definition at line 60 of file Index.h.
References assert, Index< T, N >::m_array, Index< T, N >::m_count, and ZERO.
Referenced by ProcessManager::create(), ICMP::createSocket(), UDP::createSocket(), Index< T, N >::insert(), DeviceServer::registerDevice(), and DirectoryScanner::scan().
Adds the given item, if possible.
| item | Pointer to the item to add. |
Definition at line 97 of file Index.h.
References Index< T, N >::insert().
|
inlinevirtual |
Inserts the given item at the given position.
If an item exists at the given position, it will be replaced by the given item.
| position | The position to insert the item. |
| item | The item to insert |
Definition at line 113 of file Index.h.
References Index< T, N >::m_array, Index< T, N >::m_count, and ZERO.
Referenced by ChannelServer< Base, MsgType >::addIPCHandler(), ChannelServer< Base, MsgType >::addIRQHandler(), ProcessManager::create(), MpiProxy::createChannels(), MpiTarget::createReadChannel(), MpiTarget::createWriteChannel(), CoreServer::prepareCoreInfo(), DeviceServer::registerInterrupt(), Sun8iEmac::resetReceive(), and CoreServer::setupChannels().
Returns the item at the given position in the Index.
| i | The position of the item to return. |
Definition at line 237 of file Index.h.
References Index< T, N >::get().
|
inlinevirtual |
Removes the item at the given position.
| position | The position of the item to remove. |
Definition at line 143 of file Index.h.
References assert, Index< T, N >::m_array, Index< T, N >::m_count, and ZERO.
Referenced by ProcessManager::create(), ICMP::createSocket(), UDP::createSocket(), ProcessManager::remove(), ICMP::unregisterSockets(), and UDP::unregisterSockets().
Size of the Index.
Definition at line 217 of file Index.h.
Referenced by ICMP::process(), and ProcessManager::remove().
Array of pointers to items.
Definition at line 245 of file Index.h.
Referenced by Index< T, N >::contains(), Index< T, N >::deleteAll(), Index< T, N >::get(), Index< T, N >::Index(), Index< T, N >::insert(), Index< T, N >::insertAt(), and Index< T, N >::remove().
Amount of valid pointers in the array.
Definition at line 248 of file Index.h.
Referenced by Index< T, N >::count(), Index< T, N >::deleteAll(), Index< T, N >::insert(), Index< T, N >::insertAt(), and Index< T, N >::remove().