Bitstream Interpretation Library (BIL)  0.1
Public Member Functions
bil::Bitstream Class Reference

Models a Virtex bitstream. More...

#include <bitstream/Bitstream.hpp>

List of all members.

Public Member Functions

void append (std::auto_ptr< Packet > packet)
 Appends a packet to the bitstream.
void insert (std::auto_ptr< Packet > packet, size_t packetIndex)
 Inserts a packet into the bitstream.
void erase (size_t packetIndex)
 Erases a packet from bitstream.
void clear ()
 Erases all packets.
size_t size () const
 Gets the number of contained packets.
Packetat (size_t packetIndex)
 Gets the packet at the specified index.
const Packetat (size_t packetIndex) const
 Gets the packet at the specified index read only.
void runVisitor (PacketVisitor &visitor) const
 Visits every packet with specified visitor.

Detailed Description

Models a Virtex bitstream.

All bitstreams for Virtex devices consist of an ordered list of packets of different types, depending on their purpose. The Bitstream class is a polymorphic container holding the different packets in sequence.

Definition at line 24 of file Bitstream.hpp.


Member Function Documentation

void Bitstream::append ( std::auto_ptr< Packet packet)

Appends a packet to the bitstream.

Parameters:
packetThe new packet.

Definition at line 12 of file Bitstream.cpp.

void Bitstream::insert ( std::auto_ptr< Packet packet,
size_t  packetIndex 
)

Inserts a packet into the bitstream.

Parameters:
packetThe new packet.
packetIndexIndex at which packet is inserted.

Definition at line 18 of file Bitstream.cpp.

void Bitstream::erase ( size_t  packetIndex)

Erases a packet from bitstream.

Parameters:
packetIndexIndex of packet to erase.

Definition at line 25 of file Bitstream.cpp.

void Bitstream::clear ( )

Erases all packets.

Definition at line 32 of file Bitstream.cpp.

size_t Bitstream::size ( ) const

Gets the number of contained packets.

Returns:
The packet count.

Definition at line 38 of file Bitstream.cpp.

Packet & Bitstream::at ( size_t  packetIndex)

Gets the packet at the specified index.

Parameters:
packetIndexIndex of packet to get.
Returns:
The Packet.
Exceptions:
.

Definition at line 44 of file Bitstream.cpp.

const Packet & Bitstream::at ( size_t  packetIndex) const

Gets the packet at the specified index read only.

Parameters:
packetIndexIndex of packet to get.
Returns:
The Packet.
Exceptions:
.

Definition at line 51 of file Bitstream.cpp.

void Bitstream::runVisitor ( PacketVisitor visitor) const

Visits every packet with specified visitor.

Parameters:
visitorVisitor to call.

Definition at line 58 of file Bitstream.cpp.


The documentation for this class was generated from the following files: