HiRISE
 PDS_JP2

Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
PDS_Data Class Reference

PDS_Data contains PDS label PVL parameters. More...

#include <PDS_Data.hh>

Inheritance diagram for PDS_Data:
Inheritance graph
[legend]
Collaboration diagram for PDS_Data:
Collaboration graph
[legend]

Public Types

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. More...
 
- Public Types inherited from Aggregate
typedef Parameter_List::const_iterator const_iterator
 
typedef Depth_Iterator depth_iterator
 
typedef Parameter_List::iterator iterator
 
typedef Vectal< ParameterParameter_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_typeconst_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_typepointer
 
typedef value_typereference
 
typedef Reverse_Iterator reverse_iterator
 
typedef Base::size_type size_type
 
typedef Parameter value_type
 

Public Member Functions

 PDS_Data ()
 Construct PDS_Data with no parameters. More...
 
 PDS_Data (const idaeim::PVL::Aggregate &parameters)
 Construct PDS_Data from a PVL Parameter Aggregate. More...
 
 PDS_Data (const idaeim::PVL::Aggregate &parameters, const std::string &detached)
 Construct PDS_Data from a PVL Parameter Aggregate. More...
 
 PDS_Data (const std::string &pathname)
 Construct PDS_Data from a named file. More...
 
PDS_Data_Block_Listdata_blocks (const char **excluded=NULL, const char **image_block_names=NULL)
 Get a list of all binary data blocks in the PDS data. More...
 
idaeim::PVL::Parameterfind_parameter (const std::string &pathname, bool case_sensitive=false, int skip=0, Parameter_Class_Selection parameter_class=ANY_PARAMETER) const
 Find a named Parameter. More...
 
virtual PDS_Dataparameters (const std::string &pathname)
 Set the parameters from a source file. More...
 
virtual PDS_Dataparameters (const idaeim::PVL::Aggregate &parameters)
 Set the parameters from a Parameter Aggregate. More...
 
idaeim::PVL::Parameterremove_parameter (const std::string &pathname, bool case_sensitive=false, int skip=0, Parameter_Class_Selection parameter_class=ANY_PARAMETER)
 Removes a named Parameter. More...
 
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. More...
 
double numeric_value (const std::string &pathname, bool case_sensitive=false, int skip=0) const
 Get the numeric value of a named parameter. More...
 
std::string string_value (const std::string &pathname, bool case_sensitive=false, int skip=0) const
 Get the string value of a named parameter. More...
 
- Public Member Functions inherited from Aggregate
Aggregateadd (const Parameter &parameter)
 
Aggregateadd (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 &parameter)
 
Depth_Iterator begin_depth ()
 
Aggregateclone () const
 
int compare (const Parameter &parameter) const
 
Aggregatecopy_in (const Aggregate &aggregate)
 
Depth_Iterator end_depth ()
 
void entering (Parameter *parameter)
 
