Botan 2.19.2
Crypto and TLS for C&
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
9namespace Botan {
10
11/*
12* Chain Constructor
13*/
15 {
16 if(f1) { attach(f1); incr_owns(); }
17 if(f2) { attach(f2); incr_owns(); }
18 if(f3) { attach(f3); incr_owns(); }
19 if(f4) { attach(f4); incr_owns(); }
20 }
21
22/*
23* Chain Constructor
24*/
25Chain::Chain(Filter* filters[], size_t count)
26 {
27 for(size_t j = 0; j != count; ++j)
28 if(filters[j])
29 {
30 attach(filters[j]);
31 incr_owns();
32 }
33 }
34
35/*
36* Fork Constructor
37*/
39 {
40 Filter* filters[4] = { f1, f2, f3, f4 };
41 set_next(filters, 4);
42 }
43
44/*
45* Fork Constructor
46*/
47Fork::Fork(Filter* filters[], size_t count)
48 {
49 set_next(filters, count);
50 }
51
52}
Chain(Filter *=nullptr, Filter *=nullptr, Filter *=nullptr, Filter *=nullptr)
Definition: basefilt.cpp:14
void set_next(Filter *f[], size_t n)
Definition: filter.h:154
void attach(Filter *f)
Definition: filter.h:156
Fork(Filter *, Filter *, Filter *=nullptr, Filter *=nullptr)
Definition: basefilt.cpp:38
Definition: alg_id.cpp:13