Files
Sourcetrail/src/lib/data/StorageProvider.h
T
malte_langkabel 4563cbe90a logic: indexer commands
* replaced parser arguments by project specific IndexerCommands that know everything the indexer needs to know to do its job
* added different language and project specific indexers that know how to handle a certain kind of indexer command
* refactored FileManager and FileRegister to have less overhead
* removed no-rtti restriction for clang files in lib cxx
* uncommented deprecated interprocess code.

fortune cookie message = Happiness will bring you good luck.
2017-02-22 16:42:20 +01:00

30 lines
715 B
C++

#ifndef STORAGE_PROVIDER_H
#define STORAGE_PROVIDER_H
#include <memory>
#include <mutex>
#include <list>
#include "data/IntermediateStorage.h"
class StorageProvider
{
public:
int getStorageCount() const;
void insert(std::shared_ptr<IntermediateStorage> storage);
// returns empty shared_ptr if no storages available
std::shared_ptr<IntermediateStorage> consumeSecondLargestStorage();
// returns empty shared_ptr if no storages available
std::shared_ptr<IntermediateStorage> consumeLargestStorage();
void logCurrentState() const;
private:
std::list<std::shared_ptr<IntermediateStorage>> m_storages; // larger storages are in front
mutable std::mutex m_storagesMutex;
};
#endif // STORAGE_PROVIDER_H