1 /* $Id: yaz-bw.cpp,v 1.4 2004-04-22 07:46:21 adam Exp $
2 Copyright (c) 1998-2004, Index Data.
4 This file is part of the yaz-proxy.
6 YAZ proxy is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
11 YAZ proxy is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with YAZ proxy; see the file LICENSE. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
24 #include <yazproxy/bw.h>
26 Yaz_bw::Yaz_bw(int sz)
30 m_bucket = new int[m_size];
39 int Yaz_bw::get_total()
44 for (i = 0; i<m_size; i++)
49 void Yaz_bw::add_bytes(int b)
58 if (++m_ptr == m_size)