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

#include <ossimDtedVol.h>

Inheritance diagram for ossimDtedVol:
ossimErrorStatusInterface

Public Types

enum  {
  VOL_LENGTH = 80, VOL_ONE_LABEL_1 = 4, VOL_REEL_NUMBER = 5, VOL_REEL_ACCESS = 11,
  VOL_SPACE = 12, VOL_ACCOUNT_NUMBER = 38, VOL_BLANKS = 52, VOL_ONE_LABEL_2 = 80,
  FIELD1_SIZE = 3, FIELD2_SIZE = 1, FIELD3_SIZE = 6, FIELD4_SIZE = 1,
  FIELD5_SIZE = 26, FIELD6_SIZE = 14, FIELD7_SIZE = 28, FIELD8_SIZE = 1
}
 

Public Member Functions

 ossimDtedVol ()
 
 ossimDtedVol (std::shared_ptr< ossim::istream > &str, ossim_int64 offset=0)
 
ossimString getRecognitionSentinel () const
 
ossimString getReelNumber () const
 
ossimString getAccountNumber () const
 
ossim_int32 startOffset () const
 
ossim_int32 stopOffset () const
 
void parse (std::istream &in)
 
ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 Gets a property for name. More...
 
void getPropertyNames (std::vector< ossimString > &propertyNames) const
 Adds this class's properties to list. More...
 
std::ostream & print (std::ostream &out, const std::string &prefix) const
 print method that outputs a key/value type format adding prefix to keys. More...
 
- Public Member Functions inherited from ossimErrorStatusInterface
 ossimErrorStatusInterface ()
 
virtual ~ossimErrorStatusInterface ()
 
virtual ossimErrorCode getErrorStatus () const
 
virtual ossimString getErrorStatusString () const
 
virtual void setErrorStatus (ossimErrorCode error_status) const
 
virtual void setErrorStatus () const
 
virtual void clearErrorStatus () const
 
bool hasError () const
 
virtual std::ostream & print (std::ostream &out) const
 Outputs theErrorStatus as an ossimErrorCode and an ossimString. More...
 

Private Member Functions

 ossimDtedVol (const ossimDtedVol &source)
 
const ossimDtedVoloperator= (const ossimDtedVol &rhs)
 

Private Attributes

char theRecSen [FIELD1_SIZE+1]
 
char theField2 [FIELD2_SIZE+1]
 
char theReelNumber [FIELD3_SIZE+1]
 
char theField4 [FIELD4_SIZE+1]
 
char theField5 [FIELD5_SIZE+1]
 
char theAccountNumber [FIELD6_SIZE+1]
 
char theField7 [FIELD7_SIZE+1]
 
char theField8 [FIELD8_SIZE+1]
 
ossim_int32 theStartOffset
 
ossim_int32 theStopOffset
 

Friends

OSSIM_DLL std::ostream & operator<< (std::ostream &os, const ossimDtedVol &vol)
 

Additional Inherited Members

- Protected Attributes inherited from ossimErrorStatusInterface
ossimErrorCode theErrorStatus
 

Detailed Description

Definition at line 29 of file ossimDtedVol.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
VOL_LENGTH 
VOL_ONE_LABEL_1 
VOL_REEL_NUMBER 
VOL_REEL_ACCESS 
VOL_SPACE 
VOL_ACCOUNT_NUMBER 
VOL_BLANKS 
VOL_ONE_LABEL_2 
FIELD1_SIZE 
FIELD2_SIZE 
FIELD3_SIZE 
FIELD4_SIZE 
FIELD5_SIZE 
FIELD6_SIZE 
FIELD7_SIZE 
FIELD8_SIZE 

Definition at line 35 of file ossimDtedVol.h.

Constructor & Destructor Documentation

◆ ossimDtedVol() [1/3]

ossimDtedVol::ossimDtedVol ( )

Definition at line 22 of file ossimDtedVol.cpp.

23 :theStartOffset(0),
25 {
26 
27 }
ossim_int32 theStopOffset
Definition: ossimDtedVol.h:107
ossim_int32 theStartOffset
Definition: ossimDtedVol.h:106

◆ ossimDtedVol() [2/3]

ossimDtedVol::ossimDtedVol ( std::shared_ptr< ossim::istream > &  str,
ossim_int64  offset = 0 
)

Definition at line 29 of file ossimDtedVol.cpp.

References ossimErrorCodes::OSSIM_ERROR, parse(), and ossimErrorStatusInterface::theErrorStatus.

30  :
31  theStartOffset(0),
32  theStopOffset(0)
33 {
34  if(str)
35  {
36  str->seekg(offset);
37 
38  parse(*str);
39  }
40  else
41  {
43  }
44 }
ossim_int32 theStopOffset
Definition: ossimDtedVol.h:107
ossim_int32 theStartOffset
Definition: ossimDtedVol.h:106
static const ossimErrorCode OSSIM_ERROR
void parse(std::istream &in)

◆ ossimDtedVol() [3/3]

ossimDtedVol::ossimDtedVol ( const ossimDtedVol source)
private

Definition at line 218 of file ossimDtedVol.cpp.

219 {
220 }

