]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/comp/bitio.h
prohibiting copy constructor and assignment operator of helper class
[u/mrichter/AliRoot.git] / HLT / comp / bitio.h
1 /* @(#) $Id$ */
2
3 /************************** Start of BITIO.H *************************/
4
5 #ifndef _BITIO_H
6 #define _BITIO_H
7
8 #include <stdio.h>
9
10 typedef struct bit_file {
11     FILE *file;
12     unsigned char mask;
13     int rack;
14     int pacifier_counter;
15 } BIT_FILE;
16
17
18 /*The following we do because this file is read both by
19   C and C++ compiler.*/
20 #ifdef __cplusplus
21 extern "C" BIT_FILE     *OpenInputBitFile( char *name );
22 extern "C" BIT_FILE     *OpenOutputBitFile( char *name );
23 extern "C" void          OutputBit( BIT_FILE *bit_file, int bit );
24 extern "C" void          OutputBits( BIT_FILE *bit_file,
25                                      unsigned long code, int count );
26 extern "C" int           InputBit( BIT_FILE *bit_file );
27 extern "C" unsigned long InputBits( BIT_FILE *bit_file, int bit_count );
28 extern "C" void          CloseInputBitFile( BIT_FILE *bit_file );
29 extern "C" void          CloseOutputBitFile( BIT_FILE *bit_file );
30 extern "C" void          FilePrintBinary( FILE *file, unsigned int code, int bits );
31 #else
32 BIT_FILE     *OpenInputBitFile( char *name );
33 BIT_FILE     *OpenOutputBitFile( char *name );
34 void          OutputBit( BIT_FILE *bit_file, int bit );
35 void          OutputBits( BIT_FILE *bit_file,
36                           unsigned long code, int count );
37 int           InputBit( BIT_FILE *bit_file );
38 unsigned long InputBits( BIT_FILE *bit_file, int bit_count );
39 void          CloseInputBitFile( BIT_FILE *bit_file );
40 void          CloseOutputBitFile( BIT_FILE *bit_file );
41 void          FilePrintBinary( FILE *file, unsigned int code, int bits );
42 #endif
43
44 /*
45 #else   
46
47 BIT_FILE     *OpenInputBitFile();
48 BIT_FILE     *OpenOutputBitFile();
49 void          OutputBit();
50 void          OutputBits();
51 int           InputBit();
52 unsigned long InputBits();
53 void          CloseInputBitFile();
54 void          CloseOutputBitFile();
55 void          FilePrintBinary();
56
57 #endif  
58 */
59 #endif  /* _BITIO_H */
60
61 /*************************** End of BITIO.H **************************/
62
63