Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.0 KiB

  1. //========= Copyright � 1996-2002, Valve LLC, All rights reserved. ============
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef FACTORYOVERLOADS_H
  8. #define FACTORYOVERLOADS_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "UtlDict.h"
  13. class IAttributeWidgetFactory;
  14. class IAttributeElementChoiceList;
  15. class CFactoryOverloads : public IFactoryOverloads
  16. {
  17. public:
  18. virtual void AddOverload
  19. (
  20. char const *attributeName,
  21. IAttributeWidgetFactory *newFactory,
  22. IAttributeElementChoiceList *newChoiceList
  23. );
  24. int Count();
  25. char const *Name( int index );
  26. IAttributeWidgetFactory *Factory( int index );
  27. IAttributeElementChoiceList *ChoiceList( int index );
  28. private:
  29. struct Entry_t
  30. {
  31. Entry_t() :
  32. factory( 0 ),
  33. choices( 0 )
  34. {
  35. }
  36. IAttributeWidgetFactory *factory;
  37. IAttributeElementChoiceList *choices;
  38. };
  39. CUtlDict< Entry_t, int > m_Overloads;
  40. };
  41. #endif // FACTORYOVERLOADS_H