ESA JPIP server  0.1
jpeg2000::PacketIndex Class Reference

Class used for indexing the packets of a codestream image. More...

#include <packet_index.h>

Collaboration diagram for jpeg2000::PacketIndex:

Public Types

enum  { MINIMUM_OFFSET = 64 }
 

Public Member Functions

 PacketIndex ()
 Empty constructor. More...
 
 PacketIndex (uint64_t max_offset)
 Initializes the object. More...
 
 PacketIndex (const PacketIndex &index)
 Copy constructor. More...
 
const PacketIndexoperator= (const PacketIndex &index)
 Copy assignment. More...
 
PacketIndexAdd (const FileSegment &segment)
 Adds a new packet segment to the index. More...
 
int Size () const
 Returns the number of elements of the vector. More...
 
void Clear ()
 Clears the content. More...
 
FileSegment operator[] (int i) const
 Operator used for accessing the items. More...
 
virtual ~PacketIndex ()
 

Private Attributes

vint_vector offsets
 Vector of packet offsets. More...
 
vector< FileSegmentaux
 Vector of file segments to handle the different sets of packets that are not contiguous. More...
 

Detailed Description

Class used for indexing the packets of a codestream image.

The class vint_vector is used internally to store the offsets of the packets with the minimum required bytes.

See also
data::vint_vector

Member Enumeration Documentation

anonymous enum
Enumerator
MINIMUM_OFFSET 

All the offsets must be greater than this value.

Constructor & Destructor Documentation

jpeg2000::PacketIndex::PacketIndex ( )
inline

Empty constructor.

jpeg2000::PacketIndex::PacketIndex ( uint64_t  max_offset)
inline

Initializes the object.

Parameters
max_offsetMaximum value for an offset.

Here is the call graph for this function:

jpeg2000::PacketIndex::PacketIndex ( const PacketIndex index)
inline

Copy constructor.

virtual jpeg2000::PacketIndex::~PacketIndex ( )
inlinevirtual

Member Function Documentation

PacketIndex& jpeg2000::PacketIndex::Add ( const FileSegment segment)
inline

Adds a new packet segment to the index.

Parameters
segmentFiel segment associated to the packet.
Returns
The object itself.

Here is the call graph for this function:

void jpeg2000::PacketIndex::Clear ( )
inline

Clears the content.

Here is the call graph for this function:

const PacketIndex& jpeg2000::PacketIndex::operator= ( const PacketIndex index)
inline

Copy assignment.

FileSegment jpeg2000::PacketIndex::operator[] ( int  i) const
inline

Operator used for accessing the items.

Parameters
iItem index.
Returns
File segment of the packet.
int jpeg2000::PacketIndex::Size ( ) const
inline

Returns the number of elements of the vector.

Here is the call graph for this function:

Member Data Documentation

vector<FileSegment> jpeg2000::PacketIndex::aux
private

Vector of file segments to handle the different sets of packets that are not contiguous.

vint_vector jpeg2000::PacketIndex::offsets
private

Vector of packet offsets.


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