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

#include <ossimNitfTextHeaderV2_0.h>

Inheritance diagram for ossimNitfTextHeaderV2_0:
ossimNitfTextHeader ossimObject ossimReferenced

Public Member Functions

 ossimNitfTextHeaderV2_0 ()
 
virtual ~ossimNitfTextHeaderV2_0 ()
 
virtual void parseStream (std::istream &in)
 
virtual std::ostream & print (std::ostream &out) const
 Generic print method. More...
 
- Public Member Functions inherited from ossimNitfTextHeader
 ossimNitfTextHeader ()
 
virtual ~ossimNitfTextHeader ()
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getDescription () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
virtual void accept (ossimVisitor &visitor)
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 

Private Member Functions

void clearFields ()
 

Private Attributes

char theFilePartType [3]
 
char theTextId [11]
 
char theDataAndTime [15]
 
char theTextTitle [81]
 
char theTextSecurityClassification [2]
 
char theTextCodewords [41]
 
char theTextControlAndHandling [41]
 
char theTextReleasingInstructions [41]
 
char theTextClassificationAuthority [21]
 
char theTextSecurityControlNumber [21]
 
char theTextSecurityDowngrade [7]
 
char theTextSecurityDowngradeEvent [41]
 
char theTextEncyption [2]
 
char theTextFormat [4]
 
char theExtSubheaderDataLength [6]
 
char theExtSubheaderOverflow [4]
 

Additional Inherited Members

- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Detailed Description

Definition at line 17 of file ossimNitfTextHeaderV2_0.h.

Constructor & Destructor Documentation

◆ ossimNitfTextHeaderV2_0()

ossimNitfTextHeaderV2_0::ossimNitfTextHeaderV2_0 ( )

Definition at line 19 of file ossimNitfTextHeaderV2_0.cpp.

20 {
21  clearFields();
22 }

◆ ~ossimNitfTextHeaderV2_0()

virtual ossimNitfTextHeaderV2_0::~ossimNitfTextHeaderV2_0 ( )
inlinevirtual

Definition at line 21 of file ossimNitfTextHeaderV2_0.h.

21 {}

Member Function Documentation

◆ clearFields()

void ossimNitfTextHeaderV2_0::clearFields ( )
private

Definition at line 81 of file ossimNitfTextHeaderV2_0.cpp.

References theDataAndTime, theExtSubheaderDataLength, theExtSubheaderOverflow, theFilePartType, theTextClassificationAuthority, theTextCodewords, theTextControlAndHandling, theTextEncyption, theTextFormat, theTextId, theTextReleasingInstructions, theTextSecurityClassification, theTextSecurityControlNumber, theTextSecurityDowngrade, theTextSecurityDowngradeEvent, and theTextTitle.

Referenced by parseStream().

82 {
83 
84  memset(theFilePartType, ' ', 2);
85  memset(theTextId, ' ', 10);
86  memset(theDataAndTime, ' ', 14);
87  memset(theTextTitle, ' ', 80);
88  memset(theTextSecurityClassification, ' ', 1);
89  memset(theTextCodewords, ' ', 40);
90  memset(theTextControlAndHandling, ' ', 40);
91  memset(theTextReleasingInstructions, ' ', 40);
92  memset(theTextClassificationAuthority, ' ', 20);
93  memset(theTextSecurityControlNumber, ' ', 20);
94  memset(theTextSecurityDowngrade, ' ', 6);
95  memset(theTextSecurityDowngradeEvent, ' ', 40);
96  memset(theTextEncyption, ' ', 1);
97  memset(theTextFormat, ' ', 3);
98  memset(theExtSubheaderDataLength, ' ', 5);
99  memset(theExtSubheaderOverflow, ' ', 3);
100 
101  theFilePartType[2] = '\0';
102  theTextId[10] = '\0';
103  theDataAndTime[14] = '\0';
104  theTextTitle[80] = '\0';
106  theTextCodewords[40] = '\0';
107  theTextControlAndHandling[40] = '\0';
108  theTextReleasingInstructions[40] = '\0';
110  theTextSecurityControlNumber[20] = '\0';
111  theTextSecurityDowngrade[6] = '\0';
113  theTextEncyption[1] = '\0';
114  theTextFormat[3] = '\0';
115  theExtSubheaderDataLength[5] = '\0';
116  theExtSubheaderOverflow[3] = '\0';
117 }

