Coda Distributed File System
binding.h
Go to the documentation of this file.
1/* BLURB gpl
2
3 Coda File System
4 Release 6
5
6 Copyright (c) 1987-2003 Carnegie Mellon University
7 Additional copyrights listed below
8
9This code is distributed "AS IS" without warranty of any kind under
10the terms of the GNU General Public Licence Version 2, as shown in the
11file LICENSE. The technical and financial contributors to Coda are
12listed in the file CREDITS.
13
14 Additional copyrights
15 none currently
16
17#*/
18
19/*
20 * Generic associative data structure.
21 */
22
23#ifndef _BINDING_H_
24#define _BINDING_H_ 1
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include <stdio.h>
31#include <stdlib.h>
32
33#ifdef __cplusplus
34}
35#endif
36
37/* from util */
38#include <dlist.h>
39#include <coda_assert.h>
40
41class binding {
42public:
43#ifdef VENUSDEBUG
44 static int allocs;
45 static int deallocs;
46#endif
47
49 void *binder;
51 void *bindee;
53
54 binding();
55 binding(binding &b) { abort(); } /* not supported! */
56 int operator=(binding &) { abort(); } /* not supported! */
57 ~binding();
58
61 {
64 }
65
66 void print() { print(stdout); }
67 void print(FILE *fp)
68 {
69 fflush(fp);
70 print(fileno(fp));
71 }
72 void print(int);
73};
74
75#endif /* _BINDING_H_ */
Definition: binding.h:41
dlink binder_handle
Definition: binding.h:48
~binding()
Definition: binding.cc:39
dlink bindee_handle
Definition: binding.h:50
int operator=(binding &)
Definition: binding.h:56
binding()
Definition: binding.cc:28
binding(binding &b)
Definition: binding.h:55
void print(FILE *fp)
Definition: binding.h:67
void * bindee
Definition: binding.h:51
void * binder
Definition: binding.h:49
void IncrRefCount()
Definition: binding.h:59
void print()
Definition: binding.h:66
void DecrRefCount()
Definition: binding.h:60
int referenceCount
Definition: binding.h:52
#define CODA_ASSERT(pred)
Definition: coda_assert.h:22
stdout
Definition: volusage.py:12