1 ///////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2000-2014 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 ///////////////////////////////////////////////////////////////////////////////
11 #include "Octetstring.hh"
13 class ASN_ANY : public OCTETSTRING
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) {}
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_; }
32 void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
33 TTCN_EncDec::coding_t p_coding, ...) const;
35 void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
36 TTCN_EncDec::coding_t p_coding, ...);
38 ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td,
39 unsigned p_coding) const;
41 boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td,
42 const ASN_BER_TLV_t& p_tlv, unsigned L_form);
47 typedef OCTETSTRING_template ASN_ANY_template;
49 #endif /* ASN_ANY_HH */