Member Function Documentation

◆ getAccountNumber()

ossimString ossimDtedVol::getAccountNumber ( ) const

Definition at line 176 of file ossimDtedVol.cpp.

References theAccountNumber.

177 {
179 }
char theAccountNumber[FIELD6_SIZE+1]
Definition: ossimDtedVol.h:102

◆ getProperty()

ossimRefPtr< ossimProperty > ossimDtedVol::getProperty ( const ossimString name) const

Gets a property for name.

Parameters
nameProperty name to get.
Returns
ossimRefPtr<ossimProperty> Note that this can be empty if property for name was not found.

Definition at line 153 of file ossimDtedVol.cpp.

Referenced by ossimDtedInfo::getProperty().

155 {
156  ossimRefPtr<ossimProperty> result = 0;
157  return result;
158 }

◆ getPropertyNames()

void ossimDtedVol::getPropertyNames ( std::vector< ossimString > &  propertyNames) const

Adds this class's properties to list.

Parameters
propertyNameslist to append to.

Definition at line 160 of file ossimDtedVol.cpp.

Referenced by ossimDtedInfo::getProperty().

162 {
163  propertyNames.push_back(ossimString("dted_vol_record"));
164 }

◆ getRecognitionSentinel()

ossimString ossimDtedVol::getRecognitionSentinel ( ) const

Definition at line 166 of file ossimDtedVol.cpp.

References theRecSen.

167 {
168  return ossimString(theRecSen);
169 }
char theRecSen[FIELD1_SIZE+1]
Definition: ossimDtedVol.h:97

◆ getReelNumber()

ossimString ossimDtedVol::getReelNumber ( ) const

Definition at line 171 of file ossimDtedVol.cpp.

References theReelNumber.

172 {
173  return ossimString(theReelNumber);
174 }
char theReelNumber[FIELD3_SIZE+1]
Definition: ossimDtedVol.h:99

◆ operator=()

const ossimDtedVol & ossimDtedVol::operator= ( const ossimDtedVol rhs)
private

Definition at line 222 of file ossimDtedVol.cpp.

223 {
224  return rhs;
225 }

◆ parse()

void ossimDtedVol::parse ( std::istream &  in)

Definition at line 105 of file ossimDtedVol.cpp.

References ossimErrorStatusInterface::clearErrorStatus(), FIELD1_SIZE, FIELD2_SIZE, FIELD3_SIZE, FIELD4_SIZE, FIELD5_SIZE, FIELD6_SIZE, FIELD7_SIZE, FIELD8_SIZE, ossimErrorCodes::OSSIM_ERROR, theAccountNumber, ossimErrorStatusInterface::theErrorStatus, theField2, theField4, theField5, theField7, theField8, theRecSen, theReelNumber, theStartOffset, theStopOffset, and VOL_LENGTH.

Referenced by ossimDtedInfo::open(), and ossimDtedVol().

106 {
108  theStartOffset = in.tellg();
110  // Parse theRecSen
111  in.read(theRecSen, FIELD1_SIZE);
112  theRecSen[FIELD1_SIZE] = '\0';
113  if(!(strncmp(theRecSen, "VOL", 3) == 0))
114  {
115  // Not a volume header label.
117  in.seekg(theStartOffset);
118  return;
119  }
120 
121  // Parse Field 2
122  in.read(theField2, FIELD2_SIZE);
123  theField2[FIELD2_SIZE] = '\0';
124 
125  // Parse theReelNumber
126  in.read(theReelNumber, FIELD3_SIZE);
127  theReelNumber[FIELD3_SIZE] = '\0';
128 
129  // Parse Field 4
130  in.read(theField4, FIELD4_SIZE);
131  theField4[FIELD4_SIZE] = '\0';
132 
133  // Parse Field 5
134  in.read(theField5, FIELD5_SIZE);
135  theField5[FIELD5_SIZE] = '\0';
136 
137  // Parse theAccountNumber
138  in.read(theAccountNumber, FIELD6_SIZE);
140 
141  // Parse Field 7
142  in.read(theField7, FIELD7_SIZE);
143  theField7[FIELD7_SIZE] = '\0';
144 
145  // Parse Field 8
146  in.read(theField8, FIELD8_SIZE);
147  theField8[FIELD8_SIZE] = '\0';
148 
149  // Set the stop offset.
151 }
ossim_int32 theStopOffset
Definition: ossimDtedVol.h:107
char theReelNumber[FIELD3_SIZE+1]
Definition: ossimDtedVol.h:99
ossim_int32 theStartOffset
Definition: ossimDtedVol.h:106
static const ossimErrorCode OSSIM_ERROR
char theField5[FIELD5_SIZE+1]
Definition: ossimDtedVol.h:101
char theField2[FIELD2_SIZE+1]
Definition: ossimDtedVol.h:98
char theField7[FIELD7_SIZE+1]
Definition: ossimDtedVol.h:103
char theField4[FIELD4_SIZE+1]
Definition: ossimDtedVol.h:100
char theField8[FIELD8_SIZE+1]
Definition: ossimDtedVol.h:104
char theRecSen[FIELD1_SIZE+1]
Definition: ossimDtedVol.h:97
char theAccountNumber[FIELD6_SIZE+1]
Definition: ossimDtedVol.h:102