Parameterfind (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
 
Aggregatemove_in (Aggregate &aggregate)
 
Aggregateoperator= (const Parameter &parameter)
 
Aggregateoperator= (const Aggregate &parameter)
 
Aggregateoperator= (const Assignment &parameter)
 
Aggregateoperator= (const Value &value)
 
const Parameteroperator[] (unsigned int index) const
 
Parameteroperator[] (unsigned int index)
 
void read (std::istream &in=std::cin)
 
void read (Parser &parser)
 
Parameterremove (size_type index)
 
Parameterremove (Parameter *parameter)
 
Parameterremove (iterator position)
 
Parameterremove_depth (Parameter *parameter)
 
void removing (Parameter *parameter)
 
size_type total_size ()
 
Aggregatetype (const int type)
 
Type type () const
 
std::string type_name () const
 
Valuevalue () 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
 
Parametercomment (const std::string &comment)
 
bool has_children () const
 
Parameterindenting (const MODE_STATE state, const WHICH_MODE which=LOCAL_MODE_SET)
 
Parameterindenting (const bool enable)
 
MODE_STATE indenting (const WHICH_MODE which=RECURSIVE_MODE_SET) const
 
virtual bool is_Assignment () const
 
virtual bool is_Token () const
 
Parametermode_state (const MODE mode, const MODE_STATE state, const WHICH_MODE which=LOCAL_MODE_SET)
 
const MODE_STATEmode_state (const WHICH_MODE which=LOCAL_MODE_SET) const
 
MODE_STATE mode_state (const MODE mode, const WHICH_MODE which=RECURSIVE_MODE_SET) const
 
Parametermode_state (const MODE_STATE *const modes, const WHICH_MODE which=LOCAL_MODE_SET)
 
std::string name () const
 
Parametername (const std::string &name)
 
bool operator!= (const Parameter &parameter) const
 
bool operator< (const Parameter &parameter) const
 
bool operator<= (const Parameter &parameter) const
 
bool operator== (const Parameter &parameter) const
 
bool operator> (const Parameter &parameter) const
 
bool operator>= (const Parameter &parameter) const
 
 Parameter (const Parameter &parameter)
 
 Parameter (const std::string &name="")
 
Aggregateparent () 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
 
Aggregateroot () const
 
MODE_STATE verbatim_strings (const WHICH_MODE which=RECURSIVE_MODE_SET) const
 
Parameterverbatim_strings (const bool enable)
 
Parameterverbatim_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)
 
Vectaloperator= (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)
 
Basevector_base ()
 
void wipe ()
 
virtual ~Vectal ()
 

Static Public Member Functions

static Image_Data_Blockimage_data (PDS_Data_Block_List *data_block_list)
 Get the Image_Data_Block from a PDS_Data::PDS_Data_Block_List. More...
 
- 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)
 

Static Public Attributes

static const char *const ID
 Class identification name with source code version and date. More...
 
static const char * PDS_ID_PARAMETER_NAME = "PDS_VERSION_ID"
 Name of the parameter providing the PDS ID. More...
 
static const char * RECORD_TYPE_PARAMETER_NAME = "RECORD_TYPE"
 Name of the parameter specifying the type of label records. More...
 
static const char * BYTE_RECORD_TYPE = "UNDEFINED"
 The record type used to define byte count based records. More...
 
static const char * FIXED_LENGTH_RECORD_TYPE = "FIXED_LENGTH"
 The record type used to define fixed length records. More...
 
static const char * LABEL_RECORDS_PARAMETER_NAME = "LABEL_RECORDS"
 Name of the parameter specifying the number of records in the label. More...
 
static const char * RECORD_BYTES_PARAMETER_NAME = "RECORD_BYTES"
 Name of the parameter specifying the number of bytes per record. More...
 
static const char * FILE_RECORDS_PARAMETER_NAME = "FILE_RECORDS"
 Name of the parameter specifying the number of records in the file. More...
 
static const char * INTERCHANGE_FORMAT_PARAMETER_NAME = "INTERCHANGE_FORMAT"
 Name of the parameter indicating the data format. More...
 
static const char * IMAGE_DATA_BLOCK_NAME = "IMAGE"
 Name of the Image_Data_Block parameter group. More...
 
static const char * BYTES_UNITS = "BYTES"
 Units name for storage measured in bytes. More...
 
static const char RECORD_POINTER_PARAMETER_MARKER = '^'
 Record pointer parameter prefix. More...
 
- 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
 

Additional Inherited Members

- 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
 
- Protected Member Functions inherited from Vectal< Parameter >
virtual void entering (pointer value_pointer)
 
virtual void removing (pointer value_pointer)
 
- Protected Attributes inherited from Parameter
std::string Comment
 
MODE_STATE Modes [TOTAL_LOCAL_MODES]
 
std::string Name
 
AggregateParent
 
- Static Protected Attributes inherited from Parameter
static bool Case_Sensitive
 
static MODE_STATE DEFAULT_MODES [TOTAL_LOCAL_MODES]
 
static char Path_Delimiter
 

Detailed Description

PDS_Data contains PDS label PVL parameters.

Common PDS label description constants and methods to locate and modify the label parameters to assist in label conversion operations are provided.

