summaryrefslogtreecommitdiff
path: root/vgui2/dme_controls/FactoryOverloads.h
blob: d37822693170b16ee56660268f7501639348fd70 (plain) (blame)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================

#ifndef FACTORYOVERLOADS_H
#define FACTORYOVERLOADS_H
#ifdef _WIN32
#pragma once
#endif

#include "utldict.h"

class IAttributeWidgetFactory;
class IAttributeElementChoiceList;

class CFactoryOverloads : public IFactoryOverloads
{
public:
	virtual void				AddOverload
								( 
									char const *attributeName, 
									IAttributeWidgetFactory *newFactory,
									IAttributeElementChoiceList *newChoiceList 
								);
	int							Count();
	char const					*Name( int index );
	IAttributeWidgetFactory		*Factory( int index );
	IAttributeElementChoiceList *ChoiceList( int index );

private:
	struct Entry_t
	{
		Entry_t() : 
			factory( 0 ),
			choices( 0 )
		{
		}

		IAttributeWidgetFactory			*factory;
		IAttributeElementChoiceList		*choices;
	};

	CUtlDict< Entry_t, int >	m_Overloads;
};

#endif // FACTORYOVERLOADS_H