core
vil
vil_stream.cxx
Go to the documentation of this file.
1
// This is core/vil/vil_stream.cxx
2
3
#include "
vil_stream.h
"
4
5
#include <cassert>
6
#ifdef _MSC_VER
7
# include <vcl_msvc_warnings.h>
8
#endif
9
10
#define log_xtor 0
11
#if log_xtor
12
# include <std::iostream.h>
13
#endif
14
15
vil_stream::vil_stream
()
16
: refcount_(0)
17
{
18
#if log_xtor
19
std::cerr << __FILE__
", vil_stream ctor : this = "
<< (
void
*)
this
<< std::endl;
20
#endif
21
}
22
23
vil_stream::~vil_stream
()
24
{
25
#if log_xtor
26
std::cerr << __FILE__
", vil_stream dtor : this = "
<< (
void
*)
this
<< std::endl;
27
#endif
28
}
29
30
31
void
vil_stream::unref
()
32
{
33
assert(
refcount_
>= 0);
// negative refcount is very serious
34
if
(--
refcount_
== 0)
35
delete
this
;
36
}
vil_stream.h
Stream interface for VIL image loaders.
vil_stream::refcount_
vcl_atomic_count refcount_
Definition:
vil_stream.h:54
vil_stream::vil_stream
vil_stream()
Definition:
vil_stream.cxx:15
vil_stream::~vil_stream
virtual ~vil_stream()
Definition:
vil_stream.cxx:23
vil_stream::unref
void unref()
Definition:
vil_stream.cxx:31
Generated by
1.8.15