![]() |
Home | Libraries | People | FAQ | More |
boost::asn1::sequence_of —
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 &) ; };
Sequence Of template
Sequence OfThe 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/destructsequence_of();
sequence_of(const pdu_base_of_t & pdu_object);
sequence_of(const sequence_of< T > & pdu_object);
sequence_of& operator=(const sequence_of< T > & pdu_object);
sequence_of& operator=(const pdu_base_of_t & pdu_object);
~sequence_of();
sequence_of public member functionsvoid assign(const sequence_of< T > & pdu_object) ;
void assign(const pdu_base_of_t & pdu_object) ;
size_t size_of() ;
const char * name() ;
T & operator[](const size_t element) ;
getRef
| Parameters: |
|
const T & operator[](const size_t element) const;
getRef
| Parameters: |
|
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: |
|
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: |
|
void assign(size_t element, T & ref) ;
void from(asn_base_ptr & ptr) ;
void to(asn_base_ptr & ptr) ;
| Copyright © 2007 Andreas Haberstroh |