Author
Bradford Castalia, Drew Davidson and Ben Pearson; UA/HiROC
Version
1.26
See also
idaeim::PVL::Aggregate

Member Typedef Documentation

◆ PDS_Data_Block_List

typedef std::vector<PDS_Data_Block*> PDS_Data_Block_List

A vector of PDS_Data_Block object pointers.

Member Enumeration Documentation

◆ Parameter_Class_Selection

Selects the class of parameter to find.

Enumerator
AGGREGATE_PARAMETER 
ANY_PARAMETER 
ASSIGNMENT_PARAMETER 

Constructor & Destructor Documentation

◆ PDS_Data() [1/4]

PDS_Data ( )

Construct PDS_Data with no parameters.

Referenced by Generic_PDS_Converter::write_PDS_label().

◆ PDS_Data() [2/4]

PDS_Data ( const idaeim::PVL::Aggregate parameters)

Construct PDS_Data from a PVL Parameter Aggregate.

Parameters
parametersA Parameter Aggregate that provides the PDS data parameters.

References Parameter::name(), and PDS_Data::parameters().

◆ PDS_Data() [3/4]

PDS_Data ( const idaeim::PVL::Aggregate parameters,
const std::string &  detached 
)

Construct PDS_Data from a PVL Parameter Aggregate.

Parameters
parametersA Parameter Aggregate that provides the PDS data parameters.

References Parameter::name(), and PDS_Data::parameters().

◆ PDS_Data() [4/4]

PDS_Data ( const std::string &  pathname)
explicit

Construct PDS_Data from a named file.

Parameters
pathnameThe pathname to the source file that will be parsed for PVL parameters.
See also
parameters(const std::string&)

References PDS_Data::parameters(), and Parameter::pathname().

Member Function Documentation

◆ data_blocks()

PDS_Data::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.

A binary data block is located by a data block record pointer parameter. A record pointer parameter has a name that begins with the RECORD_POINTER_PARAMETER_MARKER character. If a parameter Aggregate with the same name, but without the record pointer marker, is found it is used to construct a new PDS_Data_Block object that is added to the list of data blocks. N.B.: Each PDS_Data_Block contains a copy of the data block description parameters.

The value of a record pointer parameter is the location of the data block in the file in terms of records. The size of a record is assumed to be one byte unless a parameter with the RECORD_BYTES_PARAMETER_NAME is found in which case its value is the size of a record. The location of the data block in the file as a byte offset, which is used when constructing the PDS_Data_Block to add to the PDS_Data_Block_List, is the record pointer value times the record size.

N.B.: Only top level parameters are searched.

Parameters
excludedA NULL terminated array of data block names (character strings) that are to be excluded from the list of data blocks that are assembled. N.B.: The data block names do not include the RECORD_POINTER_PARAMETER_MARKER.
image_block_namesA NULL terminated array of data block names (character strings) that, if found, are to be treated as Image_Data_Block parameter groups. The IMAGE_DATA_BLOCK_NAME parameter group is always treated as an Image_Data_Block.
Returns
A pointer to a PDS_Data_Block_List, which is a vector of PDS_Data_Block pointers.

References Vectal< Parameter >::begin(), Vectal< Parameter >::end(), PDS_Data::find_parameter(), PDS_Data::IMAGE_DATA_BLOCK_NAME, Parameter::is_Aggregate(), PDS_Data::RECORD_BYTES_PARAMETER_NAME, PDS_Data::RECORD_POINTER_PARAMETER_MARKER, and Parameter::value().

Referenced by PDS_Converter::image_data(), and PDS_Converter::PDS_Converter().

◆ find_parameter()

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.

The Parameter to be found may be specified by a simple name, a relative pathname or an absolute pathname. A simple name is the name of a Parameter itself. A relative pathname is a simple name preceeded by the pathname of an Aggregate Parameter that must contain the Parameter with the simple name. An absolute pathname is a pathname that begins with a pathname delimiter ('/'); i.e. it is a fully qualified pathname beginning at the root of the Aggregate hierarchy, compared to a relative pathname that may begin at any Aggregate in the hierarchy.

