Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: xfa/fxfa/fm2js/xfa_expression.h

Issue 2071683002: Make code compile with clang_use_chrome_plugin (part V) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: clean up Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_textlayout.cpp ('k') | xfa/fxfa/fm2js/xfa_expression.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FXFA_FM2JS_XFA_EXPRESSION_H_ 7 #ifndef XFA_FXFA_FM2JS_XFA_EXPRESSION_H_
8 #define XFA_FXFA_FM2JS_XFA_EXPRESSION_H_ 8 #define XFA_FXFA_FM2JS_XFA_EXPRESSION_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 CFX_WideStringCArray* m_pArguments; 56 CFX_WideStringCArray* m_pArguments;
57 CFX_ArrayTemplate<CXFA_FMExpression*>* m_pExpressions; 57 CFX_ArrayTemplate<CXFA_FMExpression*>* m_pExpressions;
58 FX_BOOL m_isGlobal; 58 FX_BOOL m_isGlobal;
59 }; 59 };
60 60
61 class CXFA_FMVarExpression : public CXFA_FMExpression { 61 class CXFA_FMVarExpression : public CXFA_FMExpression {
62 public: 62 public:
63 CXFA_FMVarExpression(uint32_t line, 63 CXFA_FMVarExpression(uint32_t line,
64 const CFX_WideStringC& wsName, 64 const CFX_WideStringC& wsName,
65 CXFA_FMExpression* pInit); 65 CXFA_FMExpression* pInit);
66 ~CXFA_FMVarExpression() override;
67
66 void ToJavaScript(CFX_WideTextBuf& javascript) override; 68 void ToJavaScript(CFX_WideTextBuf& javascript) override;
67 void ToImpliedReturnJS(CFX_WideTextBuf&) override; 69 void ToImpliedReturnJS(CFX_WideTextBuf&) override;
68 70
69 private: 71 private:
70 CFX_WideStringC m_wsName; 72 CFX_WideStringC m_wsName;
71 std::unique_ptr<CXFA_FMExpression> m_pInit; 73 std::unique_ptr<CXFA_FMExpression> m_pInit;
72 }; 74 };
73 75
74 class CXFA_FMExpExpression : public CXFA_FMExpression { 76 class CXFA_FMExpExpression : public CXFA_FMExpression {
75 public: 77 public:
76 CXFA_FMExpExpression(uint32_t line, CXFA_FMSimpleExpression* pExpression); 78 CXFA_FMExpExpression(uint32_t line, CXFA_FMSimpleExpression* pExpression);
79 ~CXFA_FMExpExpression() override;
80
77 void ToJavaScript(CFX_WideTextBuf& javascript) override; 81 void ToJavaScript(CFX_WideTextBuf& javascript) override;
78 void ToImpliedReturnJS(CFX_WideTextBuf&) override; 82 void ToImpliedReturnJS(CFX_WideTextBuf&) override;
79 83
80 private: 84 private:
81 std::unique_ptr<CXFA_FMSimpleExpression> m_pExpression; 85 std::unique_ptr<CXFA_FMSimpleExpression> m_pExpression;
82 }; 86 };
83 87
84 class CXFA_FMBlockExpression : public CXFA_FMExpression { 88 class CXFA_FMBlockExpression : public CXFA_FMExpression {
85 public: 89 public:
86 // Takes ownership of |pExpressionList|. 90 // Takes ownership of |pExpressionList|.
87 CXFA_FMBlockExpression( 91 CXFA_FMBlockExpression(
88 uint32_t line, 92 uint32_t line,
89 CFX_ArrayTemplate<CXFA_FMExpression*>* pExpressionList); 93 CFX_ArrayTemplate<CXFA_FMExpression*>* pExpressionList);
90 ~CXFA_FMBlockExpression() override; 94 ~CXFA_FMBlockExpression() override;
91 95
92 void ToJavaScript(CFX_WideTextBuf& javascript) override; 96 void ToJavaScript(CFX_WideTextBuf& javascript) override;
93 void ToImpliedReturnJS(CFX_WideTextBuf&) override; 97 void ToImpliedReturnJS(CFX_WideTextBuf&) override;
94 98
95 private: 99 private:
96 CFX_ArrayTemplate<CXFA_FMExpression*>* m_pExpressionList; 100 CFX_ArrayTemplate<CXFA_FMExpression*>* m_pExpressionList;
97 }; 101 };
98 102
99 class CXFA_FMDoExpression : public CXFA_FMExpression { 103 class CXFA_FMDoExpression : public CXFA_FMExpression {
100 public: 104 public:
101 CXFA_FMDoExpression(uint32_t line, CXFA_FMExpression* pList); 105 CXFA_FMDoExpression(uint32_t line, CXFA_FMExpression* pList);
106 ~CXFA_FMDoExpression() override;
107
102 void ToJavaScript(CFX_WideTextBuf& javascript) override; 108 void ToJavaScript(CFX_WideTextBuf& javascript) override;
103 void ToImpliedReturnJS(CFX_WideTextBuf&) override; 109 void ToImpliedReturnJS(CFX_WideTextBuf&) override;
104 110
105 private: 111 private:
106 std::unique_ptr<CXFA_FMExpression> m_pList; 112 std::unique_ptr<CXFA_FMExpression> m_pList;
107 }; 113 };
108 114
109 class CXFA_FMIfExpression : public CXFA_FMExpression { 115 class CXFA_FMIfExpression : public CXFA_FMExpression {
110 public: 116 public:
111 CXFA_FMIfExpression(uint32_t line, 117 CXFA_FMIfExpression(uint32_t line,
112 CXFA_FMSimpleExpression* pExpression, 118 CXFA_FMSimpleExpression* pExpression,
113 CXFA_FMExpression* pIfExpression, 119 CXFA_FMExpression* pIfExpression,
114 CXFA_FMExpression* pElseExpression); 120 CXFA_FMExpression* pElseExpression);
121 ~CXFA_FMIfExpression() override;
122
115 void ToJavaScript(CFX_WideTextBuf& javascript) override; 123 void ToJavaScript(CFX_WideTextBuf& javascript) override;
116 void ToImpliedReturnJS(CFX_WideTextBuf&) override; 124 void ToImpliedReturnJS(CFX_WideTextBuf&) override;
117 125
118 private: 126 private:
119 std::unique_ptr<CXFA_FMSimpleExpression> m_pExpression; 127 std::unique_ptr<CXFA_FMSimpleExpression> m_pExpression;
120 std::unique_ptr<CXFA_FMExpression> m_pIfExpression; 128 std::unique_ptr<CXFA_FMExpression> m_pIfExpression;
121 std::unique_ptr<CXFA_FMExpression> m_pElseExpression; 129 std::unique_ptr<CXFA_FMExpression> m_pElseExpression;
122 }; 130 };
123 131
124 class CXFA_FMLoopExpression : public CXFA_FMExpression { 132 class CXFA_FMLoopExpression : public CXFA_FMExpression {
125 public: 133 public:
126 explicit CXFA_FMLoopExpression(uint32_t line) : CXFA_FMExpression(line) {} 134 explicit CXFA_FMLoopExpression(uint32_t line) : CXFA_FMExpression(line) {}
127 ~CXFA_FMLoopExpression() override; 135 ~CXFA_FMLoopExpression() override;
128 void ToJavaScript(CFX_WideTextBuf& javascript) override; 136 void ToJavaScript(CFX_WideTextBuf& javascript) override;
129 void ToImpliedReturnJS(CFX_WideTextBuf&) override; 137 void ToImpliedReturnJS(CFX_WideTextBuf&) override;
130 }; 138 };
131 139
132 class CXFA_FMWhileExpression : public CXFA_FMLoopExpression { 140 class CXFA_FMWhileExpression : public CXFA_FMLoopExpression {
133 public: 141 public:
134 CXFA_FMWhileExpression(uint32_t line, 142 CXFA_FMWhileExpression(uint32_t line,
135 CXFA_FMSimpleExpression* pCodition, 143 CXFA_FMSimpleExpression* pCodition,
136 CXFA_FMExpression* pExpression); 144 CXFA_FMExpression* pExpression);
145 ~CXFA_FMWhileExpression() override;
146
137 void ToJavaScript(CFX_WideTextBuf& javascript) override; 147 void ToJavaScript(CFX_WideTextBuf& javascript) override;
138 void ToImpliedReturnJS(CFX_WideTextBuf&) override; 148 void ToImpliedReturnJS(CFX_WideTextBuf&) override;
139 149
140 private: 150 private:
141 std::unique_ptr<CXFA_FMSimpleExpression> m_pCondition; 151 std::unique_ptr<CXFA_FMSimpleExpression> m_pCondition;
142 std::unique_ptr<CXFA_FMExpression> m_pExpression; 152 std::unique_ptr<CXFA_FMExpression> m_pExpression;
143 }; 153 };
144 154
145 class CXFA_FMBreakExpression : public CXFA_FMExpression { 155 class CXFA_FMBreakExpression : public CXFA_FMExpression {
146 public: 156 public:
(...skipping 13 matching lines...) Expand all
160 170
161 class CXFA_FMForExpression : public CXFA_FMLoopExpression { 171 class CXFA_FMForExpression : public CXFA_FMLoopExpression {
162 public: 172 public:
163 CXFA_FMForExpression(uint32_t line, 173 CXFA_FMForExpression(uint32_t line,
164 const CFX_WideStringC& wsVariant, 174 const CFX_WideStringC& wsVariant,
165 CXFA_FMSimpleExpression* pAssignment, 175 CXFA_FMSimpleExpression* pAssignment,
166 CXFA_FMSimpleExpression* pAccessor, 176 CXFA_FMSimpleExpression* pAccessor,
167 int32_t iDirection, 177 int32_t iDirection,
168 CXFA_FMSimpleExpression* pStep, 178 CXFA_FMSimpleExpression* pStep,
169 CXFA_FMExpression* pList); 179 CXFA_FMExpression* pList);
180 ~CXFA_FMForExpression() override;
181
170 void ToJavaScript(CFX_WideTextBuf& javascript) override; 182 void ToJavaScript(CFX_WideTextBuf& javascript) override;
171 void ToImpliedReturnJS(CFX_WideTextBuf&) override; 183 void ToImpliedReturnJS(CFX_WideTextBuf&) override;
172 184
173 private: 185 private:
174 CFX_WideStringC m_wsVariant; 186 CFX_WideStringC m_wsVariant;
175 std::unique_ptr<CXFA_FMSimpleExpression> m_pAssignment; 187 std::unique_ptr<CXFA_FMSimpleExpression> m_pAssignment;
176 std::unique_ptr<CXFA_FMSimpleExpression> m_pAccessor; 188 std::unique_ptr<CXFA_FMSimpleExpression> m_pAccessor;
177 int32_t m_iDirection; 189 int32_t m_iDirection;
178 std::unique_ptr<CXFA_FMSimpleExpression> m_pStep; 190 std::unique_ptr<CXFA_FMSimpleExpression> m_pStep;
179 std::unique_ptr<CXFA_FMExpression> m_pList; 191 std::unique_ptr<CXFA_FMExpression> m_pList;
(...skipping 12 matching lines...) Expand all
192 void ToJavaScript(CFX_WideTextBuf& javascript) override; 204 void ToJavaScript(CFX_WideTextBuf& javascript) override;
193 void ToImpliedReturnJS(CFX_WideTextBuf&) override; 205 void ToImpliedReturnJS(CFX_WideTextBuf&) override;
194 206
195 private: 207 private:
196 CFX_WideStringC m_wsIdentifier; 208 CFX_WideStringC m_wsIdentifier;
197 CFX_ArrayTemplate<CXFA_FMSimpleExpression*>* m_pAccessors; 209 CFX_ArrayTemplate<CXFA_FMSimpleExpression*>* m_pAccessors;
198 std::unique_ptr<CXFA_FMExpression> m_pList; 210 std::unique_ptr<CXFA_FMExpression> m_pList;
199 }; 211 };
200 212
201 #endif // XFA_FXFA_FM2JS_XFA_EXPRESSION_H_ 213 #endif // XFA_FXFA_FM2JS_XFA_EXPRESSION_H_
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_textlayout.cpp ('k') | xfa/fxfa/fm2js/xfa_expression.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698