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
18namespace llvm {
19namespace rc {
20
21class RCResource;
22
23class CaptionStmt;
24class ClassStmt;
25class CharacteristicsStmt;
26class ExStyleStmt;
27class FontStmt;
28class LanguageResource;
29class StyleStmt;
30class VersionStmt;
31class MenuStmt;
32
33class Visitor {
34public:
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