Aspose::Words::RevisionGroupCollection class

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

MethodDescription
begin()
begin() const
cbegin() const
cend() const
end()
end() const
get_Count()Returns the number of revision groups in the collection.
GetEnumerator() overrideReturns an enumerator object.
GetType() const override
idx_get(int32_t)Returns a revision group at the specified index.
Is(const System::TypeInfo&) const override
static Type()
virtualizeBeginConstIterator() const override
virtualizeBeginIterator() override
virtualizeEndConstIterator() const override
virtualizeEndIterator() override

Typedefs

TypedefDescription
const_iterator
iterator
iterator_holder_type
virtualized_iterator
virtualized_iterator_element

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 = MakeObject<Document>(MyDir + u"Revisions.docx");

ASSERT_EQ(7, doc->get_Revisions()->get_Groups()->get_Count());

for (const auto& group : doc->get_Revisions()->get_Groups())
{
    std::cout << 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 = MakeObject<Document>(MyDir + u"Revisions.docx");

SharedPtr<RevisionGroup> revisionGroup = doc->get_Revisions()->get_Groups()->idx_get(0);

See Also