Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template asn_decode

boost::asn1::asn_decode — ASN1 decoder visitor.

Synopsis

template<typename TagLenT> 
class asn_decode : public boost::asn1::asn_visitor_t {
public:
  // construct/copy/destruct
  asn_decode(iostream &);

  // public member functions
  uint32_t execute(asn_base_ptr &) ;
  uint32_t visit(asn_base_ptr &) ;
};

Description

Overview

The ASN1 decoder visitor template requires a tag_len_policy derived object to be able to execute the decoding process.

Usage
asn_base_ptr asn_object;
iostream istrm;
...
asn_decode<ber_taglen> decoder(istrm);
decoder.execute(asn_object);

ber_taglen, cer_taglen, der_taglen

asn_decode construct/copy/destruct

  1. asn_decode(iostream & strm);

asn_decode public member functions

  1. uint32_t execute(asn_base_ptr & asn_object) ;

    Reads the tag, creates a new ASN1 object then accepts the visitor to read the length and data portions of the ASN1 object.

    Parameters:
    asn_object

    Creates a new ASN1 object from the tag

    Returns:

    Number of bytes read

  2. uint32_t visit(asn_base_ptr & asn_object) ;

    Reads the length and then decodes the data portions of the ASN1 object.

    Parameters:
    asn_object

    ASN1 object to visit

    Returns:

    Number of bytes read

Copyright © 2007 Andreas Haberstroh

PrevUpHomeNext