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.

49 lines
1.4 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef INPUTVAR_H
  9. #define INPUTVAR_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. #include "entitylist.h"
  14. //-----------------------------------------------------------------------------
  15. // Purpose: Used to request a value, or a set of values, from a set of entities.
  16. // used when a multi-input variable needs to refresh it's inputs
  17. //-----------------------------------------------------------------------------
  18. class CMultiInputVar
  19. {
  20. public:
  21. CMultiInputVar() : m_InputList(NULL) {}
  22. ~CMultiInputVar();
  23. struct inputitem_t
  24. {
  25. variant_t value; // local copy of variable (maybe make this a variant?)
  26. int outputID; // the ID number of the output that sent this
  27. inputitem_t *next;
  28. // allocate and free from MPool memory
  29. static void *operator new( size_t stAllocBlock );
  30. static void *operator new( size_t stAllocateBlock, int nBlockUse, const char *pFileName, int nLine );
  31. static void operator delete( void *pMem );
  32. static void operator delete( void *pMem, int nBlockUse, const char *pFileName, int nLine ) { operator delete(pMem); }
  33. };
  34. inputitem_t *m_InputList; // list of data
  35. int m_bUpdatedThisFrame;
  36. void AddValue( variant_t newVal, int outputID );
  37. DECLARE_SIMPLE_DATADESC();
  38. };
  39. #endif // INPUTVAR_H