Botan
3.6.1
Crypto and TLS for C&
src
lib
filters
basefilt.cpp
Go to the documentation of this file.
1
/*
2
* (C) 1999-2007 Jack Lloyd
3
*
4
* Botan is released under the Simplified BSD License (see license.txt)
5
*/
6
7
#include <botan/filters.h>
8
9
namespace
Botan
{
10
11
/*
12
* Chain Constructor
13
*/
14
Chain::Chain
(
Filter
* f1,
Filter
* f2,
Filter
* f3,
Filter
* f4) {
15
if
(f1) {
16
attach
(f1);
17
incr_owns
();
18
}
19
if
(f2) {
20
attach
(f2);
21
incr_owns
();
22
}
23
if
(f3) {
24
attach
(f3);
25
incr_owns
();
26
}
27
if
(f4) {
28
attach
(f4);
29
incr_owns
();
30
}
31
}
32
33
/*
34
* Chain Constructor
35
*/
36
Chain::Chain
(
Filter
* filters[],
size_t
count) {
37
for
(
size_t
j = 0; j != count; ++j) {
38
if
(filters[j]) {
39
attach
(filters[j]);
40
incr_owns
();
41
}
42
}
43
}
44
45
/*
46
* Fork Constructor
47
*/
48
Fork::Fork
(
Filter
* f1,
Filter
* f2,
Filter
* f3,
Filter
* f4) {
49
Filter
* filters[4] = {f1, f2, f3, f4};
50
set_next
(filters, 4);
51
}
52
53
/*
54
* Fork Constructor
55
*/
56
Fork::Fork
(
Filter
* filters[],
size_t
count) {
57
set_next
(filters, count);
58
}
59
60
}
// namespace Botan
Botan::Chain::Chain
Chain(Filter *=nullptr, Filter *=nullptr, Filter *=nullptr, Filter *=nullptr)
Definition
basefilt.cpp:14
Botan::Fanout_Filter::incr_owns
void incr_owns()
Definition
filter.h:150
Botan::Fanout_Filter::set_next
void set_next(Filter *f[], size_t n)
Definition
filter.h:154
Botan::Fanout_Filter::attach
void attach(Filter *f)
Definition
filter.h:156
Botan::Filter
Definition
filter.h:21
Botan::Fork::Fork
Fork(Filter *, Filter *, Filter *=nullptr, Filter *=nullptr)
Definition
basefilt.cpp:48
Botan
Definition
alg_id.cpp:13
Generated by
1.12.0