Since it is not necessary that the pathname to each Parameter be unique, the number of matching pathnames to skip before selecting a Parameter may need to be specified to get the desired Parameter. Also, a specific type of Parameter - an Aggregate of Parameters or an Assignment of Values - may be specified. When skipping parameters, only the specified type, if any, are counted.

Parameters
pathnameThe pathname of the parameter to find.
case_sensitiveIf true, the name search is case sensitive; case insensitive otherwise.
skipThe number of parameters that match the name to skip before selecting a matching parameter.
parameter_classA Parameter_Class_Selection: If AGGREGATE_PARAMETER, only Aggregate parameters will be selected; if ASSIGNMENT_PARAMETER, only Assignment parameters will be selected; otherwise any type of parameter (ANY_PARAMETER) is acceptable.
Returns
A pointer to the matching parameter, or NULL if it could not be found.
See also
find_parameter(const idaeim::PVL::Aggregate&, const std::string&, bool, int, Parameter_Class_Selection)

References Parameter::case_sensitive(), UA::HiRISE::find_parameter(), and Parameter::pathname().

Referenced by Image_Data_Block::data_block_size(), PDS_Data_Block::data_block_size(), PDS_Data::data_blocks(), PDS_Converter::image_data(), PDS_Projection_Data::initialize_geo_transform(), PDS_Projection_Data::initialize_spatial_reference(), HiPrecision_PDS_Converter::label_recognized(), HiRISE_PDS_Converter::label_recognized(), PDS_Data::numeric_value(), PDS_Data::parameter_value(), HiPrecision_PDS_Converter::product_names(), HiRISE_PDS_Converter::product_names(), PDS_Data::string_value(), and HiRISE_PDS_Converter::write_PDS_label().

◆ parameters() [1/2]

PDS_Data & parameters ( const std::string &  pathname)
virtual

Set the parameters from a source file.

The current parameters are cleared before the new parameters are moved in, but not before the new parameters have been successfully obtained from the source file.

N.B.: The name of the parameters group is set to the source file pathname.

Parameters
pathnameThe pathname to the source file that will be parsed for PVL parameters.
Returns
This PDS_Data object.
Exceptions
std::ios::failureIf the source file can not be accessed or read.
idaeim::PVL::Invalid_SyntaxIf the source file contains contains invalid PVL syntax.
See also
idaeim::PVL::Parser

Reimplemented in PDS_Projection_Data.

References Parameter::Aggregate, Vectal< Parameter >::clear(), PDS_Data::ID, Aggregate::move_in(), Parameter::name(), and Parameter::pathname().

Referenced by Generic_PDS_Converter::parameter_of(), PDS_Projection_Data::parameters(), PDS_Data::PDS_Data(), PDS_Data_Block::PDS_Data_Block(), Generic_PDS_Converter::write_PDS_JP2_label(), HiPrecision_PDS_Converter::write_PDS_JP2_label(), HiRISE_PDS_Converter::write_PDS_JP2_label(), HiPrecision_PDS_Converter::write_PDS_label(), and HiRISE_PDS_Converter::write_PDS_label().

◆ parameters() [2/2]

PDS_Data & parameters ( const idaeim::PVL::Aggregate parameters)
virtual

Set the parameters from a Parameter Aggregate.

The current parameters are cleared before the new parameters are moved in.

N.B.: The name of the parameters group is set to the name of the Parameter Aggregate.

Parameters
parametersA Parameter Aggregate that is the source of new parameters.
Returns
This PDS_Data object.

Reimplemented in PDS_Projection_Data.

References Vectal< Parameter >::clear(), Aggregate::copy_in(), and Parameter::name().

◆ remove_parameter()

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.

Parameters
pathnameThe name of the parameter to find.
case_sensitiveIf true, the name search is case sensitive; case insensitive otherwise.
skipThe number of parameters that match the name to skip before selecting a matching parameter.
parameter_classA Parameter_Class_Selection: If AGGREGATE_PARAMETER, only Aggregate parameters will be selected; if ASSIGNMENT_PARAMETER, only Assignment parameters will be selected; otherwise any type of parameter (ANY_PARAMETER) is acceptable.
Returns
A pointer to the parameter that was removed, or NULL if it could not be found.
See also
find_parameter(const std::string&, bool, int, Parameter_Class_Selection)

