summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.h
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2018-02-19 18:18:38 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-19 18:18:38 +0000
commit00961a731b4811f84b5610d0b752f2f2b610f8ff (patch)
tree3eeba992b11a7ecbfb89fc7009acba4da2d42f14 /xfa/fxfa/fm2js/cxfa_fmsimpleexpression.h
parentd276a52cd5061e0d4ee4aa79b8e89bbeb0a89da3 (diff)
downloadpdfium-00961a731b4811f84b5610d0b752f2f2b610f8ff.tar.xz
Remove base class ToJavaScript methods in FormCalc
This CL removes the Loop base class as it adds no functionality. Other base classes have had their ToJavaScript methods set as pure virtual and their constructors made protected. Change-Id: I5c77b8734d23c576dd52db7f72396ecdf2f7bd22 Reviewed-on: https://pdfium-review.googlesource.com/27270 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js/cxfa_fmsimpleexpression.h')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmsimpleexpression.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.h b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.h
index 57f4d2ed11..bc41c74d70 100644
--- a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.h
+++ b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.h
@@ -25,14 +25,14 @@ class CFX_WideTextBuf;
class CXFA_FMSimpleExpression {
public:
- CXFA_FMSimpleExpression(uint32_t line, XFA_FM_TOKEN op);
virtual ~CXFA_FMSimpleExpression() {}
-
- virtual bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type);
+ virtual bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) = 0;
XFA_FM_TOKEN GetOperatorToken() const;
protected:
+ CXFA_FMSimpleExpression(uint32_t line, XFA_FM_TOKEN op);
+
uint32_t m_line;
const XFA_FM_TOKEN m_op;
};
@@ -80,28 +80,26 @@ class CXFA_FMIdentifierExpression : public CXFA_FMSimpleExpression {
class CXFA_FMUnaryExpression : public CXFA_FMSimpleExpression {
public:
+ ~CXFA_FMUnaryExpression() override;
+
+ protected:
CXFA_FMUnaryExpression(uint32_t line,
XFA_FM_TOKEN op,
std::unique_ptr<CXFA_FMSimpleExpression> pExp);
- ~CXFA_FMUnaryExpression() override;
-
- bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) override;
- protected:
std::unique_ptr<CXFA_FMSimpleExpression> m_pExp;
};
class CXFA_FMBinExpression : public CXFA_FMSimpleExpression {
public:
+ ~CXFA_FMBinExpression() override;
+
+ protected:
CXFA_FMBinExpression(uint32_t line,
XFA_FM_TOKEN op,
std::unique_ptr<CXFA_FMSimpleExpression> pExp1,
std::unique_ptr<CXFA_FMSimpleExpression> pExp2);
- ~CXFA_FMBinExpression() override;
-
- bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) override;
- protected:
std::unique_ptr<CXFA_FMSimpleExpression> m_pExp1;
std::unique_ptr<CXFA_FMSimpleExpression> m_pExp2;
};