equal
deleted
inserted
replaced
14 * You should have received a copy of the GNU General Public License |
14 * You should have received a copy of the GNU General Public License |
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 */ |
16 */ |
17 #pragma once |
17 #pragma once |
18 |
18 |
|
19 #include "ASN1ContentHandler.h" |
|
20 #include "SAXContentHandler.h" |
|
21 |
19 namespace relpipe { |
22 namespace relpipe { |
20 namespace in { |
23 namespace in { |
21 namespace asn1 { |
24 namespace asn1 { |
22 namespace lib { |
25 namespace lib { |
23 |
26 |
|
27 /** |
|
28 * Converts ASN.1 events to XML SAX events. |
|
29 * |
|
30 * Does not need to know anything about the model/schema – works with generic events (nodes). |
|
31 */ |
24 class GenericASN1ContentHandler : public ASN1ContentHandler { |
32 class GenericASN1ContentHandler : public ASN1ContentHandler { |
|
33 private: |
|
34 SAXContentHandlerProxy handlers; |
|
35 public: |
|
36 |
|
37 void addHandler(std::shared_ptr<SAXContentHandler> handler) { |
|
38 handlers.addHandler(handler); |
|
39 } |
|
40 |
|
41 virtual ~GenericASN1ContentHandler() { |
|
42 } |
|
43 |
|
44 void abc() override { |
|
45 }; |
|
46 |
|
47 void def(int a) override { |
|
48 }; |
|
49 |
|
50 void ghi(int a, int b) override { |
|
51 }; |
|
52 |
25 }; |
53 }; |
26 |
54 |
27 } |
55 } |
28 } |
56 } |
29 } |
57 } |