HiRISE
 PDS_JP2

PDS_Data_Block.hh
Go to the documentation of this file.
1 /* PDS_Data_Block
2 
3 HiROC CVS ID: PDS_Data_Block.hh,v 1.9 2013/03/14 21:00:43 guym Exp
4 
5 Copyright (C) 2006-2007 Arizona Board of Regents on behalf of the
6 Planetary Image Research Laboratory, Lunar and Planetary Laboratory at
7 the University of Arizona.
8 
9 This program is free software; you can redistribute it and/or modify it
10 under the terms of the GNU General Public License, version 2, as
11 published by the Free Software Foundation.
12 
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License along
19 with this program; if not, write to the Free Software Foundation, Inc.,
20 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 */
22 
23 #ifndef _PDS_Data_Block_
24 #define _PDS_Data_Block_
25 
26 #include "PDS_Data.hh"
27 
28 #include <string>
29 #include <iosfwd>
30 
31 
32 namespace UA
33 {
34 namespace HiRISE
35 {
55 : public PDS_Data
56 {
57 public:
58 /*==============================================================================
59  Constants:
60 */
62 static const char* const
63  ID;
64 
66 static const char
68 
70 static const char
72 
73 /*==============================================================================
74  Constructors:
75 */
79 
90  (
92  std::ios::off_type file_offset
93  );
94 
105  (
107  const std::string& filename
108  );
109 
110 
111 /*==============================================================================
112  Accessors:
113 */
118 std::ios::off_type location ()
119 {return Location;}
120 
125 unsigned long long size ()
126 {return Size;}
127 
128 /*==============================================================================
129  Data:
130 */
131 protected:
132 
134 std::ios::off_type
136 
138 unsigned long long
140 
153 virtual unsigned long long data_block_size ();
154 
155 }; // class PDS_Data_Block
156 
157 } // namespace HiRISE
158 } // namespace UA
159 #endif
A PDS_Data_Block describes a binary data block in a PDS label.
Definition: PDS_Data_Block.hh:56
unsigned long long Size
Size of the data block in bytes.
Definition: PDS_Data_Block.hh:139
std::ios::off_type location()
Get the offset location of the binary data block in the source file.
Definition: PDS_Data_Block.hh:118
virtual unsigned long long data_block_size()
Calculate the size of the binary data block.
Definition: PDS_Data_Block.cc:138
static const char * BLOCK_HEIGHT_PARAMETER_NAME
Name of the parameter specifying the binary block height in rows.
Definition: PDS_Data_Block.hh:71
unsigned long long size()
Get the size of the data block.
Definition: PDS_Data_Block.hh:125
PDS_Data_Block()
Constructs an empty PDS_Data_Block.
Definition: PDS_Data_Block.cc:68
static const char * BLOCK_WIDTH_PARAMETER_NAME
Name of the parameter specifying the binary block row width in bytes.
Definition: PDS_Data_Block.hh:67
std::ios::off_type Location
Offset location of the data block in the source file.
Definition: PDS_Data_Block.hh:135
static const char *const ID
Class identification.
Definition: PDS_Data_Block.hh:63
PDS_Data contains PDS label PVL parameters.
Definition: PDS_Data.hh:52
virtual PDS_Data & parameters(const std::string &pathname)
Set the parameters from a source file.
Definition: PDS_Data.cc:305
Definition: Dimensions.cc:30