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

#include <ossimNitfFileHeaderV2_1.h>

Public Member Functions

ossim_uint64 getHeaderLength () const
 
ossim_uint64 getTextLength () const
 
ossim_uint64 getTotalLength () const
 
void setSubheaderLength (ossim_uint64 length)
 
void setTextLength (ossim_uint64 length)
 

Public Attributes

char theTextFileSubheaderLength [5]
 Is a 4 byte numeric 0282-9999. More...
 
char theTextFileLength [6]
 Is a 5 byte numeric 0-99999. More...
 

Friends

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

Detailed Description

Definition at line 68 of file ossimNitfFileHeaderV2_1.h.

Member Function Documentation

◆ getHeaderLength()

ossim_uint64 ossimNitfTextFileInfoRecordV2_1::getHeaderLength ( ) const

Definition at line 141 of file ossimNitfFileHeaderV2_1.cpp.

References theTextFileSubheaderLength, and ossimString::toUInt64().

Referenced by getTotalLength().

142 {
144 }
char theTextFileSubheaderLength[5]
Is a 4 byte numeric 0282-9999.
ossim_uint64 toUInt64() const

◆ getTextLength()

ossim_uint64 ossimNitfTextFileInfoRecordV2_1::getTextLength ( ) const

Definition at line 146 of file ossimNitfFileHeaderV2_1.cpp.

References theTextFileLength, and ossimString::toUInt64().

Referenced by getTotalLength().

147 {
149 }
char theTextFileLength[6]
Is a 5 byte numeric 0-99999.
ossim_uint64 toUInt64() const

◆ getTotalLength()

ossim_uint64 ossimNitfTextFileInfoRecordV2_1::getTotalLength ( ) const

Definition at line 151 of file ossimNitfFileHeaderV2_1.cpp.

References getHeaderLength(), and getTextLength().

152 {
153  return (getHeaderLength() + getTextLength());
154 }

◆ setSubheaderLength()

void ossimNitfTextFileInfoRecordV2_1::setSubheaderLength ( ossim_uint64  length)

Definition at line 115 of file ossimNitfFileHeaderV2_1.cpp.

References theTextFileSubheaderLength.

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

116 {
117  std::ostringstream out;
118 
119  out << std::setw(4)
120  << std::setfill('0')
121  << std::setiosflags(ios::right)
122  << length;
123 
124  memcpy(theTextFileSubheaderLength, out.str().c_str(), 4);
125  theTextFileSubheaderLength[4] = '\0';
126 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theTextFileSubheaderLength[5]
Is a 4 byte numeric 0282-9999.

◆ setTextLength()

void ossimNitfTextFileInfoRecordV2_1::setTextLength ( ossim_uint64  length)

Definition at line 128 of file ossimNitfFileHeaderV2_1.cpp.

References theTextFileLength.

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

129 {
130  std::ostringstream out;
131 
132  out << std::setw(5)
133  << std::setfill('0')
134  << std::setiosflags(ios::right)
135  << length;
136 
137  memcpy(theTextFileLength, out.str().c_str(), 5);
138  theTextFileLength[5] = '\0';
139 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theTextFileLength[6]
Is a 5 byte numeric 0-99999.

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 91 of file ossimNitfFileHeaderV2_1.cpp.

93 {
94  return out << "theTextFileSubheaderLength: "
96  << "\ntheTextFileLength: "
97  << data.theTextFileLength
98  << std::endl;
99 }
char theTextFileLength[6]
Is a 5 byte numeric 0-99999.
char theTextFileSubheaderLength[5]
Is a 4 byte numeric 0282-9999.

Member Data Documentation

◆ theTextFileLength

char ossimNitfTextFileInfoRecordV2_1::theTextFileLength[6]

Is a 5 byte numeric 0-99999.

Definition at line 90 of file ossimNitfFileHeaderV2_1.h.

Referenced by getTextLength(), operator<<(), ossimNitfFileHeaderV2_1::readTextFileInfoRecords(), and setTextLength().

◆ theTextFileSubheaderLength

char ossimNitfTextFileInfoRecordV2_1::theTextFileSubheaderLength[5]

Is a 4 byte numeric 0282-9999.

Definition at line 85 of file ossimNitfFileHeaderV2_1.h.

Referenced by getHeaderLength(), operator<<(), ossimNitfFileHeaderV2_1::readTextFileInfoRecords(), and setSubheaderLength().


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