Coda Distributed File System
coda-src
venus
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
9
This code is distributed "AS IS" without warranty of any kind under
10
the terms of the GNU General Public Licence Version 2, as shown in the
11
file LICENSE. The technical and financial contributors to Coda are
12
listed 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
27
extern
"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
41
class
binding
{
42
public
:
43
#ifdef VENUSDEBUG
44
static
int
allocs;
45
static
int
deallocs;
46
#endif
47
48
dlink
binder_handle
;
49
void
*
binder
;
50
dlink
bindee_handle
;
51
void
*
bindee
;
52
int
referenceCount
;
53
54
binding
();
55
binding
(
binding
&b) { abort(); }
/* not supported! */
56
int
operator=
(
binding
&) { abort(); }
/* not supported! */
57
~binding
();
58
59
void
IncrRefCount
() {
referenceCount
++; }
60
void
DecrRefCount
()
61
{
62
CODA_ASSERT
(
referenceCount
> 0);
63
referenceCount
--;
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_ */
binding
Definition:
binding.h:41
binding::binder_handle
dlink binder_handle
Definition:
binding.h:48
binding::~binding
~binding()
Definition:
binding.cc:39
binding::bindee_handle
dlink bindee_handle
Definition:
binding.h:50
binding::operator=
int operator=(binding &)
Definition:
binding.h:56
binding::binding
binding()
Definition:
binding.cc:28
binding::binding
binding(binding &b)
Definition:
binding.h:55
binding::print
void print(FILE *fp)
Definition:
binding.h:67
binding::bindee
void * bindee
Definition:
binding.h:51
binding::binder
void * binder
Definition:
binding.h:49
binding::IncrRefCount
void IncrRefCount()
Definition:
binding.h:59
binding::print
void print()
Definition:
binding.h:66
binding::DecrRefCount
void DecrRefCount()
Definition:
binding.h:60
binding::referenceCount
int referenceCount
Definition:
binding.h:52
dlink
Definition:
dlist.h:92
coda_assert.h
CODA_ASSERT
#define CODA_ASSERT(pred)
Definition:
coda_assert.h:22
dlist.h
volusage.stdout
stdout
Definition:
volusage.py:12
Generated by
1.9.4