References Parameter::case_sensitive(), Parameter::pathname(), and UA::HiRISE::remove_parameter().

Referenced by Generic_PDS_Converter::write_PDS_JP2_label(), and Generic_PDS_Converter::write_PDS_label().

◆ parameter_value()

bool parameter_value ( const std::string &  pathname,
T &  value,
bool  case_sensitive = false,
int  skip = 0 
)
inline

Set the value of a named parameter.

Only Assignment Parameters with a Value that is not an Array will be modified. However, the search for a matching name does not make this distinction.

Parameters
pathnameThe name of the parameter to find.
valueThe value to assign to the parameter.
case_sensitiveIf true, the name search is case sensitive; case insensitive otherwise.
skipThe number of parameters that match the pathname to skip before selecting the parameter to modify.
Returns
true if the parameter was found; false otherwise.
See also
find_parameter(const std::string&, bool, int, Parameter_Class_Selection)

References PDS_Data::ASSIGNMENT_PARAMETER, Parameter::case_sensitive(), PDS_Data::find_parameter(), Value::is_Array(), Parameter::pathname(), Aggregate::value(), and Parameter::value().

Referenced by HiPrecision_PDS_Converter::data_set_version(), HiRISE_PDS_Converter::data_set_version(), and main().

◆ numeric_value()

double numeric_value ( const std::string &  pathname,
bool  case_sensitive = false,
int  skip = 0 
) const

Get the numeric value of a named parameter.

Parameters
pathnameThe name of the parameter to find.
case_sensitiveIf true, the name search is case sensitive; case insensitive otherwise.
skipThe number of parameters that match the pathname to skip before selecting the parameter to modify.
Returns
The value of the parameter as a double.
Exceptions
idaeim::Invalid_ArgumentIf an assignment parameter can not be found at the pathname.
idaeim::PVL_Invalid_ValueIf the Value is not Numeric.
See also
find_parameter(const std::string&, bool, int, Parameter_Class_Selection)

References PDS_Data::ASSIGNMENT_PARAMETER, Parameter::case_sensitive(), PDS_Data::find_parameter(), PDS_Data::ID, UA::HiRISE::numeric_value(), and Parameter::pathname().

Referenced by PDS_Projection_Data::initialize_geo_transform(), PDS_Projection_Data::initialize_spatial_reference(), and PDS_Projection_Data::JP2_GML().

◆ string_value()

std::string string_value ( const std::string &  pathname,
bool  case_sensitive = false,
int  skip = 0 
) const

Get the string value of a named parameter.

Parameters
pathnameThe name of the parameter to find.
case_sensitiveIf true, the name search is case sensitive; case insensitive otherwise.
skipThe number of parameters that match the pathname to skip before selecting the parameter to modify.
Returns
The string value of the parameter.
Exceptions
idaeim::Invalid_ArgumentIf an assignment parameter can not be found at the pathname.
idaeim::PVL_Invalid_ValueIf the Value is not a String.
See also
find_parameter(const idaeim::PVL::Aggregate&, const std::string&, bool, int, Parameter_Class_Selection)

References PDS_Data::ASSIGNMENT_PARAMETER, Parameter::case_sensitive(), PDS_Data::find_parameter(), PDS_Data::ID, Parameter::pathname(), and UA::HiRISE::string_value().

Referenced by HiPrecision_PDS_Converter::data_set_version(), HiRISE_PDS_Converter::data_set_version(), and PDS_Projection_Data::initialize_spatial_reference().

◆ image_data()

Image_Data_Block * image_data ( PDS_Data_Block_List data_block_list)
static

Get the Image_Data_Block from a PDS_Data::PDS_Data_Block_List.

The data block list, if non-NULL, is searched for the first entry having the IMAGE_DATA_BLOCK_NAME that is an Image_Data_Block.