◆ parseStream()

void ossimNitfTextHeaderV2_0::parseStream ( std::istream &  in)
virtual

Implements ossimNitfTextHeader.

Definition at line 24 of file ossimNitfTextHeaderV2_0.cpp.

References clearFields(), theDataAndTime, theExtSubheaderDataLength, theExtSubheaderOverflow, theFilePartType, theTextClassificationAuthority, theTextCodewords, theTextControlAndHandling, theTextEncyption, theTextFormat, theTextId, theTextReleasingInstructions, theTextSecurityClassification, theTextSecurityControlNumber, theTextSecurityDowngrade, theTextSecurityDowngradeEvent, theTextTitle, and ossimString::toLong().

25 {
26  if(in)
27  {
28  clearFields();
29 
30  in.read(theFilePartType, 2);
31  in.read(theTextId, 10);
32  in.read(theDataAndTime, 14);
33  in.read(theTextTitle, 80);
35  in.read(theTextCodewords, 40);
36  in.read(theTextControlAndHandling, 40);
37  in.read(theTextReleasingInstructions, 40);
38  in.read(theTextClassificationAuthority, 20);
39  in.read(theTextSecurityControlNumber, 20);
40  in.read(theTextSecurityDowngrade, 6);
41  if(ossimString(theTextSecurityDowngrade) == "999998")
42  {
43  in.read(theTextSecurityDowngradeEvent, 40);
44  }
45  in.read(theTextEncyption, 1);
46  in.read(theTextFormat, 3);
47  in.read(theExtSubheaderDataLength, 5);
48  long dataLength = ossimString(theExtSubheaderDataLength).toLong();
49  if(dataLength > 0)
50  {
51  in.read(theExtSubheaderOverflow, 3);
52 
53  // ignore the data for now
54  in.ignore(dataLength - 3);
55  }
56  }
57 }
long toLong() const
toLong&#39;s deprecated, please use the toInts...

◆ print()

std::ostream & ossimNitfTextHeaderV2_0::print ( std::ostream &  out) const
virtual

Generic print method.

Derived classes should re-implement as they see fit.

Returns
std::ostream&

Reimplemented from ossimObject.

Definition at line 59 of file ossimNitfTextHeaderV2_0.cpp.

References theDataAndTime, theExtSubheaderDataLength, theExtSubheaderOverflow, theFilePartType, theTextClassificationAuthority, theTextCodewords, theTextControlAndHandling, theTextEncyption, theTextFormat, theTextId, theTextReleasingInstructions, theTextSecurityClassification, theTextSecurityControlNumber, theTextSecurityDowngrade, theTextSecurityDowngradeEvent, and theTextTitle.

60 {
61  out << "theFilePartType: " << theFilePartType
62  << "\ntheTextId: " << theTextId
63  << "\ntheDataAndTime: " << theDataAndTime
64  << "\ntheTextTitle: " << theTextTitle
65  << "\ntheTextSecurityClassification: " << theTextSecurityClassification
66  << "\ntheTextCodewords: " << theTextCodewords
67  << "\ntheTextControlAndHandling: " << theTextControlAndHandling
68  << "\ntheTextReleasingInstructions: " << theTextReleasingInstructions
69  << "\ntheTextClassificationAuthority: " << theTextClassificationAuthority
70  << "\ntheTextSecurityControlNumber: " << theTextSecurityControlNumber
71  << "\ntheTextSecurityDowngrade: " << theTextSecurityDowngrade
72  << "\ntheTextSecurityDowngradeEvent: " << theTextSecurityDowngradeEvent
73  << "\ntheTextEncyption: " << theTextEncyption
74  << "\ntheTextFormat: " << theTextFormat
75  << "\ntheExtSubheaderDataLength: " << theExtSubheaderDataLength
76  << "\ntheExtSubheaderOverflow: " << theExtSubheaderOverflow
77  << std::endl;
78  return out;
79 }

