Marek Sokolowski | 8f19343 | 2017-09-29 17:14:09 +0000 | [diff] [blame] | 1 | //===-- ResourceVisitor.h ---------------------------------------*- C++-*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===---------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This defines a base class visiting resource script resources. |
| 11 | // |
| 12 | //===---------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_TOOLS_LLVMRC_RESOURCEVISITOR_H |
| 15 | #define LLVM_TOOLS_LLVMRC_RESOURCEVISITOR_H |
| 16 | |
| 17 | #include "llvm/Support/Error.h" |
| 18 | |
| 19 | namespace llvm { |
| 20 | namespace rc { |
| 21 | |
| 22 | class RCResource; |
| 23 | |
Zachary Turner | 420090a | 2017-10-06 20:51:20 +0000 | [diff] [blame^] | 24 | class CaptionStmt; |
Marek Sokolowski | 22fccd6 | 2017-09-29 19:07:44 +0000 | [diff] [blame] | 25 | class CharacteristicsStmt; |
Zachary Turner | 420090a | 2017-10-06 20:51:20 +0000 | [diff] [blame^] | 26 | class FontStmt; |
Marek Sokolowski | 8f19343 | 2017-09-29 17:14:09 +0000 | [diff] [blame] | 27 | class LanguageResource; |
Zachary Turner | 420090a | 2017-10-06 20:51:20 +0000 | [diff] [blame^] | 28 | class StyleStmt; |
Marek Sokolowski | 22fccd6 | 2017-09-29 19:07:44 +0000 | [diff] [blame] | 29 | class VersionStmt; |
Marek Sokolowski | 8f19343 | 2017-09-29 17:14:09 +0000 | [diff] [blame] | 30 | |
| 31 | class Visitor { |
| 32 | public: |
| 33 | virtual Error visitNullResource(const RCResource *) = 0; |
Marek Sokolowski | 22fccd6 | 2017-09-29 19:07:44 +0000 | [diff] [blame] | 34 | virtual Error visitAcceleratorsResource(const RCResource *) = 0; |
Marek Sokolowski | 7f7745c | 2017-09-30 00:38:52 +0000 | [diff] [blame] | 35 | virtual Error visitDialogResource(const RCResource *) = 0; |
Marek Sokolowski | 8f19343 | 2017-09-29 17:14:09 +0000 | [diff] [blame] | 36 | virtual Error visitHTMLResource(const RCResource *) = 0; |
Marek Sokolowski | 42f494d | 2017-09-29 22:25:05 +0000 | [diff] [blame] | 37 | virtual Error visitMenuResource(const RCResource *) = 0; |
Marek Sokolowski | 8f19343 | 2017-09-29 17:14:09 +0000 | [diff] [blame] | 38 | |
Zachary Turner | 420090a | 2017-10-06 20:51:20 +0000 | [diff] [blame^] | 39 | virtual Error visitCaptionStmt(const CaptionStmt *) = 0; |
Marek Sokolowski | 22fccd6 | 2017-09-29 19:07:44 +0000 | [diff] [blame] | 40 | virtual Error visitCharacteristicsStmt(const CharacteristicsStmt *) = 0; |
Zachary Turner | 420090a | 2017-10-06 20:51:20 +0000 | [diff] [blame^] | 41 | virtual Error visitFontStmt(const FontStmt *) = 0; |
Marek Sokolowski | 8f19343 | 2017-09-29 17:14:09 +0000 | [diff] [blame] | 42 | virtual Error visitLanguageStmt(const LanguageResource *) = 0; |
Zachary Turner | 420090a | 2017-10-06 20:51:20 +0000 | [diff] [blame^] | 43 | virtual Error visitStyleStmt(const StyleStmt *) = 0; |
Marek Sokolowski | 22fccd6 | 2017-09-29 19:07:44 +0000 | [diff] [blame] | 44 | virtual Error visitVersionStmt(const VersionStmt *) = 0; |
Marek Sokolowski | 8f19343 | 2017-09-29 17:14:09 +0000 | [diff] [blame] | 45 | |
| 46 | virtual ~Visitor() {} |
| 47 | }; |
| 48 | |
| 49 | } // namespace rc |
| 50 | } // namespace llvm |
| 51 | |
| 52 | #endif |