Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core][Documentation] Even more documentation for pointer_vector_set.h #11664

Merged
merged 5 commits into from
Oct 24, 2023

Conversation

loumalouomega
Copy link
Member

📝 Description

This PR focuses on making enhancements to the PointerVectorSet documentation.-Added detailed documentation comments for various functions and methods throughout the PointerVectorSet class, including begin(), cbegin(), cend(), rbegin(), rend(), ptr_end(), ptr_rbegin(), back(), max_size(), IsSorted(), and several others. The comments provide descriptions and usage information for each function.

BTW: It would be interesting to define the iterators with adapators classes as it is done in the Parameters class to extend the capabilities of the adaptors, I have tried with:

    // Iterator adapter classes
    class iterator_adaptor 
        : public boost::indirect_iterator<typename TContainerType::iterator>
    {
    public:
        using BaseIterator = typename TContainerType::iterator;
        using BaseType = boost::indirect_iterator<BaseIterator>;

        iterator_adaptor(BaseIterator base)
            : BaseType(base) {}
        // You can add more methods or override existing methods if needed
    };

    class const_iterator_adaptor 
        : public boost::indirect_iterator<typename TContainerType::const_iterator>
    {
    public:
        using BaseIterator = typename TContainerType::const_iterator;
        using BaseType = boost::indirect_iterator<BaseIterator>;

        const_iterator_adaptor(BaseIterator base)
            : BaseType(base) {}
        // You can add more methods or override existing methods if needed
    };

    class reverse_iterator_adaptor 
        : public boost::indirect_iterator<typename TContainerType::reverse_iterator>
    {
    public:
        using BaseIterator = typename TContainerType::reverse_iterator;
        using BaseType = boost::indirect_iterator<BaseIterator>;

        reverse_iterator_adaptor(BaseIterator base)
            : BaseType(base) {}
        // You can add more methods or override existing methods if needed
    };

    class const_reverse_iterator_adaptor 
        : public boost::indirect_iterator<typename TContainerType::const_reverse_iterator>
    {
    public:
        using BaseIterator = typename TContainerType::const_reverse_iterator;
        using BaseType = boost::indirect_iterator<BaseIterator>;

        const_reverse_iterator_adaptor(BaseIterator base)
            : BaseType(base) {}
        // You can add more methods or override existing methods if needed
    };

    /// Define the iterators
    using iterator = iterator_adaptor;
    using const_iterator = const_iterator_adaptor;
    using reverse_iterator = reverse_iterator_adaptor;
    using const_reverse_iterator = const_reverse_iterator_adaptor;

But it fails compilation, probably because some missing definitions.

🆕 Changelog

@loumalouomega loumalouomega added Cleanup Kratos Core Documentation FastPR This Pr is simple and / or has been already tested and the revision should be fast labels Oct 5, 2023
@loumalouomega loumalouomega requested a review from a team as a code owner October 5, 2023 14:17
kratos/containers/pointer_vector_set.h Outdated Show resolved Hide resolved
kratos/containers/pointer_vector_set.h Outdated Show resolved Hide resolved
kratos/containers/pointer_vector_set.h Outdated Show resolved Hide resolved
loumalouomega and others added 3 commits October 9, 2023 08:48
@loumalouomega loumalouomega merged commit 7698a7a into master Oct 24, 2023
@loumalouomega loumalouomega deleted the core/more-doc-to-pointer-vector-set branch October 24, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup Documentation FastPR This Pr is simple and / or has been already tested and the revision should be fast Kratos Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants