Provides typed access to a collection of Cell nodes.
Shows how to iterate through all tables in the document and print the contents of each cell.
#include <Aspose.Words.Cpp/Tables/CellCollection.h>
Public Member Functions | |
virtual const TypeInfo & | GetType () const override |
SharedPtr< Cell > | idx_get (int32_t index) |
Retrieves a Cell at the given index. More... | |
virtual bool | Is (const TypeInfo &target) const override |
ArrayPtr< SharedPtr< Cell > > | ToArray () |
Copies all cells from the collection to a new array of cells. More... | |
![]() | |
void | Add (const SharedPtr< Node > &node) |
Adds a node to the end of the collection. More... | |
void | Clear () |
Removes all nodes from this collection and from the document. More... | |
bool | Contains (const SharedPtr< Node > &node) |
Determines whether a node is in the collection. More... | |
int32_t | get_Count () |
Gets the number of nodes in the collection. More... | |
SharedPtr< IEnumerator< SharedPtr< Node > > > | GetEnumerator () override |
Provides a simple "foreach" style iteration over the collection of nodes. More... | |
SharedPtr< Node > | idx_get (int32_t index) |
Retrieves a node at the given index. More... | |
int32_t | IndexOf (const SharedPtr< Node > &node) |
Returns the zero-based index of the specified node. More... | |
void | Insert (int32_t index, const SharedPtr< Node > &node) |
Inserts a node into the collection at the specified index. More... | |
void | Remove (const SharedPtr< Node > &node) |
Removes the node from the collection and from the document. More... | |
void | RemoveAt (int32_t index) |
Removes the node at the specified index from the collection and from the document. More... | |
ArrayPtr< SharedPtr< Node > > | ToArray () |
Copies all nodes from the collection to a new array of nodes. More... | |
Static Public Member Functions | |
static const TypeInfo & | Type () |
![]() | |
static const TypeInfo & | Type () |
|
overridevirtual |
Reimplemented from Aspose::Words::NodeCollection.
System::SharedPtr<Aspose::Words::Tables::Cell> Aspose::Words::Tables::CellCollection::idx_get | ( | int32_t | index | ) |
Retrieves a Cell at the given index.
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
index | An index into the collection. |
Shows how to iterate through all tables in the document and print the contents of each cell.
|
overridevirtual |
Reimplemented from Aspose::Words::NodeCollection.
System::ArrayPtr<System::SharedPtr<Aspose::Words::Tables::Cell> > Aspose::Words::Tables::CellCollection::ToArray | ( | ) |
Copies all cells from the collection to a new array of cells.
Shows how to iterate through all tables in the document and print the contents of each cell.
|
static |