HostConfigFlags.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. #include "Core/ICustomConfigFlags.h"
  7. class HostConfigFlags : public ICustomConfigFlags
  8. {
  9. public:
  10. #define FLAG(Type, Name, Desc, Default) \
  11. Type Name; \
  12. bool Name##IsEnabled;
  13. #include "HostConfigFlagsList.h"
  14. static HostConfigFlags flags;
  15. static LPWSTR* argsVal;
  16. static int argsCount;
  17. static void(__stdcall *pfnPrintUsage)();
  18. static void HandleArgsFlag(int& argc, _Inout_updates_to_(argc, argc) LPWSTR argv[]);
  19. virtual bool ParseFlag(LPCWSTR flagsString, ICmdLineArgsParser * parser) override;
  20. virtual void PrintUsage() override;
  21. static void PrintUsageString();
  22. private:
  23. int nDummy;
  24. HostConfigFlags();
  25. template <typename T>
  26. void Parse(ICmdLineArgsParser * parser, T * value);
  27. };