Commit | Line | Data |
---|---|---|
d44e3c4f | 1 | /****************************************************************************** |
2 | * Copyright (c) 2000-2016 Ericsson Telecom AB | |
3 | * All rights reserved. This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License v1.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * http://www.eclipse.org/legal/epl-v10.html | |
7 | * | |
8 | * Contributors: | |
9 | * Balasko, Jeno | |
10 | * Delic, Adam | |
11 | * Forstner, Matyas | |
12 | * Raduly, Csaba | |
13 | * | |
14 | ******************************************************************************/ | |
970ed795 EL |
15 | #ifndef ASN_ANY_HH |
16 | #define ASN_ANY_HH | |
17 | ||
18 | #include "Octetstring.hh" | |
19 | ||
20 | class ASN_ANY : public OCTETSTRING | |
21 | { | |
22 | public: | |
23 | ASN_ANY() : OCTETSTRING() {} | |
24 | ASN_ANY(int n_octets, const unsigned char* octets_ptr) | |
25 | : OCTETSTRING(n_octets, octets_ptr) {} | |
26 | ASN_ANY(const OCTETSTRING_ELEMENT& other_value) | |
27 | : OCTETSTRING(other_value) {} | |
28 | ASN_ANY(const OCTETSTRING& other_value) | |
29 | : OCTETSTRING(other_value) {} | |
30 | ASN_ANY(const ASN_ANY& other_value) | |
31 | : OCTETSTRING(other_value) {} | |
32 | ||
33 | #ifdef TITAN_RUNTIME_2 | |
34 | void set_value(const Base_Type* other_value) { *this = *(static_cast<const ASN_ANY*>(other_value)); } | |
35 | Base_Type* clone() const { return new ASN_ANY(*this); } | |
36 | const TTCN_Typedescriptor_t* get_descriptor() const { return &ASN_ANY_descr_; } | |
37 | #endif | |
38 | ||
39 | void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, | |
40 | TTCN_EncDec::coding_t p_coding, ...) const; | |
41 | ||
42 | void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, | |
43 | TTCN_EncDec::coding_t p_coding, ...); | |
44 | ||
45 | ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, | |
46 | unsigned p_coding) const; | |
47 | ||
48 | boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, | |
49 | const ASN_BER_TLV_t& p_tlv, unsigned L_form); | |
50 | ||
51 | ||
52 | }; | |
53 | ||
54 | typedef OCTETSTRING_template ASN_ANY_template; | |
55 | ||
56 | #endif /* ASN_ANY_HH */ |