Introduction
Synopsis
Members
Example
Frequently Asked Questions
This class allows to treat XLOPER structure as a read-only one-dimensional array, or vector. The type of vector elements is specified via template argument. The class is implemented in terms of xll::Matrix class. It is possible to specify boost::any as an element type.
namespace xll { // Vector: Specialization of Matrix for one dimension template <typename T> class Vector : private Matrix <T> { typedef Matrix <T> _Super; public: // Standard types typedef typename _Super::value_type value_type; typedef typename _Super::const_iterator const_iterator; typedef typename _Super::const_reverse_iterator const_reverse_iterator; // Iterator pair typedef std::pair <const_iterator, const_iterator> const_iterator_pair; // number of elements size_t size() const { return _Super::size1d(); } // unchecked access to n-th element value_type operator[] (size_t n) const; // checked access to n-th element value_type at (size_t n) const; // implementation of standard iterator methods const_iterator begin() const { return _Super::begin(); } const_iterator end() const { return _Super::end(); } // reverse... const_reverse_iterator rbegin() const { return _Super::rbegin(); } const_reverse_iterator rend() const { return _Super::rend(); } // smart pointer to Vector - a natural friend friend class details::ExcelObjPtr < const Vector<T>, const XLOPER, boost::intrusive_ptr >; }; }
typedef typename _Super::value_type value_type;
Inherits this from the base class.
typedef typename _Super::const_iterator const_iterator;
Inherits this from the base class.
typedef typename _Super::const_reverse_iterator const_reverse_iterator;
Inherits this from the base class.
size_t size() const;
Returns: the number of elements.
Throws: nothing
$Date: 2007/04/26 16:39:34 $
Copyright 2007 ---