ResourceVisitor.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //===-- ResourceVisitor.h ---------------------------------------*- C++-*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===---------------------------------------------------------------------===//
  8. //
  9. // This defines a base class visiting resource script resources.
  10. //
  11. //===---------------------------------------------------------------------===//
  12. #ifndef LLVM_TOOLS_LLVMRC_RESOURCEVISITOR_H
  13. #define LLVM_TOOLS_LLVMRC_RESOURCEVISITOR_H
  14. #include "llvm/Support/Error.h"
  15. namespace llvm {
  16. namespace rc {
  17. class RCResource;
  18. class CaptionStmt;
  19. class ClassStmt;
  20. class CharacteristicsStmt;
  21. class ExStyleStmt;
  22. class FontStmt;
  23. class LanguageResource;
  24. class StyleStmt;
  25. class VersionStmt;
  26. class Visitor {
  27. public:
  28. virtual Error visitNullResource(const RCResource *) = 0;
  29. virtual Error visitAcceleratorsResource(const RCResource *) = 0;
  30. virtual Error visitBitmapResource(const RCResource *) = 0;
  31. virtual Error visitCursorResource(const RCResource *) = 0;
  32. virtual Error visitDialogResource(const RCResource *) = 0;
  33. virtual Error visitHTMLResource(const RCResource *) = 0;
  34. virtual Error visitIconResource(const RCResource *) = 0;
  35. virtual Error visitMenuResource(const RCResource *) = 0;
  36. virtual Error visitStringTableResource(const RCResource *) = 0;
  37. virtual Error visitUserDefinedResource(const RCResource *) = 0;
  38. virtual Error visitVersionInfoResource(const RCResource *) = 0;
  39. virtual Error visitCaptionStmt(const CaptionStmt *) = 0;
  40. virtual Error visitClassStmt(const ClassStmt *) = 0;
  41. virtual Error visitCharacteristicsStmt(const CharacteristicsStmt *) = 0;
  42. virtual Error visitExStyleStmt(const ExStyleStmt *) = 0;
  43. virtual Error visitFontStmt(const FontStmt *) = 0;
  44. virtual Error visitLanguageStmt(const LanguageResource *) = 0;
  45. virtual Error visitStyleStmt(const StyleStmt *) = 0;
  46. virtual Error visitVersionStmt(const VersionStmt *) = 0;
  47. virtual ~Visitor() {}
  48. };
  49. } // namespace rc
  50. } // namespace llvm
  51. #endif