Nitf::DataSegment Class Reference

represents a data segment in an existing NITF file More...

#include <DataSegment.h>

Inheritance diagram for Nitf::DataSegment:

Inheritance graph
[legend]
Collaboration diagram for Nitf::DataSegment:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DataSegment (NITFReaderManager &, LTIOStreamInf &, int segmentNumber, lt_int64 headerOffset, lt_int64 headerLength, lt_int64 dataOffset, lt_int64 dataLength)
 ~DataSegment ()
LT_STATUS initialize ()
 initializer
LT_STATUS addMetadataLocal (LTIMetadataDatabase &db) const
LT_STATUS addMetadataLocal (LTIMetadataDatabase &db, const char *prefixOverride) const
bool verifyIsOverflow (const char *code, bool isU, int segmentNum) const
const char * getDESID () const
 returns the ID
const char * getDESVER () const
 returns the version
lt_uint32 getDataLen () const
 returns the length of the data from the segment
const lt_uint8getData () const
 returns the data from the segment


Detailed Description

This class represents a data segment in an NITF file. To access the data segment of a file, retrieve the DataSegment from the NITFReaderManager class.

Definition at line 34 of file DataSegment.h.


Constructor & Destructor Documentation

Nitf::DataSegment::DataSegment ( NITFReaderManager &  ,
LTIOStreamInf ,
int  segmentNumber,
lt_int64  headerOffset,
lt_int64  headerLength,
lt_int64  dataOffset,
lt_int64  dataLength 
)

Nitf::DataSegment::~DataSegment (  ) 


Member Function Documentation

LT_STATUS Nitf::DataSegment::initialize (  )  [virtual]

This function must be called immediately after the constructor.

Returns:
success or failure

Reimplemented from Nitf::Segment.

LT_STATUS Nitf::DataSegment::addMetadataLocal ( LTIMetadataDatabase db  )  const [virtual]

Implements Nitf::Segment.

LT_STATUS Nitf::DataSegment::addMetadataLocal ( LTIMetadataDatabase db,
const char *  prefixOverride 
) const

bool Nitf::DataSegment::verifyIsOverflow ( const char *  code,
bool  isU,
int  segmentNum 
) const

const char* Nitf::DataSegment::getDESID (  )  const

This function returns the ID of the data segment.

Returns:
the ID of the segment, as a string

const char* Nitf::DataSegment::getDESVER (  )  const

This function returns the version of the data segment.

Returns:
the version of the segment, as a string

lt_uint32 Nitf::DataSegment::getDataLen (  )  const

This function returns the length of actual data of the data segment, in bytes.

Returns:
the number of bytes of the data

const lt_uint8* Nitf::DataSegment::getData (  )  const

This function returns the actual data of the data segment, as an array of bytes. The length of the array can be found by calling getDataLen().

Returns:
the array of bytes of the data


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

LizardTech