NodeList.h
1 // Copyright 2001-2020 Aspose Pty Ltd. All Rights Reserved.
3 //
4 // This file is part of Aspose.Words. The source code in this file
5 // is only intended as a supplement to the documentation, and is provided
6 // "as is", without warranty of any kind, either expressed or implied.
9 #pragma once
10 
11 #include <system/shared_ptr.h>
12 #include <system/collections/ienumerator.h>
13 #include <system/collections/ienumerable.h>
14 
15 #include "Aspose.Words.Cpp/Model/Nodes/Node.h"
16 
17 namespace Aspose { namespace Words { class NodeCollection; } }
18 
19 namespace Aspose {
20 namespace Words {
21 
35 class NodeList : public System::Collections::Generic::IEnumerable<System::SharedPtr<Aspose::Words::Node>>
36 {
37  typedef NodeList ThisType;
39 
40  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
41  ASPOSE_WORDS_SHARED_RTTI_INFO_DECL();
42 
43 public:
47  ASPOSE_WORDS_SHARED_API int32_t get_Count() const;
48 
49  ASPOSE_WORDS_SHARED_API NodeList(const System::SharedPtr<Aspose::Words::NodeCollection>& nodes);
66  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Node> idx_get(int32_t index) const;
67 protected:
68 
69  ASPOSE_WORDS_SHARED_API System::Object::shared_members_type GetSharedMembers() override;
70 
71 private:
72 
74 };
75 
76 }
77 }
System::Details::SharedMembersType shared_members_type
Represents a collection of nodes matching an XPath query executed using the SelectNodes method.
Definition: NodeList.h:36
NodeList(const System::SharedPtr< Aspose::Words::NodeCollection > &nodes)
System::SharedPtr< System::Collections::Generic::IEnumerator< System::SharedPtr< Aspose::Words::Node > > > GetEnumerator() override
Provides a simple "foreach" style iteration over the collection of nodes.
int32_t get_Count() const
Gets the number of nodes in the list.
@ Words
System::SharedPtr< Aspose::Words::Node > idx_get(int32_t index) const
Retrieves a node at the given index.