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
14 ******************************************************************************/
18 #include "Octetstring.hh"
20 class ASN_ANY : public OCTETSTRING
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) {}
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_; }
39 void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
40 TTCN_EncDec::coding_t p_coding, ...) const;
42 void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
43 TTCN_EncDec::coding_t p_coding, ...);
45 ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td,
46 unsigned p_coding) const;
48 boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td,
49 const ASN_BER_TLV_t& p_tlv, unsigned L_form);
54 typedef OCTETSTRING_template ASN_ANY_template;
56 #endif /* ASN_ANY_HH */