• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
24 class CaptionStmt;
25 class ClassStmt;
26 class CharacteristicsStmt;
27 class FontStmt;
28 class LanguageResource;
29 class StyleStmt;
30 class VersionStmt;
31 
32 class Visitor {
33 public:
34   virtual Error visitNullResource(const RCResource *) = 0;
35   virtual Error visitAcceleratorsResource(const RCResource *) = 0;
36   virtual Error visitBitmapResource(const RCResource *) = 0;
37   virtual Error visitCursorResource(const RCResource *) = 0;
38   virtual Error visitDialogResource(const RCResource *) = 0;
39   virtual Error visitHTMLResource(const RCResource *) = 0;
40   virtual Error visitIconResource(const RCResource *) = 0;
41   virtual Error visitMenuResource(const RCResource *) = 0;
42   virtual Error visitStringTableResource(const RCResource *) = 0;
43   virtual Error visitUserDefinedResource(const RCResource *) = 0;
44   virtual Error visitVersionInfoResource(const RCResource *) = 0;
45 
46   virtual Error visitCaptionStmt(const CaptionStmt *) = 0;
47   virtual Error visitClassStmt(const ClassStmt *) = 0;
48   virtual Error visitCharacteristicsStmt(const CharacteristicsStmt *) = 0;
49   virtual Error visitFontStmt(const FontStmt *) = 0;
50   virtual Error visitLanguageStmt(const LanguageResource *) = 0;
51   virtual Error visitStyleStmt(const StyleStmt *) = 0;
52   virtual Error visitVersionStmt(const VersionStmt *) = 0;
53 
~Visitor()54   virtual ~Visitor() {}
55 };
56 
57 } // namespace rc
58 } // namespace llvm
59 
60 #endif
61