◆ print()

std::ostream & ossimDtedVol::print ( std::ostream &  out,
const std::string &  prefix 
) const

print method that outputs a key/value type format adding prefix to keys.

Parameters
outString to output to.
prefixThis will be prepended to key. e.g. Where prefix = "nitf." and key is "file_name" key becomes: "nitf.file_name:"
Returns
output stream.

Definition at line 191 of file ossimDtedVol.cpp.

References theAccountNumber, theField2, theField4, theField5, theField7, theField8, theRecSen, and theReelNumber.

Referenced by operator<<(), and ossimDtedInfo::print().

193 {
194  std::string pfx = prefix;
195  pfx += "vol.";
196 
197  out << pfx << "recognition_sentinel: " << theRecSen << "\n"
198  << pfx << "field2: " << theField2 << "\n"
199  << pfx << "reel_number: " << theReelNumber << "\n"
200  << pfx << "field4: " << theField4 << "\n"
201  << pfx << "field5: " << theField5 << "\n"
202  << pfx << "account_number: " << theAccountNumber << "\n"
203  << pfx << "field7: " << theField7 << "\n"
204  << pfx << "field8: " << theField8 << "\n"
205  << std::endl;
206  return out;
207 }
char theReelNumber[FIELD3_SIZE+1]
Definition: ossimDtedVol.h:99
char theField5[FIELD5_SIZE+1]
Definition: ossimDtedVol.h:101
char theField2[FIELD2_SIZE+1]
Definition: ossimDtedVol.h:98
char theField7[FIELD7_SIZE+1]
Definition: ossimDtedVol.h:103
char theField4[FIELD4_SIZE+1]
Definition: ossimDtedVol.h:100
char theField8[FIELD8_SIZE+1]
Definition: ossimDtedVol.h:104
char theRecSen[FIELD1_SIZE+1]
Definition: ossimDtedVol.h:97
char theAccountNumber[FIELD6_SIZE+1]
Definition: ossimDtedVol.h:102

◆ startOffset()

ossim_int32 ossimDtedVol::startOffset ( ) const

Definition at line 181 of file ossimDtedVol.cpp.

References theStartOffset.

182 {
183  return theStartOffset;
184 }
ossim_int32 theStartOffset
Definition: ossimDtedVol.h:106

◆ stopOffset()

ossim_int32 ossimDtedVol::stopOffset ( ) const

Definition at line 186 of file ossimDtedVol.cpp.

References theStopOffset.

187 {
188  return theStopOffset;
189 }
ossim_int32 theStopOffset
Definition: ossimDtedVol.h:107

Friends And Related Function Documentation

◆ operator<<

OSSIM_DLL std::ostream& operator<< ( std::ostream &  os,
const ossimDtedVol vol 
)
friend

Definition at line 212 of file ossimDtedVol.cpp.

213 {
214  std::string prefix;
215  return vol.print(out, prefix);
216 }
std::ostream & print(std::ostream &out, const std::string &prefix) const
print method that outputs a key/value type format adding prefix to keys.

Member Data Documentation

◆ theAccountNumber

char ossimDtedVol::theAccountNumber[FIELD6_SIZE+1]
private

Definition at line 102 of file ossimDtedVol.h.

Referenced by getAccountNumber(), parse(), and print().

◆ theField2

char ossimDtedVol::theField2[FIELD2_SIZE+1]
private

Definition at line 98 of file ossimDtedVol.h.

Referenced by parse(), and print().

◆ theField4

char ossimDtedVol::theField4[FIELD4_SIZE+1]
private

Definition at line 100 of file ossimDtedVol.h.

Referenced by parse(), and print().

◆ theField5

char ossimDtedVol::theField5[FIELD5_SIZE+1]
private

Definition at line 101 of file ossimDtedVol.h.

Referenced by parse(), and print().

◆ theField7

char ossimDtedVol::theField7[FIELD7_SIZE+1]
private

Definition at line 103 of file ossimDtedVol.h.

Referenced by parse(), and print().

◆ theField8

char ossimDtedVol::theField8[FIELD8_SIZE+1]
private

Definition at line 104 of file ossimDtedVol.h.

Referenced by parse(), and print().

◆ theRecSen

char ossimDtedVol::theRecSen[FIELD1_SIZE+1]
private

Definition at line 97 of file ossimDtedVol.h.

Referenced by getRecognitionSentinel(), parse(), and print().

◆ theReelNumber

char ossimDtedVol::theReelNumber[FIELD3_SIZE+1]
private

Definition at line 99 of file ossimDtedVol.h.

Referenced by getReelNumber(), parse(), and print().

◆ theStartOffset

ossim_int32 ossimDtedVol::theStartOffset
private

Definition at line 106 of file ossimDtedVol.h.

Referenced by parse(), and startOffset().

◆ theStopOffset

ossim_int32 ossimDtedVol::theStopOffset
private

Definition at line 107 of file ossimDtedVol.h.

Referenced by parse(), and stopOffset().


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