Files
Sourcetrail/src/lib/data/StorageProvider.h
T
malte_langkabel 328cf7e8cc logic: indexer and name resolving fixes
* made header and excluded filepaths of filemanager canonical
* implemented solving Attributed- and InjectedClassNameType
* handled clang returning null objects in NameResolvers
2016-11-29 17:26:57 +01:00

29 lines
693 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 pushIndexerTarget(std::shared_ptr<IntermediateStorage> storage);
// always returns a usable storage
std::shared_ptr<IntermediateStorage> popIndexerTarget();
// returns empty shared_ptr if no storages available
std::shared_ptr<IntermediateStorage> popInjectionSource();
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