summaryrefslogtreecommitdiffstats
path: root/krusader/Queue/queue_mgr.h
blob: c2b8bc96e3d3b74f01e9081e7f6e3d1f6625ff8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef QUEUE_MGR_H
#define QUEUE_MGR_H

#include "queue.h"
#include <tqmap.h>

/**
 * QueueManager holds multiple queues and has a static
 * method that fetches a queue by name. calling it with
 * no arguments will fetch the default queue
 */
class QueueManager
{
	static const TQString defaultName;
public:
	QueueManager();
	~QueueManager();
	
	static Queue* queue(const TQString& queueName=defaultName);
	TQValueList<TQString> queues() const;

protected:
	static TQMap<TQString, Queue*> _queues;
};

#endif // QUEUE_MGR_H