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 | |
13 | #ifndef LLVM_TOOLS_LLVMRC_RESOURCEVISITOR_H |
14 | #define LLVM_TOOLS_LLVMRC_RESOURCEVISITOR_H |
15 | |
16 | #include "llvm/Support/Error.h" |
17 | |
18 | namespace llvm { |
19 | namespace rc { |
20 | |
21 | class RCResource; |
22 | |
23 | class CaptionStmt; |
24 | class ClassStmt; |
25 | class CharacteristicsStmt; |
26 | class ExStyleStmt; |
27 | class FontStmt; |
28 | class LanguageResource; |
29 | class StyleStmt; |
30 | class VersionStmt; |
31 | class MenuStmt; |
32 | |
33 | class Visitor { |
34 | public: |
35 | virtual Error visitNullResource(const RCResource *) = 0; |
36 | virtual Error visitAcceleratorsResource(const RCResource *) = 0; |
37 | virtual Error visitBitmapResource(const RCResource *) = 0; |
38 | virtual Error visitCursorResource(const RCResource *) = 0; |
39 | virtual Error visitDialogResource(const RCResource *) = 0; |
40 | virtual Error visitHTMLResource(const RCResource *) = 0; |
41 | virtual Error visitIconResource(const RCResource *) = 0; |
42 | virtual Error visitMenuResource(const RCResource *) = 0; |
43 | virtual Error visitMenuExResource(const RCResource *) = 0; |
44 | virtual Error visitStringTableResource(const RCResource *) = 0; |
45 | virtual Error visitUserDefinedResource(const RCResource *) = 0; |
46 | virtual Error visitVersionInfoResource(const RCResource *) = 0; |
47 | |
48 | virtual Error visitCaptionStmt(const CaptionStmt *) = 0; |
49 | virtual Error visitClassStmt(const ClassStmt *) = 0; |
50 | virtual Error visitCharacteristicsStmt(const CharacteristicsStmt *) = 0; |
51 | virtual Error visitExStyleStmt(const ExStyleStmt *) = 0; |
52 | virtual Error visitFontStmt(const FontStmt *) = 0; |
53 | virtual Error visitLanguageStmt(const LanguageResource *) = 0; |
54 | virtual Error visitStyleStmt(const StyleStmt *) = 0; |
55 | virtual Error visitVersionStmt(const VersionStmt *) = 0; |
56 | virtual Error visitMenuStmt(const MenuStmt *) = 0; |
57 | |
58 | virtual ~Visitor() {} |
59 | }; |
60 | |
61 | } // namespace rc |
62 | } // namespace llvm |
63 | |
64 | #endif |
65 |