Aspose::Words::RevisionGroupCollection class
Contents
[
Hide
]RevisionGroupCollection class
A collection of RevisionGroup objects that represent revision groups in the document. To learn more, visit the Track Changes in a Document documentation article.
class RevisionGroupCollection : public System::Collections::Generic::IEnumerable<System::SharedPtr<Aspose::Words::RevisionGroup>>
Methods
| Method | Description |
|---|---|
| GetEnumerator() override | Returns an enumerator object. |
| get_Count() | Returns the number of revision groups in the collection. |
| idx_get(int32_t) | Returns a revision group at the specified index. |
Typedefs
| Typedef | Description |
|---|---|
| const_iterator | Const iterator type. |
| iterator | Iterator type. |
| iterator_holder_type | A collection type whose iterator types is used as iterator types in the current collection. |
| virtualized_iterator | Virtualized type. |
| virtualized_iterator_element | Virtualized element type. |
Remarks
You do not create instances of this class directly. Use the Groups property to get revision groups present in a document.
Examples
Shows how to print info about a group of revisions in a document.
auto doc = System::MakeObject<Aspose::Words::Document>(System::String(get_MyDir() + u"Revisions.docx"));
ASSERT_EQ(doc->get_Revisions()->get_Groups()->get_Count(), 7);
for (auto&& group : doc->get_Revisions()->get_Groups())
{
std::cout << System::String::Format(u"Revision author: {0}; Revision type: {1} \n\tRevision text: {2}", group->get_Author(), group->get_RevisionType(), group->get_Text()) << std::endl;
}
Shows how to get a group of revisions in a document.
auto doc = System::MakeObject<Aspose::Words::Document>(System::String(get_MyDir() + u"Revisions.docx"));
System::SharedPtr<Aspose::Words::RevisionGroup> revisionGroup = doc->get_Revisions()->get_Groups()->idx_get(0);
See Also
- Namespace Aspose::Words
- Library Aspose.Words for C++