/* * CDE - Common Desktop Environment * * Copyright (c) 1993-2012, The Open Group. All rights reserved. * * These libraries and programs are free software; you can * redistribute them and/or modify them under the terms of the GNU * Lesser General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) * any later version. * * These libraries and programs are distributed in the hope that * they will be useful, but WITHOUT ANY WARRANTY; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public * License along with these libraries and programs; if not, write * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301 USA */ // $XConsortium: cc_vvect.C /main/4 1996/08/21 15:49:18 drk $ #include "dti_cc/cc_exceptions.h" template value_vector::value_vector(const value_vector& vv) : f_array(new T[vv.f_size]), f_size(vv.f_size) { for (int i=0; i value_vector::value_vector(size_t n) : f_array(new T[n]), f_size(n) { } template value_vector::value_vector(size_t n, const T& t) : f_array(new T[n]), f_size(n) { for (int i=0; i value_vector::~value_vector() { delete f_array; } template void value_vector::_grow(size_t t) { } template T value_vector::operator[](size_t i) const { if ( (long)i < 0 || i >= f_size ) throw(ccBoundaryException(0, f_size-1, i)); else return f_array[i]; } template T& value_vector::operator[](size_t i) { if ( (long)i < 0 || i >= f_size ) throw(ccBoundaryException(0, f_size-1, i)); else return f_array[i]; }