Member Data Documentation

◆ theDataAndTime

char ossimNitfTextHeaderV2_0::theDataAndTime[15]
private

This is a required 14 byte field. It has the format of:

DDHHMMSSZMONYY

DD 2 character day HH 2 characters for the Hour MM 2 characters for the minute SS 2 characters for the seconds Z required MON 3 characters of the month YY 2 characters for the year

Definition at line 55 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().

◆ theExtSubheaderDataLength

char ossimNitfTextHeaderV2_0::theExtSubheaderDataLength[6]
private

is a required 5 byute field.

Definition at line 134 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().

◆ theExtSubheaderOverflow

char ossimNitfTextHeaderV2_0::theExtSubheaderOverflow[4]
private

is a conditional 3 byte field. It exists if theExtSubheaderDataLength is not 0

Definition at line 140 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().

◆ theFilePartType

char ossimNitfTextHeaderV2_0::theFilePartType[3]
private

This is a required 2 byte fields and has a value of TE.

Definition at line 34 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().

◆ theTextClassificationAuthority

char ossimNitfTextHeaderV2_0::theTextClassificationAuthority[21]
private

optional 20 byte field

Definition at line 92 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().

◆ theTextCodewords

char ossimNitfTextHeaderV2_0::theTextCodewords[41]
private

This is an optional 40 byte field.

Definition at line 77 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().

◆ theTextControlAndHandling

char ossimNitfTextHeaderV2_0::theTextControlAndHandling[41]
private

This is an optional 40 yte field.

Definition at line 82 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().

◆ theTextEncyption

char ossimNitfTextHeaderV2_0::theTextEncyption[2]
private

This is the encription type and is a required 1 byte field. It can have values

0 Not encrypted 1 Encrypted

Definition at line 118 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().

◆ theTextFormat

char ossimNitfTextHeaderV2_0::theTextFormat[4]
private

This is a required 3 byte field and will hold either:

MTF indicates USMTF ( refer to JCS PUB 6-04 for examples STA indicates NITF ASCII OTH indicates other or user defined

Definition at line 129 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().

◆ theTextId

char ossimNitfTextHeaderV2_0::theTextId[11]
private

This is a required 10 byte field.

Definition at line 39 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().

◆ theTextReleasingInstructions

char ossimNitfTextHeaderV2_0::theTextReleasingInstructions[41]
private

This is an optional 40 yte field.

Definition at line 87 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().

◆ theTextSecurityClassification

char ossimNitfTextHeaderV2_0::theTextSecurityClassification[2]
private

This is a required 1 byte field. Can have of either:

T Top secret S Secret C Confidential R Restricted U Unclassified

Definition at line 72 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().

◆ theTextSecurityControlNumber

char ossimNitfTextHeaderV2_0::theTextSecurityControlNumber[21]
private

optional 20 byte field

Definition at line 97 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().

◆ theTextSecurityDowngrade

char ossimNitfTextHeaderV2_0::theTextSecurityDowngrade[7]
private

optional 6 byte field

Definition at line 102 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().

◆ theTextSecurityDowngradeEvent

char ossimNitfTextHeaderV2_0::theTextSecurityDowngradeEvent[41]
private

Definition at line 109 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().

◆ theTextTitle

char ossimNitfTextHeaderV2_0::theTextTitle[81]
private

is an optional 80 byte field

Definition at line 60 of file ossimNitfTextHeaderV2_0.h.

Referenced by clearFields(), parseStream(), and print().


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