| OLD | NEW |
| 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 28 matching lines...) Expand all Loading... |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 class CXFA_FMFunctionDefinition : public CXFA_FMExpression { | 41 class CXFA_FMFunctionDefinition : public CXFA_FMExpression { |
| 42 public: | 42 public: |
| 43 // Takes ownership of |pExpressions|. | 43 // Takes ownership of |pExpressions|. |
| 44 CXFA_FMFunctionDefinition( | 44 CXFA_FMFunctionDefinition( |
| 45 uint32_t line, | 45 uint32_t line, |
| 46 bool isGlobal, | 46 bool isGlobal, |
| 47 const CFX_WideStringC& wsName, | 47 const CFX_WideStringC& wsName, |
| 48 std::unique_ptr<CFX_WideStringCArray> pArguments, | 48 std::unique_ptr<CFX_WideStringCArray> pArguments, |
| 49 CFX_ArrayTemplate<CXFA_FMExpression*>* pExpressions); | 49 std::vector<std::unique_ptr<CXFA_FMExpression>>&& pExpressions); |
| 50 ~CXFA_FMFunctionDefinition() override; | 50 ~CXFA_FMFunctionDefinition() override; |
| 51 | 51 |
| 52 void ToJavaScript(CFX_WideTextBuf& javascript) override; | 52 void ToJavaScript(CFX_WideTextBuf& javascript) override; |
| 53 void ToImpliedReturnJS(CFX_WideTextBuf&) override; | 53 void ToImpliedReturnJS(CFX_WideTextBuf&) override; |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 CFX_WideStringC m_wsName; | 56 CFX_WideStringC m_wsName; |
| 57 std::unique_ptr<CFX_WideStringCArray> m_pArguments; | 57 std::unique_ptr<CFX_WideStringCArray> m_pArguments; |
| 58 CFX_ArrayTemplate<CXFA_FMExpression*>* m_pExpressions; | 58 std::vector<std::unique_ptr<CXFA_FMExpression>> m_pExpressions; |
| 59 bool m_isGlobal; | 59 bool m_isGlobal; |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 class CXFA_FMVarExpression : public CXFA_FMExpression { | 62 class CXFA_FMVarExpression : public CXFA_FMExpression { |
| 63 public: | 63 public: |
| 64 CXFA_FMVarExpression(uint32_t line, | 64 CXFA_FMVarExpression(uint32_t line, |
| 65 const CFX_WideStringC& wsName, | 65 const CFX_WideStringC& wsName, |
| 66 CXFA_FMExpression* pInit); | 66 CXFA_FMExpression* pInit); |
| 67 ~CXFA_FMVarExpression() override; | 67 ~CXFA_FMVarExpression() override; |
| 68 | 68 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 81 | 81 |
| 82 void ToJavaScript(CFX_WideTextBuf& javascript) override; | 82 void ToJavaScript(CFX_WideTextBuf& javascript) override; |
| 83 void ToImpliedReturnJS(CFX_WideTextBuf&) override; | 83 void ToImpliedReturnJS(CFX_WideTextBuf&) override; |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 std::unique_ptr<CXFA_FMSimpleExpression> m_pExpression; | 86 std::unique_ptr<CXFA_FMSimpleExpression> m_pExpression; |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 class CXFA_FMBlockExpression : public CXFA_FMExpression { | 89 class CXFA_FMBlockExpression : public CXFA_FMExpression { |
| 90 public: | 90 public: |
| 91 // Takes ownership of |pExpressionList|. | |
| 92 CXFA_FMBlockExpression( | 91 CXFA_FMBlockExpression( |
| 93 uint32_t line, | 92 uint32_t line, |
| 94 CFX_ArrayTemplate<CXFA_FMExpression*>* pExpressionList); | 93 std::vector<std::unique_ptr<CXFA_FMExpression>>&& pExpressionList); |
| 95 ~CXFA_FMBlockExpression() override; | 94 ~CXFA_FMBlockExpression() override; |
| 96 | 95 |
| 97 void ToJavaScript(CFX_WideTextBuf& javascript) override; | 96 void ToJavaScript(CFX_WideTextBuf& javascript) override; |
| 98 void ToImpliedReturnJS(CFX_WideTextBuf&) override; | 97 void ToImpliedReturnJS(CFX_WideTextBuf&) override; |
| 99 | 98 |
| 100 private: | 99 private: |
| 101 CFX_ArrayTemplate<CXFA_FMExpression*>* m_pExpressionList; | 100 std::vector<std::unique_ptr<CXFA_FMExpression>> m_ExpressionList; |
| 102 }; | 101 }; |
| 103 | 102 |
| 104 class CXFA_FMDoExpression : public CXFA_FMExpression { | 103 class CXFA_FMDoExpression : public CXFA_FMExpression { |
| 105 public: | 104 public: |
| 106 CXFA_FMDoExpression(uint32_t line, CXFA_FMExpression* pList); | 105 CXFA_FMDoExpression(uint32_t line, CXFA_FMExpression* pList); |
| 107 ~CXFA_FMDoExpression() override; | 106 ~CXFA_FMDoExpression() override; |
| 108 | 107 |
| 109 void ToJavaScript(CFX_WideTextBuf& javascript) override; | 108 void ToJavaScript(CFX_WideTextBuf& javascript) override; |
| 110 void ToImpliedReturnJS(CFX_WideTextBuf&) override; | 109 void ToImpliedReturnJS(CFX_WideTextBuf&) override; |
| 111 | 110 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 void ToJavaScript(CFX_WideTextBuf& javascript) override; | 204 void ToJavaScript(CFX_WideTextBuf& javascript) override; |
| 206 void ToImpliedReturnJS(CFX_WideTextBuf&) override; | 205 void ToImpliedReturnJS(CFX_WideTextBuf&) override; |
| 207 | 206 |
| 208 private: | 207 private: |
| 209 CFX_WideStringC m_wsIdentifier; | 208 CFX_WideStringC m_wsIdentifier; |
| 210 std::vector<std::unique_ptr<CXFA_FMSimpleExpression>> m_pAccessors; | 209 std::vector<std::unique_ptr<CXFA_FMSimpleExpression>> m_pAccessors; |
| 211 std::unique_ptr<CXFA_FMExpression> m_pList; | 210 std::unique_ptr<CXFA_FMExpression> m_pList; |
| 212 }; | 211 }; |
| 213 | 212 |
| 214 #endif // XFA_FXFA_FM2JS_XFA_EXPRESSION_H_ | 213 #endif // XFA_FXFA_FM2JS_XFA_EXPRESSION_H_ |
| OLD | NEW |