Botan 2.19.5 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
9 namespace Botan {
10
11/*
12* Chain Constructor
13*/
14 Chain::Chain(Filter* f1, Filter* f2, Filter* f3, Filter* f4)
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*/
25 Chain::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*/
38 Fork::Fork(Filter* f1, Filter* f2, Filter* f3, Filter* f4)
39 {
40 Filter* filters[4] = { f1, f2, f3, f4 };
41 set_next(filters, 4);
42 }
43
44/*
45* Fork Constructor
46*/
47 Fork::Fork(Filter* filters[], size_t count)
48 {
49 set_next(filters, count);
50 }
51
52}
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:22
Botan::Fork::Fork
Fork(Filter *, Filter *, Filter *=nullptr, Filter *=nullptr)
Definition: basefilt.cpp:38
Botan
Definition: alg_id.cpp:13