Parameters
data_block_listA pointer to a PDS_Data_Block_List to be searched. May be NULL.
Returns
A pointer to the Image_Data_Block, or NULL if none can be found.
Exceptions
logic_errorIf an entry with the IMAGE_DATA_BLOCK_NAME is found but it is not an Image_Data_Block.
See also
data_blocks(const char**)

References PDS_Data::ID, and PDS_Data::IMAGE_DATA_BLOCK_NAME.

Referenced by PDS_Converter::image_data(), and PDS_Converter::operator=().

Member Data Documentation

◆ ID

const char *const ID
static
Initial value:
=
"UA::HiRISE::PDS_Data (1.27 2013/03/14 21:00:43)"

Class identification name with source code version and date.

Referenced by PDS_Data::image_data(), UA::HiRISE::numeric_value(), PDS_Data::numeric_value(), PDS_Data::parameters(), UA::HiRISE::string_value(), and PDS_Data::string_value().

◆ PDS_ID_PARAMETER_NAME

const char * PDS_ID_PARAMETER_NAME = "PDS_VERSION_ID"
static

Name of the parameter providing the PDS ID.

Referenced by Generic_PDS_Converter::write_PDS_label().

◆ RECORD_TYPE_PARAMETER_NAME

const char * RECORD_TYPE_PARAMETER_NAME = "RECORD_TYPE"
static

Name of the parameter specifying the type of label records.

Referenced by PDS_Converter::PDS_JP2_image_parameters(), and Generic_PDS_Converter::write_PDS_label().

◆ BYTE_RECORD_TYPE

const char * BYTE_RECORD_TYPE = "UNDEFINED"
static

The record type used to define byte count based records.

Referenced by PDS_Converter::PDS_JP2_image_parameters(), and Generic_PDS_Converter::write_PDS_label().

◆ FIXED_LENGTH_RECORD_TYPE

const char * FIXED_LENGTH_RECORD_TYPE = "FIXED_LENGTH"
static

The record type used to define fixed length records.

Referenced by PDS_Converter::PDS_JP2_image_parameters().

◆ LABEL_RECORDS_PARAMETER_NAME

const char * LABEL_RECORDS_PARAMETER_NAME = "LABEL_RECORDS"
static

Name of the parameter specifying the number of records in the label.

Referenced by Generic_PDS_Converter::write_PDS_label().

◆ RECORD_BYTES_PARAMETER_NAME

const char * RECORD_BYTES_PARAMETER_NAME = "RECORD_BYTES"
static

Name of the parameter specifying the number of bytes per record.

Referenced by PDS_Data::data_blocks(), and PDS_Converter::PDS_JP2_image_parameters().

◆ FILE_RECORDS_PARAMETER_NAME

const char * FILE_RECORDS_PARAMETER_NAME = "FILE_RECORDS"
static

Name of the parameter specifying the number of records in the file.

Referenced by PDS_Converter::PDS_JP2_image_parameters().

◆ INTERCHANGE_FORMAT_PARAMETER_NAME

const char * INTERCHANGE_FORMAT_PARAMETER_NAME = "INTERCHANGE_FORMAT"
static

Name of the parameter indicating the data format.

Referenced by PDS_Converter::PDS_JP2_image_parameters().

◆ IMAGE_DATA_BLOCK_NAME

const char * IMAGE_DATA_BLOCK_NAME = "IMAGE"
static

◆ BYTES_UNITS

const char * BYTES_UNITS = "BYTES"
static

Units name for storage measured in bytes.

Referenced by PDS_Converter::PDS_JP2_image_parameters().

◆ RECORD_POINTER_PARAMETER_MARKER

const char RECORD_POINTER_PARAMETER_MARKER = '^'
static

Record pointer parameter prefix.

When this character is the first character of a parameter name it is marked as a record pointer parameter for a data block. An associated group of parameters having the same name, but without the initial marker character, is expected to be present that describes the content of the data block.

Referenced by PDS_Data::data_blocks(), PDS_Converter::PDS_JP2_image_parameters(), Generic_PDS_Converter::write_PDS_JP2_label(), and Generic_PDS_Converter::write_PDS_label().


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