1 // Copyright 2018 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef XFA_FXFA_PARSER_CXFA_NODEOWNER_H_ 8 #define XFA_FXFA_PARSER_CXFA_NODEOWNER_H_ 9 10 #include <memory> 11 #include <vector> 12 13 class CXFA_Node; 14 15 class CXFA_NodeOwner { 16 public: 17 virtual ~CXFA_NodeOwner(); 18 19 CXFA_Node* AddOwnedNode(std::unique_ptr<CXFA_Node> node); IsBeingDestroyed()20 bool IsBeingDestroyed() const { return is_being_destroyed_; } 21 22 protected: 23 CXFA_NodeOwner(); 24 25 bool is_being_destroyed_ = false; 26 std::vector<std::unique_ptr<CXFA_Node>> nodes_; 27 }; 28 29 #endif // XFA_FXFA_PARSER_CXFA_NODEOWNER_H_ 30