]> git.decadent.org.uk Git - dak.git/blob - tools/dsync-0.0/libdsync/contrib/bitmap.cc
Add docs that the secret key only needs to be able to sign
[dak.git] / tools / dsync-0.0 / libdsync / contrib / bitmap.cc
1 // -*- mode: cpp; mode: fold -*-
2 // Description                                                          /*{{{*/
3 // $Id: bitmap.cc,v 1.1 1999/11/05 05:47:06 jgg Exp $
4 /* ######################################################################
5    
6    Bitmap - A trivial class to implement an 1 bit per element boolean
7             vector
8    
9    This is deliberately extremely light weight so that it is fast for 
10    the client.
11    
12    ##################################################################### */
13                                                                         /*}}}*/
14 // Include files                                                        /*{{{*/
15 #ifdef __GNUG__
16 #pragma implementation "dsync/bitmap.h"
17 #endif
18
19 #include <dsync/bitmap.h>
20
21 #include <string.h>
22                                                                         /*}}}*/
23
24 // BitmapVector::BitmapVector - Constructor                             /*{{{*/
25 // ---------------------------------------------------------------------
26 /* Allocate just enough bytes and 0 it */
27 BitmapVector::BitmapVector(unsigned long Size) : Size(Size)
28 {
29    Vect = new unsigned long[Bytes()];
30    memset(Vect,0,Bytes());
31 }
32                                                                         /*}}}*/
33 // BitmapVector::~BitmapVector - Destructor                             /*{{{*/
34 // ---------------------------------------------------------------------
35 /* */
36 BitmapVector::~BitmapVector()
37 {
38    delete [] Vect;
39 }
40                                                                         /*}}}*/