7#include "xfa/fxfa/parser/cxfa_arraynodelist.h"
12#include "fxjs/gc/container_trace.h"
13#include "xfa/fxfa/parser/cxfa_node.h"
15CXFA_ArrayNodeList::CXFA_ArrayNodeList(CXFA_Document* pDocument)
20void CXFA_ArrayNodeList::
Trace(
cppgc::Visitor* visitor)
const {
22 ContainerTrace(visitor, m_array);
26 const std::vector<CXFA_Node*>& srcArray) {
27 if (!srcArray.empty()) {
29 std::vector<cppgc::Member<CXFA_Node>>(srcArray.begin(), srcArray.end());
34 return m_array.size();
38 m_array.push_back(pNode);
44 m_array.push_back(pNewNode);
48 auto it = std::find(m_array.begin(), m_array.end(), pBeforeNode);
49 if (it == m_array.end())
52 m_array.insert(it, pNewNode);
57 auto it = std::find(m_array.begin(), m_array.end(), pNode);
58 if (it != m_array.end())
63 return index < m_array.size() ? m_array[index] :
nullptr;
size_t GetLength() override
CXFA_Node * Item(size_t iIndex) override
~CXFA_ArrayNodeList() override
bool Append(CXFA_Node *pNode) override
void SetArrayNodeList(const std::vector< CXFA_Node * > &srcArray)
void Remove(CXFA_Node *pNode) override
void Trace(cppgc::Visitor *visitor) const override
bool Insert(CXFA_Node *pNewNode, CXFA_Node *pBeforeNode) override
virtual void Trace(cppgc::Visitor *visitor) const
CXFA_TreeList(CXFA_Document *pDocument)