FreeNOS
|
Index is a N-sized array of pointers to items of type T. More...
#include <Index.h>
Public Member Functions | |
Index () | |
Constructor. More... | |
virtual bool | insert (Size &position, T *item) |
Adds the given item, if possible. More... | |
virtual bool | insert (T *item) |
Adds the given item, if possible. More... | |
virtual bool | insertAt (const Size position, T *item) |
Inserts the given item at the given position. More... | |
virtual bool | remove (const Size position) |
Removes the item at the given position. More... | |
void | deleteAll () |
Removes and delete()'s all items. More... | |
virtual T * | get (const Size position) const |
Returns the item at the given position. More... | |
virtual bool | contains (const T *item) const |
Check if the given item is stored in this Sequence. More... | |
virtual Size | size () const |
Size of the Index. More... | |
virtual Size | count () const |
Item count in the Index. More... | |
T * | operator[] (const Size i) |
Returns the item at the given position in the Index. More... | |
Private Attributes | |
T * | m_array [N] |
Array of pointers to items. More... | |
Size | m_count |
Amount of valid pointers in the array. More... | |
Index is a N-sized array of pointers to items of type T.
|
inlinevirtual |
Item count in the Index.
Definition at line 225 of file Index.h.
Referenced by DeviceServer::initialize().
|
inline |
Removes and delete()'s all items.
Definition at line 166 of file Index.h.
Referenced by ChannelServer< DatastoreServer, DatastoreMessage >::~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.
Referenced by CoreServer::bootAll(), MpiProxy::createChannels(), ProcessManager::get(), DeviceServer::interruptHandler(), Index< NetworkQueue::Packet, NetworkQueue::MaxPackets >::operator[](), ICMP::process(), MpiProxy::processSend(), ChannelServer< DatastoreServer, DatastoreMessage >::readChannels(), ChannelServer< DatastoreServer, DatastoreMessage >::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.
Referenced by ProcessManager::create(), UDP::createSocket(), ICMP::createSocket(), Index< NetworkQueue::Packet, NetworkQueue::MaxPackets >::insert(), DeviceServer::registerDevice(), and DirectoryScanner::scan().
|
inlinevirtual |
|
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.
Referenced by ChannelServer< DatastoreServer, DatastoreMessage >::addIPCHandler(), ChannelServer< DatastoreServer, DatastoreMessage >::addIRQHandler(), ProcessManager::create(), MpiProxy::createChannels(), MpiTarget::createReadChannel(), MpiTarget::createWriteChannel(), CoreServer::prepareCoreInfo(), DeviceServer::registerInterrupt(), Sun8iEmac::resetReceive(), and CoreServer::setupChannels().
|
inlinevirtual |
Removes the item at the given position.
position | The position of the item to remove. |
Definition at line 143 of file Index.h.
Referenced by ProcessManager::create(), UDP::createSocket(), ICMP::createSocket(), ProcessManager::remove(), UDP::unregisterSockets(), and ICMP::unregisterSockets().
Size of the Index.
Definition at line 217 of file Index.h.
Referenced by ICMP::process(), and ProcessManager::remove().
|
private |
Array of pointers to items.
Definition at line 245 of file Index.h.
Referenced by Index< NetworkQueue::Packet, NetworkQueue::MaxPackets >::contains(), Index< NetworkQueue::Packet, NetworkQueue::MaxPackets >::deleteAll(), Index< NetworkQueue::Packet, NetworkQueue::MaxPackets >::get(), Index< NetworkQueue::Packet, NetworkQueue::MaxPackets >::Index(), Index< NetworkQueue::Packet, NetworkQueue::MaxPackets >::insert(), Index< NetworkQueue::Packet, NetworkQueue::MaxPackets >::insertAt(), and Index< NetworkQueue::Packet, NetworkQueue::MaxPackets >::remove().
Amount of valid pointers in the array.
Definition at line 248 of file Index.h.
Referenced by Index< NetworkQueue::Packet, NetworkQueue::MaxPackets >::count(), Index< NetworkQueue::Packet, NetworkQueue::MaxPackets >::deleteAll(), Index< NetworkQueue::Packet, NetworkQueue::MaxPackets >::insert(), Index< NetworkQueue::Packet, NetworkQueue::MaxPackets >::insertAt(), and Index< NetworkQueue::Packet, NetworkQueue::MaxPackets >::remove().