|
|
PDS_JP2
|
A PDS_Data_Block describes a binary data block in a PDS label. More...
#include <PDS_Data_Block.hh>


Public Member Functions | |
| PDS_Data_Block () | |
| Constructs an empty PDS_Data_Block. | |
| PDS_Data_Block (const idaeim::PVL::Aggregate ¶meters, std::ios::off_type file_offset) | |
| Constructs a PDS_Data_Block from its PDS label parameters and source file data location. | |
| PDS_Data_Block (const idaeim::PVL::Aggregate ¶meters, const std::string &filename) | |
| Constructs a PDS_Data_Block from its PDS label parameters and detached source file. | |
| std::ios::off_type | location () |
| Get the offset location of the binary data block in the source file. | |
| unsigned long long | size () |
| Get the size of the data block. | |
| Public Member Functions inherited from PDS_Data | |
| PDS_Data () | |
| Construct PDS_Data with no parameters. | |
| PDS_Data (const idaeim::PVL::Aggregate ¶meters) | |
| Construct PDS_Data from a PVL Parameter Aggregate. | |
| PDS_Data (const idaeim::PVL::Aggregate ¶meters, const std::string &detached) | |
| Construct PDS_Data from a PVL Parameter Aggregate. | |
| PDS_Data (const std::string &pathname) | |
| Construct PDS_Data from a named file. | |
| PDS_Data_Block_List * | data_blocks (const char **excluded=NULL, const char **image_block_names=NULL) |
| Get a list of all binary data blocks in the PDS data. | |
| idaeim::PVL::Parameter * | find_parameter (const std::string &pathname, bool case_sensitive=false, int skip=0, Parameter_Class_Selection parameter_class=ANY_PARAMETER) const |
| Find a named Parameter. | |
| virtual PDS_Data & | parameters (const std::string &pathname) |
| Set the parameters from a source file. | |
| virtual PDS_Data & | parameters (const idaeim::PVL::Aggregate ¶meters) |
| Set the parameters from a Parameter Aggregate. | |
| idaeim::PVL::Parameter * | remove_parameter (const std::string &pathname, bool case_sensitive=false, int skip=0, Parameter_Class_Selection parameter_class=ANY_PARAMETER) |
| Removes a named Parameter. | |
| template<typename T> | |
| bool | parameter_value (const std::string &pathname, T &value, bool case_sensitive=false, int skip=0) |
| Set the value of a named parameter. | |
| double | numeric_value (const std::string &pathname, bool case_sensitive=false, int skip=0) const |
| Get the numeric value of a named parameter. | |
| std::string | string_value (const std::string &pathname, bool case_sensitive=false, int skip=0) const |
| Get the string value of a named parameter. | |
| Public Member Functions inherited from Aggregate | |
| Aggregate & | add (const Parameter ¶meter) |
| Aggregate & | add (Parameter *parameter) |
| Aggregate (const Aggregate &aggregate) | |
| Aggregate (Parser &parser, const std::string name="") | |
| Aggregate (const std::string name="", const idaeim::PVL::Parameter::Type type_code=Default_Subtype) | |
| Aggregate (const Parameter ¶meter) | |
| Depth_Iterator | begin_depth () |
| Aggregate * | clone () const |
| int | compare (const Parameter ¶meter) const |
| Aggregate & | copy_in (const Aggregate &aggregate) |
| Depth_Iterator | end_depth () |
| void | entering (Parameter *parameter) |
| Parameter * | find (const std::string &pathname, bool case_sensitive=false, int skip=0, idaeim::PVL::Parameter::Type type=(Type)(ASSIGNMENT|AGGREGATE)) const |
| bool | is (const Type type) const |
| bool | is_Aggregate () const |
| bool | is_Group () const |
| bool | is_Object () const |
| Aggregate & | move_in (Aggregate &aggregate) |
| Aggregate & | operator= (const Parameter ¶meter) |
| Aggregate & | operator= (const Aggregate ¶meter) |
| Aggregate & | operator= (const Assignment ¶meter) |
| Aggregate & | operator= (const Value &value) |
| const Parameter & | operator[] (unsigned int index) const |
| Parameter & | operator[] (unsigned int index) |
| void | read (std::istream &in=std::cin) |
| void | read (Parser &parser) |
| Parameter * | remove (size_type index) |
| Parameter * | remove (Parameter *parameter) |
| Parameter * | remove (iterator position) |
| Parameter * | remove_depth (Parameter *parameter) |
| void | removing (Parameter *parameter) |
| size_type | total_size () |
| Aggregate & | type (const int type) |
| Type | type () const |
| std::string | type_name () const |
| Value & | value () const |
| ~Aggregate () | |
| Public Member Functions inherited from Parameter | |
| bool | at_pathname (std::string pathname, bool case_sensitive, const Parameter *root=NULL) const |
| bool | at_pathname (std::string pathname) const |
| bool | at_pathname (std::string pathname, bool case_sensitive, const Parameter &root) const |
| std::string | comment () const |
| Parameter & | comment (const std::string &comment) |
| bool | has_children () const |
| Parameter & | indenting (const MODE_STATE state, const WHICH_MODE which=LOCAL_MODE_SET) |
| Parameter & | indenting (const bool enable) |
| MODE_STATE | indenting (const WHICH_MODE which=RECURSIVE_MODE_SET) const |
| virtual bool | is_Assignment () const |
| virtual bool | is_Token () const |
| Parameter & | mode_state (const MODE mode, const MODE_STATE state, const WHICH_MODE which=LOCAL_MODE_SET) |
| const MODE_STATE * | mode_state (const WHICH_MODE which=LOCAL_MODE_SET) const |
| MODE_STATE | mode_state (const MODE mode, const WHICH_MODE which=RECURSIVE_MODE_SET) const |
| Parameter & | mode_state (const MODE_STATE *const modes, const WHICH_MODE which=LOCAL_MODE_SET) |
| std::string | name () const |
| Parameter & | name (const std::string &name) |
| bool | operator!= (const Parameter ¶meter) const |
| bool | operator< (const Parameter ¶meter) const |
| bool | operator<= (const Parameter ¶meter) const |
| bool | operator== (const Parameter ¶meter) const |
| bool | operator> (const Parameter ¶meter) const |
| bool | operator>= (const Parameter ¶meter) const |
| Parameter (const Parameter ¶meter) | |
| Parameter (const std::string &name="") | |
| Aggregate * | parent () const |
| std::string | pathname (const Parameter *root=NULL) const |
| std::string | pathname (const Parameter &root) const |
| std::string | pathname_to (const Parameter *root=NULL) const |
| std::string | pathname_to (const Parameter &root) const |
| std::ostream & | print (std::ostream &out=std::cout) const |
| Aggregate * | root () const |
| MODE_STATE | verbatim_strings (const WHICH_MODE which=RECURSIVE_MODE_SET) const |
| Parameter & | verbatim_strings (const bool enable) |
| Parameter & | verbatim_strings (const MODE_STATE state, const WHICH_MODE which=LOCAL_MODE_SET) |
| unsigned int | write (std::ostream &out=std::cout, int depth=0) const |
| virtual | ~Parameter () |
| Public Member Functions inherited from Vectal< Parameter > | |
| void | assign (size_type number, const_reference value) |
| void | assign (Iterator start, Iterator stop) |
| reference | at (size_type index) |
| const_reference | at (size_type index) const |
| reference | back () |
| const_reference | back () const |
| Iterator | begin () |
| Const_Iterator | begin () const |
| void | clear () |
| Iterator | end () |
| Const_Iterator | end () const |
| void | erase (size_type index) |
| iterator | erase (iterator start, iterator stop) |
| iterator | erase (iterator position) |
| reference | front () |
| const_reference | front () const |
| iterator | insert (iterator position, const_reference value) |
| void | insert (size_type index, const_reference value) |
| void | insert (iterator position, size_type number, const_reference value) |
| void | insert (iterator position, InputIterator start, InputIterator stop) |
| Vectal & | operator= (const Vectal< value_type > &vectal) |
| const_reference | operator[] (size_type index) const |
| reference | operator[] (size_type index) |
| pointer | peek (const iterator &position) |
| pointer | peek (const const_iterator &position) const |
| pointer | peek_back () |
| pointer | peek_back () const |
| iterator | poke (iterator position, pointer value_pointer) |
| void | poke (size_type index, pointer value_pointer) |
| iterator | poke (iterator position, const_iterator start, const_iterator stop) |
| void | poke_back (pointer value_pointer) |
| void | pop_back () |
| iterator | pull (iterator position) |
| iterator | pull (iterator start, iterator stop) |
| pointer | pull_back () |
| pointer | pull_out (size_type index) |
| pointer | pull_out (iterator position) |
| void | push_back (const_reference value) |
| Reverse_Iterator | rbegin () |
| Const_Reverse_Iterator | rbegin () const |
| Const_Reverse_Iterator | rend () const |
| Reverse_Iterator | rend () |
| pointer | replace (iterator position, pointer value_pointer) |
| void | resize (size_type new_size) |
| void | resize (size_type new_size, const_reference value) |
| Vectal (Iterator start, Iterator stop) | |
| Vectal (const Vectal &vectal) | |
| Vectal () | |
| Vectal (size_type size, const_reference value) | |
| Base & | vector_base () |
| void | wipe () |
| virtual | ~Vectal () |
Static Public Attributes | |
| static const char *const | ID |
| Class identification. | |
| static const char * | BLOCK_WIDTH_PARAMETER_NAME = "ROW_BYTES" |
| Name of the parameter specifying the binary block row width in bytes. | |
| static const char * | BLOCK_HEIGHT_PARAMETER_NAME = "ROWS" |
| Name of the parameter specifying the binary block height in rows. | |
| Static Public Attributes inherited from PDS_Data | |
| static const char *const | ID |
| Class identification name with source code version and date. | |
| static const char * | PDS_ID_PARAMETER_NAME = "PDS_VERSION_ID" |
| Name of the parameter providing the PDS ID. | |
| static const char * | RECORD_TYPE_PARAMETER_NAME = "RECORD_TYPE" |
| Name of the parameter specifying the type of label records. | |
| static const char * | BYTE_RECORD_TYPE = "UNDEFINED" |
| The record type used to define byte count based records. | |
| static const char * | FIXED_LENGTH_RECORD_TYPE = "FIXED_LENGTH" |
| The record type used to define fixed length records. | |
| static const char * | LABEL_RECORDS_PARAMETER_NAME = "LABEL_RECORDS" |
| Name of the parameter specifying the number of records in the label. | |
| static const char * | RECORD_BYTES_PARAMETER_NAME = "RECORD_BYTES" |
| Name of the parameter specifying the number of bytes per record. | |
| static const char * | FILE_RECORDS_PARAMETER_NAME = "FILE_RECORDS" |
| Name of the parameter specifying the number of records in the file. | |
| static const char * | INTERCHANGE_FORMAT_PARAMETER_NAME = "INTERCHANGE_FORMAT" |
| Name of the parameter indicating the data format. | |
| static const char * | IMAGE_DATA_BLOCK_NAME = "IMAGE" |
| Name of the Image_Data_Block parameter group. | |
| static const char * | BYTES_UNITS = "BYTES" |
| Units name for storage measured in bytes. | |
| static const char | RECORD_POINTER_PARAMETER_MARKER = '^' |
| Record pointer parameter prefix. | |
| Static Public Attributes inherited from Parameter | |
| static const bool | DEFAULT_CASE_SENSITIVITY |
| static const char | DEFAULT_PATHNAME_DELIMITER |
| static const char *const | ID |
| Static Public Attributes inherited from Vectal_ID | |
| static const char *const | ID |
Protected Member Functions | |
| virtual unsigned long long | data_block_size () |
| Calculate the size of the binary data block. | |
| Protected Member Functions inherited from Vectal< Parameter > | |
| virtual void | entering (pointer value_pointer) |
| virtual void | removing (pointer value_pointer) |
Protected Attributes | |
| std::ios::off_type | Location |
| Offset location of the data block in the source file. | |
| unsigned long long | Size |
| Size of the data block in bytes. | |
| Protected Attributes inherited from Parameter | |
| std::string | Comment |
| MODE_STATE | Modes [TOTAL_LOCAL_MODES] |
| std::string | Name |
| Aggregate * | Parent |
Additional Inherited Members | |
| Public Types inherited from PDS_Data | |
| enum | Parameter_Class_Selection { AGGREGATE_PARAMETER = -1 , ANY_PARAMETER = 0 , ASSIGNMENT_PARAMETER = 1 } |
| Selects the class of parameter to find. More... | |
| typedef std::vector< PDS_Data_Block * > | PDS_Data_Block_List |
| A vector of PDS_Data_Block object pointers. | |
| Public Types inherited from Aggregate | |
| typedef Parameter_List::const_iterator | const_iterator |
| typedef Depth_Iterator | depth_iterator |
| typedef Parameter_List::iterator | iterator |
| typedef Vectal< Parameter > | Parameter_List |
| Public Types inherited from Parameter | |
| enum | MODE |
| enum | MODE_STATE |
| enum | Type |
| enum | WHICH_MODE |
| typedef Integer | Default_Value |
| Public Types inherited from Vectal< Parameter > | |
| typedef Base::allocator_type | allocator_type |
| typedef std::vector< Parameter * > | Base |
| typedef Base::const_iterator | Base_const_iterator |
| typedef Base::const_reverse_iterator | Base_const_reverse_iterator |
| typedef Base::iterator | Base_iterator |
| typedef Base::reverse_iterator | Base_reverse_iterator |
| typedef Const_Iterator | const_iterator |
| typedef const pointer | const_pointer |
| typedef const value_type & | const_reference |
| typedef Const_Reverse_Iterator | const_reverse_iterator |
| typedef const value_type | const_value_type |
| typedef Base::difference_type | difference_type |
| typedef Iterator | iterator |
| typedef value_type * | pointer |
| typedef value_type & | reference |
| typedef Reverse_Iterator | reverse_iterator |
| typedef Base::size_type | size_type |
| typedef Parameter | value_type |
| Static Public Member Functions inherited from PDS_Data | |
| static Image_Data_Block * | image_data (PDS_Data_Block_List *data_block_list) |
| Get the Image_Data_Block from a PDS_Data::PDS_Data_Block_List. | |
| Static Public Member Functions inherited from Aggregate | |
| static Type | default_type () |
| static Type | default_type (const int type) |
| Static Public Member Functions inherited from Parameter | |
| static bool | case_sensitive () |
| static bool | case_sensitive (bool enable) |
| static char | path_delimiter (const char delimiter) |
| static char | path_delimiter () |
| static std::string | type_name (const Type type) |
| Public Attributes inherited from Aggregate | |
| CASE_INSENSITIVE | |
| CASE_SENSITIVE | |
| Public Attributes inherited from Parameter | |
| Verbatim_Strings | |
| Indenting | |
| TOTAL_LOCAL_MODES | |
| MODE_FALSE | |
| MODE_TRUE | |
| MODE_INHERITED | |
| ASSIGNMENT | |
| TOKEN | |
| AGGREGATE | |
| GROUP | |
| OBJECT | |
| END | |
| END_GROUP | |
| END_OBJECT | |
| LOCAL_MODE_SET | |
| DEFAULT_MODE_SET | |
| RECURSIVE_MODE_SET | |
| Static Protected Attributes inherited from Parameter | |
| static bool | Case_Sensitive |
| static MODE_STATE | DEFAULT_MODES [TOTAL_LOCAL_MODES] |
| static char | Path_Delimiter |
A PDS_Data_Block describes a binary data block in a PDS label.
A PDS_Data_Block is the PDS_Data parameters that describes a binary data block along with the location and size of the binary data in the source file. A binary data block is located in a PDS label by a data block record pointer parameter. A record pointer parameter has a name that begins with the PDS_Data::RECORD_POINTER_PARAMETER_MARKER character. The value of a pointer parameter is the record number (offset + 1) where the binary data is located in the file. A Parameter Aggregate with the same name, but without the record pointer marker, contains the parameters that desrcribe the data block.
| PDS_Data_Block | ( | ) |
Constructs an empty PDS_Data_Block.
References Location, and Size.
Referenced by Image_Data_Block::Image_Data_Block(), and Image_Data_Block::Image_Data_Block().
| PDS_Data_Block | ( | const idaeim::PVL::Aggregate & | parameters, |
| std::ios::off_type | file_offset ) |
Constructs a PDS_Data_Block from its PDS label parameters and source file data location.
N.B.: The Parameter Aggregate describing the data block is copied.
| parameters | Parameter Aggregate describing the data block |
| file_offset | Data block offset location in the source file. |
References data_block_size(), Location, PDS_Data::parameters(), PDS_Data::PDS_Data(), and Size.
| PDS_Data_Block | ( | const idaeim::PVL::Aggregate & | parameters, |
| const std::string & | filename ) |
Constructs a PDS_Data_Block from its PDS label parameters and detached source file.
N.B.: The Parameter Aggregate describing the data block is copied.
| parameters | Parameter Aggregate describing the data block |
| file_offset | Data block offset location in the source file. |
References Location, PDS_Data::parameters(), and PDS_Data::PDS_Data().
|
inline |
|
inline |
|
protectedvirtual |
Calculate the size of the binary data block.
The value of the BLOCK_WIDTH_PARAMETER_NAME parameter is multiplied by the value of the BLOCK_HEIGHT_PARAMETER_NAME parameter. If either of these parameters are not found in the data block description the result will be zero.
N.B.: This method may be overriden by subclasses that need to specialize how the data block size is determined.
Reimplemented in Image_Data_Block, and Image_Data_Block.
References BLOCK_HEIGHT_PARAMETER_NAME, BLOCK_WIDTH_PARAMETER_NAME, data_block_size(), PDS_Data::find_parameter(), Parameter::Parameter(), and Parameter::value().
Referenced by data_block_size(), and PDS_Data_Block().
|
static |
Class identification.
|
static |
Name of the parameter specifying the binary block row width in bytes.
Referenced by data_block_size().
|
static |
Name of the parameter specifying the binary block height in rows.
Referenced by data_block_size().
|
protected |
Offset location of the data block in the source file.
Referenced by location(), PDS_Data_Block(), PDS_Data_Block(), and PDS_Data_Block().
|
protected |
Size of the data block in bytes.
Referenced by Image_Data_Block::Image_Data_Block(), Image_Data_Block::Image_Data_Block(), PDS_Data_Block(), PDS_Data_Block(), and size().