Merge to XFA: Remove FX_BSTR and FX_WSTR typedefs.
[pdfium.git] / xfa / src / fxfa / src / parser / xfa_script_resolveprocessor.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4 \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _XFA_RESOLVEPROCESSOR_H_\r
8 #define _XFA_RESOLVEPROCESSOR_H_\r
9 class CXFA_NodeHelper;\r
10 class CXFA_ScriptContext;\r
11 class CXFA_ResolveNodesData\r
12 {\r
13 public:\r
14     CXFA_ResolveNodesData(CXFA_ScriptContext *pSC = NULL)\r
15         : m_pSC(pSC)\r
16         , m_CurNode(NULL)\r
17         , m_wsName()\r
18         , m_uHashName(0)\r
19         , m_wsCondition()\r
20         , m_nLevel(0)\r
21         , m_Nodes()\r
22         , m_dwStyles(XFA_RESOLVENODE_Children)\r
23         , m_pScriptAttribute(NULL)\r
24         , m_dwFlag(XFA_RESOVENODE_RSTYPE_Nodes)\r
25     {\r
26     }\r
27     ~CXFA_ResolveNodesData()\r
28     {\r
29         m_Nodes.RemoveAll();\r
30     }\r
31     CXFA_ScriptContext*                 m_pSC;\r
32     CXFA_Object*                                m_CurNode;\r
33     CFX_WideString                              m_wsName;\r
34     uint32_t                                    m_uHashName;\r
35     CFX_WideString                              m_wsCondition;\r
36     int32_t                                     m_nLevel;\r
37     CXFA_ObjArray                               m_Nodes;\r
38     FX_DWORD                                    m_dwStyles;\r
39     XFA_LPCSCRIPTATTRIBUTEINFO  m_pScriptAttribute;\r
40     XFA_RESOVENODE_RSTYPE               m_dwFlag;\r
41 };\r
42 class CXFA_ResolveProcessor\r
43 {\r
44 public:\r
45     CXFA_ResolveProcessor(void);\r
46     ~CXFA_ResolveProcessor(void);\r
47     int32_t     XFA_ResolveNodes(CXFA_ResolveNodesData &rnd);\r
48     int32_t     XFA_ResolveNodes_AnyChild(CXFA_ResolveNodesData &rnd);\r
49     int32_t     XFA_ResolveNodes_Dollar(CXFA_ResolveNodesData &rnd);\r
50     int32_t     XFA_ResolveNodes_Excalmatory(CXFA_ResolveNodesData &rnd);\r
51     int32_t     XFA_ResolveNodes_NumberSign(CXFA_ResolveNodesData &rnd);\r
52     int32_t     XFA_ResolveNodes_Asterisk(CXFA_ResolveNodesData &rnd);\r
53     int32_t     XFA_ResolveNodes_Normal(CXFA_ResolveNodesData &rnd);\r
54     int32_t     XFA_ResolveNodes_ForAttributeRs(CXFA_Object* curNode, CXFA_ResolveNodesData &rnd, const CFX_WideStringC& strAttr);\r
55     void                XFA_ResolveNode_ConditionArray(int32_t iCurIndex, CFX_WideString wsCondition, int32_t iFoundCount, CXFA_ResolveNodesData &rnd);\r
56     void                XFA_ResolveNode_DoPredicateFilter(int32_t iCurIndex, CFX_WideString wsCondition, int32_t iFoundCount, CXFA_ResolveNodesData &rnd);\r
57     int32_t     XFA_ResolveNodes_GetFilter(const CFX_WideStringC& wsExpression, int32_t nStart, CXFA_ResolveNodesData &rnd);\r
58     void                XFA_ResolveNode_FilterCondition(CXFA_ResolveNodesData &rnd, CFX_WideString wsCondition);\r
59     int32_t     XFA_ResolveNodes_PopStack(CFX_Int32Array &stack);\r
60     void                XFA_ResolveNodes_SetStylesForChild(FX_DWORD dwParentStyles, CXFA_ResolveNodesData &rnd);\r
61     int32_t     XFA_ResolveNode_SetResultCreateNode(XFA_RESOLVENODE_RS& resolveNodeRS, CFX_WideString &wsLastCondition);\r
62     void            XFA_ResolveNode_SetIndexDataBind(CFX_WideString &wsNextCondition, int32_t &iIndex, int32_t iCount);\r
63     CXFA_NodeHelper* GetNodeHelper()\r
64     {\r
65         return m_pNodeHelper;\r
66     }\r
67 private:\r
68     CXFA_NodeHelper* m_pNodeHelper;\r
69 public:\r
70     int32_t              m_iCurStart;\r
71 };\r
72 #endif\r