summaryrefslogtreecommitdiff
path: root/indra/llui/llcallbackmap.h
blob: dfc965aa08ebe1962e093e4a945411cf5088fa3a (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
27
28
29
30
31
32
33
34
35
36
/** 
 * @file llcallbackmap.h
 * @brief LLCallbackMap base class
 *
 * Copyright (c) 2006-$CurrentYear$, Linden Research, Inc.
 * $License$
 */

// llcallbackmap.h
//
// Copyright 2006, Linden Research, Inc.

#ifndef LL_CALLBACK_MAP_H
#define LL_CALLBACK_MAP_H

#include <map>
#include "llstring.h"

class LLCallbackMap
{
public:
	// callback definition.
	typedef void* (*callback_t)(void* data);
	
	typedef std::map<LLString, LLCallbackMap> map_t;
	typedef map_t::iterator map_iter_t;
	typedef map_t::const_iterator map_const_iter_t;

	LLCallbackMap() : mCallback(NULL), mData(NULL) { }
	LLCallbackMap(callback_t callback, void* data) : mCallback(callback), mData(data) { }

	callback_t	mCallback;
	void*		mData;
};

#endif // LL_CALLBACK_MAP_H