Commit | Line | Data |
---|---|---|
970ed795 | 1 | /////////////////////////////////////////////////////////////////////////////// |
3abe9331 | 2 | // Copyright (c) 2000-2015 Ericsson Telecom AB |
970ed795 EL |
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 | #ifndef ASN_ANY_HH | |
9 | #define ASN_ANY_HH | |
10 | ||
11 | #include "Octetstring.hh" | |
12 | ||
13 | class ASN_ANY : public OCTETSTRING | |
14 | { | |
15 | public: | |
16 | ASN_ANY() : OCTETSTRING() {} | |
17 | ASN_ANY(int n_octets, const unsigned char* octets_ptr) | |
18 | : OCTETSTRING(n_octets, octets_ptr) {} | |
19 | ASN_ANY(const OCTETSTRING_ELEMENT& other_value) | |
20 | : OCTETSTRING(other_value) {} | |
21 | ASN_ANY(const OCTETSTRING& other_value) | |
22 | : OCTETSTRING(other_value) {} | |
23 | ASN_ANY(const ASN_ANY& other_value) | |
24 | : OCTETSTRING(other_value) {} | |
25 | ||
26 | #ifdef TITAN_RUNTIME_2 | |
27 | void set_value(const Base_Type* other_value) { *this = *(static_cast<const ASN_ANY*>(other_value)); } | |
28 | Base_Type* clone() const { return new ASN_ANY(*this); } | |
29 | const TTCN_Typedescriptor_t* get_descriptor() const { return &ASN_ANY_descr_; } | |
30 | #endif | |
31 | ||
32 | void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, | |
33 | TTCN_EncDec::coding_t p_coding, ...) const; | |
34 | ||
35 | void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, | |
36 | TTCN_EncDec::coding_t p_coding, ...); | |
37 | ||
38 | ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, | |
39 | unsigned p_coding) const; | |
40 | ||
41 | boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, | |
42 | const ASN_BER_TLV_t& p_tlv, unsigned L_form); | |
43 | ||
44 | ||
45 | }; | |
46 | ||
47 | typedef OCTETSTRING_template ASN_ANY_template; | |
48 | ||
49 | #endif /* ASN_ANY_HH */ |