Leaked source code of windows server 2003
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.

42 lines
802 B

  1. #if !defined(_WINDOWS_BCL_VARARG_H_INCLUDED_)
  2. #define _WINDOWS_BCL_VARARG_H_INCLUDED_
  3. #pragma once
  4. /*++
  5. Copyright (c) 2000 Microsoft Corporation
  6. Module Name:
  7. bcl_vararg.h
  8. Abstract:
  9. Author:
  10. Michael Grier (MGrier) 2/6/2002
  11. Revision History:
  12. --*/
  13. #include <stdarg.h>
  14. namespace BCL {
  15. class CVaList
  16. {
  17. public:
  18. inline CVaList() { }
  19. template <typename T> inline CVaList(T &rt) { va_start(m_ap, rt); }
  20. inline ~CVaList() { va_end(m_ap); }
  21. template <typename T> inline void NextArg(T &rt) { rt = va_arg(m_ap, T); }
  22. inline operator va_list() const { return m_ap; }
  23. private:
  24. va_list m_ap;
  25. }; // class CVaList
  26. }; // namespace BCL
  27. #endif // !defined(_WINDOWS_BCL_VARARG_H_INCLUDED_)