OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Public Attributes | Friends | List of all members
ossimNitfImageInfoRecordV2_0 Class Reference

#include <ossimNitfFileHeaderV2_0.h>

Public Member Functions

ossim_uint32 getHeaderLength () const
 
ossim_uint64 getImageLength () const
 
ossim_uint64 getTotalLength () const
 
void setSubheaderLength (ossim_uint32 length)
 
void setImageLength (ossim_uint64 length)
 

Public Attributes

char theImageSubheaderLength [7]
 
char theImageLength [11]
 

Friends

std::ostream & operator<< (std::ostream &out, const ossimNitfImageInfoRecordV2_0 &data)
 

Detailed Description

Definition at line 25 of file ossimNitfFileHeaderV2_0.h.

Member Function Documentation

◆ getHeaderLength()

ossim_uint32 ossimNitfImageInfoRecordV2_0::getHeaderLength ( ) const

Definition at line 54 of file ossimNitfFileHeaderV2_0.cpp.

References theImageSubheaderLength, and ossimString::toInt32().

Referenced by getTotalLength().

55 {
57 }
ossim_int32 toInt32() const

◆ getImageLength()

ossim_uint64 ossimNitfImageInfoRecordV2_0::getImageLength ( ) const

Definition at line 59 of file ossimNitfFileHeaderV2_0.cpp.

References theImageLength, and ossimString::toInt32().

Referenced by getTotalLength().

60 {
62 }
ossim_int32 toInt32() const

◆ getTotalLength()

ossim_uint64 ossimNitfImageInfoRecordV2_0::getTotalLength ( ) const

Definition at line 64 of file ossimNitfFileHeaderV2_0.cpp.

References getHeaderLength(), and getImageLength().

65 {
66  return (getHeaderLength() + getImageLength());
67 }

◆ setImageLength()

void ossimNitfImageInfoRecordV2_0::setImageLength ( ossim_uint64  length)

Definition at line 82 of file ossimNitfFileHeaderV2_0.cpp.

References theImageLength.

Referenced by ossimNitf20Writer::writeBlockBandSeparate(), and ossimNitf20Writer::writeBlockBandSequential().

83 {
85 
86  out << std::setw(10)
87  << std::setfill('0')
88  << std::setiosflags(ios::right)
89  << length;
90 
91  memcpy(theImageLength, out.str().c_str(), 10);
92  theImageLength[10] = '\0';
93 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35

◆ setSubheaderLength()

void ossimNitfImageInfoRecordV2_0::setSubheaderLength ( ossim_uint32  length)

Definition at line 69 of file ossimNitfFileHeaderV2_0.cpp.

References theImageSubheaderLength.

Referenced by ossimNitf20Writer::writeBlockBandSeparate(), and ossimNitf20Writer::writeBlockBandSequential().

70 {
72 
73  out << std::setw(6)
74  << std::setfill('0')
75  << std::setiosflags(ios::right)
76  << length;
77 
78  memcpy(theImageSubheaderLength, out.str().c_str(), 6);
79  theImageSubheaderLength[6] = '\0';
80 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const ossimNitfImageInfoRecordV2_0 data 
)
friend

Definition at line 45 of file ossimNitfFileHeaderV2_0.cpp.

47 {
48  return out << "theImageSubheaderLength: "
49  << data.theImageSubheaderLength << std::endl
50  << "theImageLength: "
51  << data.theImageLength;
52 }

Member Data Documentation

◆ theImageLength

char ossimNitfImageInfoRecordV2_0::theImageLength[11]

Is a 10 byte numeric 0-999999999

Definition at line 45 of file ossimNitfFileHeaderV2_0.h.

Referenced by getImageLength(), ossimNitfFileHeaderV2_0::readImageInfoRecords(), and setImageLength().

◆ theImageSubheaderLength

char ossimNitfImageInfoRecordV2_0::theImageSubheaderLength[7]

Is a 6 byte numeric 0-999999

Definition at line 40 of file ossimNitfFileHeaderV2_0.h.

Referenced by getHeaderLength(), ossimNitfFileHeaderV2_0::readImageInfoRecords(), and setSubheaderLength().


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