1/*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef DWARF_MANAGER_H
6#define DWARF_MANAGER_H
7
8#include <Locker.h>
9
10#include <util/DoublyLinkedList.h>
11
12
13class DwarfFile;
14
15
16class DwarfManager {
17public:
18								DwarfManager();
19								~DwarfManager();
20
21			status_t			Init();
22
23			bool				Lock()		{ return fLock.Lock(); }
24			void				Unlock()	{ fLock.Unlock(); }
25
26			status_t			LoadFile(const char* fileName,
27									DwarfFile*& _file);
28									// returns a reference
29			status_t			FinishLoading();
30
31private:
32			typedef DoublyLinkedList<DwarfFile> FileList;
33
34private:
35			BLocker				fLock;
36			FileList			fFiles;
37};
38
39
40
41#endif	// DWARF_MANAGER_H
42