Name

ptr_array: This is a pointer container that uses an underlying boost::array<void*,size> to store the pointers. The class is useful when there is no requirement of dynamic expansion and when no overhead is tolerable.


Synopsis

namespace boost
{      

    template
    < 
        class T, 
        size_t N, 
        CloneAllocator = heap_clone_allocator
    >
    class ptr_array : public implementation-defined
    {
    public: // construct/copy/destroy
        ptr_array();
        ptr_array( std::auto_ptr<ptr_array>& r );

    public: // iterators

    public: // capacity

    public: // element access
        T&        front();
        const T&  front() const;
        T&        back();
        const T&  back() const;
        
        template< size_t idx >
        T&        at();
        template< size_t idx >
        const T&  at() const;
        T&        at( size_t );
        const T&  at( size_t );

        T&        operator[]( size_t );
        const T&  operator[]( size_t ) const;

    public: // modifiers
        void  swap( ptr_array& r );

        template< size_t idx >
        auto_type replace( T* r );
        template< size_t idx, class U >
        auto_type replace( std::auto_ptr<U> r );
        auto_type replace( size_t idx, T* r );
        template< class U >
        auto_type replace( size_t idx, std::auto_ptr<U> r );

    public: // pointer container requirements
        std::auto_ptr<ptr_array>  clone() const;    
        std::auto_ptr<ptr_array>  release();
        template< size_t idx >
        bool                      is_null() const;
        bool                      is_null( size_t idx ) const;
     
    }; //  class 'ptr_sequence_adapter'

} // namespace 'boost'  

Detailed Description

Click here for more details.


Limitation

None


Feedback

For additional information or queries on this page send feedback.


© 2008 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user.

Top

Legal Disclaimer Please note, that by using some of the links in this document you will leave the Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. website and the site you enter is not operated by Nokia. If you choose to access such sites, you should take precautions for security or content. By using the site, you shall review and agree to the site's rules of use before using the site. You agree and acknowledge that Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. has no control over the service and will not assume any liability or responsibility for the availability of the site, nor for any aspects of the service.