include replacements
This commit is contained in:
@ -1,45 +1,45 @@
|
||||
#ifndef MODESTORE_H_
|
||||
#define MODESTORE_H_
|
||||
|
||||
#ifdef USE_MODESTORE
|
||||
|
||||
#include <framework/container/ArrayList.h>
|
||||
#include <framework/container/SinglyLinkedList.h>
|
||||
#include <framework/objectmanager/SystemObject.h>
|
||||
#include <framework/subsystem/modes/ModeStoreIF.h>
|
||||
|
||||
class ModeStore: public ModeStoreIF, public SystemObject {
|
||||
public:
|
||||
ModeStore(object_id_t objectId, uint32_t slots);
|
||||
virtual ~ModeStore();
|
||||
|
||||
virtual ReturnValue_t storeArray(ArrayList<ModeListEntry> *sequence,
|
||||
ModeListEntry **storedFirstEntry);
|
||||
|
||||
virtual ReturnValue_t deleteList(
|
||||
ModeListEntry *sequence);
|
||||
|
||||
virtual ReturnValue_t readList(
|
||||
ModeListEntry *sequence,
|
||||
ArrayList<ModeListEntry> *into);
|
||||
|
||||
virtual uint32_t getFreeSlots();
|
||||
|
||||
private:
|
||||
MutexId_t* mutex;
|
||||
ArrayList<ModeListEntry, uint32_t> store;
|
||||
ModeListEntry *emptySlot;
|
||||
|
||||
void clear();
|
||||
ModeListEntry* findEmptySlotNoLock(
|
||||
ModeListEntry* startFrom);
|
||||
void deleteListNoLock(
|
||||
ModeListEntry *sequence);
|
||||
|
||||
ReturnValue_t isValidEntry(ModeListEntry *sequence);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* MODESTORE_H_ */
|
||||
|
||||
#ifndef MODESTORE_H_
|
||||
#define MODESTORE_H_
|
||||
|
||||
#ifdef USE_MODESTORE
|
||||
|
||||
#include "../../container/ArrayList.h"
|
||||
#include "../../container/SinglyLinkedList.h"
|
||||
#include "../../objectmanager/SystemObject.h"
|
||||
#include "../../subsystem/modes/ModeStoreIF.h"
|
||||
|
||||
class ModeStore: public ModeStoreIF, public SystemObject {
|
||||
public:
|
||||
ModeStore(object_id_t objectId, uint32_t slots);
|
||||
virtual ~ModeStore();
|
||||
|
||||
virtual ReturnValue_t storeArray(ArrayList<ModeListEntry> *sequence,
|
||||
ModeListEntry **storedFirstEntry);
|
||||
|
||||
virtual ReturnValue_t deleteList(
|
||||
ModeListEntry *sequence);
|
||||
|
||||
virtual ReturnValue_t readList(
|
||||
ModeListEntry *sequence,
|
||||
ArrayList<ModeListEntry> *into);
|
||||
|
||||
virtual uint32_t getFreeSlots();
|
||||
|
||||
private:
|
||||
MutexId_t* mutex;
|
||||
ArrayList<ModeListEntry, uint32_t> store;
|
||||
ModeListEntry *emptySlot;
|
||||
|
||||
void clear();
|
||||
ModeListEntry* findEmptySlotNoLock(
|
||||
ModeListEntry* startFrom);
|
||||
void deleteListNoLock(
|
||||
ModeListEntry *sequence);
|
||||
|
||||
ReturnValue_t isValidEntry(ModeListEntry *sequence);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* MODESTORE_H_ */
|
||||
|
||||
|
Reference in New Issue
Block a user