|
libwreport
2.4
|
Sequence of opcodes, as a slice of a Varcode vector. More...
#include <opcode.h>
Public Member Functions | |
| Opcodes (const std::vector< Varcode > &vals) | |
| Sequence spanning the whole vector. | |
| Opcodes (const std::vector< Varcode > &vals, unsigned begin, unsigned end) | |
| Sequence from begin (inclusive) to end (excluded) | |
| Opcodes (const Opcodes &o) | |
| Copy constructor. | |
| Opcodes & | operator= (const Opcodes &o) |
| Assignment only works if the Opcodes share the same vector. | |
| Varcode | operator[] (unsigned i) const |
| Return the i-th varcode in the chain. | |
| unsigned | size () const |
| Number of items in this opcode list. | |
| bool | empty () const |
| True if there are no opcodes. | |
| Varcode | head () const |
| First opcode in the list (0 if the list is empty) | |
| Opcodes | next () const |
| List of all opcodes after the first one. | |
| Opcodes | sub (unsigned skip) const |
| Return the opcodes from skip until the end. | |
| Opcodes | sub (unsigned skip, unsigned len) const |
| Return len opcodes starting from skip. | |
| void | visit (opcode::Visitor &e, const DTable &dtable) const |
| Walk the structure of the opcodes sending events to an opcode::Visitor. | |
| void | visit (opcode::Visitor &e) const |
| Walk the structure of the opcodes sending events to an opcode::Visitor. | |
| void | print (FILE *out) const |
| Print the contents of this opcode list. | |
Data Fields | |
| const std::vector< Varcode > & | vals |
| Reference to the vector with all the expanded varcodes. | |
| unsigned | begin |
| First element of the varcode sequence in Opcodes::vals. | |
| unsigned | end |
| One-past-the-last element of the varcode sequence in Opcodes::vals. | |
Sequence of opcodes, as a slice of a Varcode vector.
This is used for BUFR and CREX encoding and decoding.
It can be considered as a sort of subroutine to be interpreted by the encoders/decoders.
| Opcodes wreport::Opcodes::next | ( | ) | const [inline] |
| void wreport::Opcodes::visit | ( | opcode::Visitor & | e, |
| const DTable & | dtable | ||
| ) | const |
Walk the structure of the opcodes sending events to an opcode::Visitor.
Initialise e.dtable with dtable.
| void wreport::Opcodes::visit | ( | opcode::Visitor & | e | ) | const |
Walk the structure of the opcodes sending events to an opcode::Visitor.
Assume that e.dtable is already initialised.
1.7.6.1