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_PARSER_XFA_OBJECT_H_ | 7 #ifndef XFA_FXFA_PARSER_XFA_OBJECT_H_ |
8 #define XFA_FXFA_PARSER_XFA_OBJECT_H_ | 8 #define XFA_FXFA_PARSER_XFA_OBJECT_H_ |
9 | 9 |
10 #include "xfa/fde/xml/fde_xml.h" | 10 #include "xfa/fde/xml/fde_xml.h" |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 return IsOrdinaryObject() ? static_cast<const CXFA_OrdinaryObject*>(this) | 776 return IsOrdinaryObject() ? static_cast<const CXFA_OrdinaryObject*>(this) |
777 : nullptr; | 777 : nullptr; |
778 } | 778 } |
779 inline const CXFA_NodeList* CXFA_Object::AsNodeList() const { | 779 inline const CXFA_NodeList* CXFA_Object::AsNodeList() const { |
780 return IsNodeList() ? static_cast<const CXFA_NodeList*>(this) : nullptr; | 780 return IsNodeList() ? static_cast<const CXFA_NodeList*>(this) : nullptr; |
781 } | 781 } |
782 | 782 |
783 inline CXFA_Node* ToNode(CXFA_Object* pObj) { | 783 inline CXFA_Node* ToNode(CXFA_Object* pObj) { |
784 return pObj ? pObj->AsNode() : nullptr; | 784 return pObj ? pObj->AsNode() : nullptr; |
785 } | 785 } |
786 inline CXFA_OrdinaryObject* ToOrdinaryObject(CXFA_Object* pObj) { | |
787 return pObj ? pObj->AsOrdinaryObject() : nullptr; | |
788 } | |
789 inline CXFA_NodeList* ToNodeList(CXFA_Object* pObj) { | |
790 return pObj ? pObj->AsNodeList() : nullptr; | |
791 } | |
792 | 786 |
793 inline const CXFA_Node* ToNode(const CXFA_Object* pObj) { | 787 inline const CXFA_Node* ToNode(const CXFA_Object* pObj) { |
794 return pObj ? pObj->AsNode() : nullptr; | 788 return pObj ? pObj->AsNode() : nullptr; |
795 } | 789 } |
796 inline const CXFA_OrdinaryObject* ToOrdinaryObject(const CXFA_Object* pObj) { | |
797 return pObj ? pObj->AsOrdinaryObject() : nullptr; | |
798 } | |
799 inline const CXFA_NodeList* ToNodeList(const CXFA_Object* pObj) { | |
800 return pObj ? pObj->AsNodeList() : nullptr; | |
801 } | |
802 | 790 |
803 #endif // XFA_FXFA_PARSER_XFA_OBJECT_H_ | 791 #endif // XFA_FXFA_PARSER_XFA_OBJECT_H_ |
OLD | NEW |