Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct template sequence_of

boost::asn1::sequence_of —

Synopsis

template<typename T> 
struct sequence_of {
  // construct/copy/destruct
  sequence_of();
  sequence_of(const pdu_base_of_t &);
  sequence_of(const sequence_of< T > &);
  sequence_of& operator=(const sequence_of< T > &);
  sequence_of& operator=(const pdu_base_of_t &);
  ~sequence_of();

  // public member functions
  void assign(const sequence_of< T > &) ;
  void assign(const pdu_base_of_t &) ;
  size_t size_of() ;
  const char * name() ;
  T & operator[](const size_t) ;
  const T & operator[](const size_t) const;
  T & getRef(const size_t) ;
  const T & getRef(size_t) const;
  void assign(size_t, T &) ;
  void from(asn_base_ptr &) ;
  void to(asn_base_ptr &) ;
};

Description

Sequence Of template

Sequence Of

The Sequence Of template is used when a ASN1 definition has a named SEQUENCE OF object. SEQUENCE OF is an ordered list of ASN1 objects. The sequence_of template derives from a vector<T> to encapsulate the ASN1 objects.

Record := SEQUENCE { 
    UserName  OCTET STRING,
    FirstName IA5 STRING,
    LastName  IA5 STRING,
  }

RecordList SEQUENCE OF Record

This would equate to the following C++ code:

struct record
{
  octetstring_t UserName;
  ia5string_t   FirstName;
  ia5string_t   LastName;
};
typedef sequence<record>  Record;
sequence_of<Record> RecordList;

sequence_of construct/copy/destruct

  1. sequence_of();
  2. sequence_of(const pdu_base_of_t & pdu_object);
  3. sequence_of(const sequence_of< T > & pdu_object);
  4. sequence_of& operator=(const sequence_of< T > & pdu_object);
  5. sequence_of& operator=(const pdu_base_of_t & pdu_object);
  6. ~sequence_of();

sequence_of public member functions

  1. void assign(const sequence_of< T > & pdu_object) ;
  2. void assign(const pdu_base_of_t & pdu_object) ;
  3. size_t size_of() ;
  4. const char * name() ;
  5. T & operator[](const size_t element) ;

    getRef

    Parameters:
    element

    n'th element of the container

  6. const T & operator[](const size_t element) const;

    getRef

    Parameters:
    element

    n'th element of the container

  7. T & getRef(const size_t element) ;

    If element is greater than the current size, this function will append an empty element to the list.

    Parameters:
    element

    n'th element of the container

  8. const T & getRef(size_t element) const;

    If element is greater than the current size, this function will append an empty element to the list.

    Parameters:
    element

    n'th element of the container

  9. void assign(size_t element, T & ref) ;
  10. void from(asn_base_ptr & ptr) ;
  11. void to(asn_base_ptr & ptr) ;
Copyright © 2007 Andreas Haberstroh

PrevUpHomeNext