radarlib  1.4.6
OdimH5v20::OdimObject Class Reference

Generic OdimH5 v2.0 object. More...

#include <radarlib/odimh5v20_classes.hpp>

Inheritance diagram for OdimH5v20::OdimObject:
OdimH5v20::WHATRootMetadata OdimH5v20::Object_2D OdimH5v20::PolarVolume OdimH5v20::HorizontalObject_2D OdimH5v20::XsecObject OdimH5v20::CompObject OdimH5v20::ImageObject

Public Member Functions

virtual std::string getConventions ()
 Get OdimH5 conventions attribute value. More...
 
virtual void setConventions ()
 Set OdimH5 conventions attribute value to the value required by OdimH5 specification. More...
 
virtual H5::H5File * getFile ()
 Get the associated HDF5 file object. More...
 
virtual H5::Group * getH5Object ()
 Get the HDF5 group associated to this object. More...
 
virtual bool existWhat ()
 Test is the WHAT attributes group exist. More...
 
virtual bool existWhere ()
 Test is the WHERE attributes group exist. More...
 
virtual bool existHow ()
 Test is the HOW attributes group exist. More...
 
virtual MetadataGroupgetWhat ()
 Get the WHAT attributes group. More...
 
virtual MetadataGroupgetWhere ()
 Get the WHERE attributes group. More...
 
virtual MetadataGroupgetHow ()
 Get the HOW attributes group. More...
 
virtual std::string getObject ()
 Get the value of 'object' attribute. More...
 
virtual void setObject (const std::string &val)
 Set the value of 'object' attribute. More...
 
virtual std::string getVersion ()
 Get the value of 'version' attribute. More...
 
virtual void setVersion (const std::string &val)
 Set the value of 'version' attribute. More...
 
virtual time_t getDateTime ()
 Get the joined value of 'date' and 'time' attributes. More...
 
virtual void setDateTime (const time_t val)
 Set the value of 'date' and 'time' attributes. More...
 
virtual SourceInfo getSource ()
 Get the value of 'source' attribute. More...
 
virtual void setSource (const SourceInfo &val)
 Set the value of 'source' attribute. More...
 
virtual int getDatasetCount ()
 Get the number of datasets in the file. More...
 
virtual OdimDatasetcreateDataset ()
 Create a new dataset. More...
 
virtual OdimDatasetgetDataset (int index)
 Get a dataset. More...
 
virtual void removeDataset (int index)
 Delete a odim dataset group from the odim object. More...
 

Detailed Description

Generic OdimH5 v2.0 object.

All OdimH5 objects have the same general structure.
This class allows users to manipulate OdimH5 objects in the most generic way.
This means that users can manipulate only Odim datasets and common mandatory attributes.
Only mandatory informations common to every OdimH5 objects are automatic written or checked by the internal implementatino.
Users are responsible for manipulating informations following OdimH5 specifications.

See also
OdimDataset
Examples:
create_delete.cpp, create_odim_object.cpp, dump_object.cpp, image-visitor.cpp, odimh5scanner.cpp, read_attributes.cpp, and visitor.cpp.

Member Function Documentation

◆ getConventions()

std::string OdimH5v20::OdimObject::getConventions ( )
virtual

Get OdimH5 conventions attribute value.

Exceptions
OdimH5Exceptionif an unexpected error occurs
Examples:
read_polar_volume.cpp, read_polar_volume2.cpp, and read_polar_volume_scans.cpp.

◆ setConventions()

void OdimH5v20::OdimObject::setConventions ( )
virtual

Set OdimH5 conventions attribute value to the value required by OdimH5 specification.

Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ getFile()

H5::H5File * OdimH5v20::OdimObject::getFile ( )
virtual

Get the associated HDF5 file object.

Get the associated HDF5 file object

Remarks
user must not delete this object
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ getH5Object()

H5::Group * OdimH5v20::OdimObject::getH5Object ( )
virtual

Get the HDF5 group associated to this object.

Get the HDF5 group associated to this object

Remarks
user must not delete this object
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ existWhat()

bool OdimH5v20::OdimObject::existWhat ( )
virtual

Test is the WHAT attributes group exist.

Check if the WHAT attributes group of this object exist.

Exceptions
OdimH5Exceptionif an unexpected error occurs
Examples:
image-visitor.cpp.

◆ existWhere()

bool OdimH5v20::OdimObject::existWhere ( )
virtual

Test is the WHERE attributes group exist.

Check if the WHERE attributes group of this object exist.

Exceptions
OdimH5Exceptionif an unexpected error occurs
Examples:
image-visitor.cpp.

◆ existHow()

bool OdimH5v20::OdimObject::existHow ( )
virtual

Test is the HOW attributes group exist.

Check if the HOW attributes group of this object exist.

Exceptions
OdimH5Exceptionif an unexpected error occurs
Examples:
image-visitor.cpp.

◆ getWhat()

MetadataGroup * OdimH5v20::OdimObject::getWhat ( )
virtual

Get the WHAT attributes group.

Get the WHAT attributes group of this object. If it does not exist it will be created

Remarks
user must not delete this object
Exceptions
OdimH5Exceptionif an unexpected error occurs
Examples:
copy_polar_volume_attributes.cpp, image-visitor.cpp, read_attributes.cpp, and write_attributes.cpp.

◆ getWhere()

MetadataGroup * OdimH5v20::OdimObject::getWhere ( )
virtual

Get the WHERE attributes group.

Get the WHERE attributes group of this object. If it does not exist it will be created

Remarks
user must not delete this object
Exceptions
OdimH5Exceptionif an unexpected error occurs
Examples:
copy_polar_volume_attributes.cpp, and image-visitor.cpp.

◆ getHow()

MetadataGroup * OdimH5v20::OdimObject::getHow ( )
virtual

Get the HOW attributes group.

Get the HOW attributes group of this object. If it does not exist it will be created

Remarks
user must not delete this object
Exceptions
OdimH5Exceptionif an unexpected error occurs
Examples:
copy_polar_volume_attributes.cpp, create_polar_volume.cpp, and image-visitor.cpp.

◆ getObject()

std::string OdimH5v20::OdimObject::getObject ( )
virtual

Get the value of 'object' attribute.

Exceptions
OdimH5Exceptionif an unexpected error occurs

Implements OdimH5v20::WHATRootMetadata.

Examples:
image-visitor.cpp, odimh5scanner.cpp, read_attributes.cpp, read_polar_volume.cpp, read_polar_volume2.cpp, read_polar_volume_scans.cpp, and visitor.cpp.

◆ setObject()

void OdimH5v20::OdimObject::setObject ( const std::string &  val)
virtual

Set the value of 'object' attribute.

Parameters
valthe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs

Implements OdimH5v20::WHATRootMetadata.

Examples:
create_delete.cpp, create_odim_object.cpp, and write_attributes.cpp.

◆ getVersion()

std::string OdimH5v20::OdimObject::getVersion ( )
virtual

Get the value of 'version' attribute.

Exceptions
OdimH5Exceptionif an unexpected error occurs

Implements OdimH5v20::WHATRootMetadata.

Examples:
read_polar_volume.cpp, read_polar_volume2.cpp, and read_polar_volume_scans.cpp.

◆ setVersion()

void OdimH5v20::OdimObject::setVersion ( const std::string &  val)
virtual

Set the value of 'version' attribute.

Parameters
valthe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs

Implements OdimH5v20::WHATRootMetadata.

◆ getDateTime()

time_t OdimH5v20::OdimObject::getDateTime ( )
virtual

Get the joined value of 'date' and 'time' attributes.

Get the joined value of 'date' and 'time' attributes in a single time_t value

Exceptions
OdimH5Exceptionif an unexpected error occurs

Implements OdimH5v20::WHATRootMetadata.

Examples:
image-visitor.cpp, odimh5scanner.cpp, read_attributes.cpp, read_polar_volume.cpp, read_polar_volume2.cpp, and read_polar_volume_scans.cpp.

◆ setDateTime()

void OdimH5v20::OdimObject::setDateTime ( const time_t  val)
virtual

Set the value of 'date' and 'time' attributes.

Set the value of 'date' and 'time' attributes using the given time_t value

Parameters
valthe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs

Implements OdimH5v20::WHATRootMetadata.

Examples:
create_polar_volume.cpp, and write_attributes.cpp.

◆ getSource()

SourceInfo OdimH5v20::OdimObject::getSource ( )
virtual

Get the value of 'source' attribute.

Returns
A SourceInfo object ottained parsing the 'source' attribute
Exceptions
OdimH5Exceptionif an unexpected error occurs

Implements OdimH5v20::WHATRootMetadata.

Examples:
odimh5scanner.cpp, read_polar_volume.cpp, read_polar_volume2.cpp, and read_polar_volume_scans.cpp.

◆ setSource()

void OdimH5v20::OdimObject::setSource ( const SourceInfo val)
virtual

Set the value of 'source' attribute.

Set the value of 'source' attribute according to OdimH5 format, using the values stored in a SourceInfo object

Parameters
valthe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs

Implements OdimH5v20::WHATRootMetadata.

Examples:
create_polar_volume.cpp.

◆ getDatasetCount()

int OdimH5v20::OdimObject::getDatasetCount ( )
virtual

Get the number of datasets in the file.

Get the number of datasets in the odim object

Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ createDataset()

OdimDataset * OdimH5v20::OdimObject::createDataset ( )
virtual

Create a new dataset.

Create a new dataset in the odim object

Returns
the new OdimDataset object associated to the new HDF5 group
Exceptions
OdimH5Exceptionif an unexpected error occurs
Remarks
User is responsible for deleting the returned object

◆ getDataset()

OdimDataset * OdimH5v20::OdimObject::getDataset ( int  index)
virtual

Get a dataset.

Get the existing dataset with the given index

Parameters
indexthe dataset index from 0 to n-1
Returns
the OdimDataset object associated to the new HDF5 group or NULL if the dataset does not exist
Exceptions
OdimH5Exceptionif an unexpected error occurs
Remarks
User is responsible for deleting the returned object

◆ removeDataset()

void OdimH5v20::OdimObject::removeDataset ( int  index)
virtual

Delete a odim dataset group from the odim object.

Delete the odim dataset with the given index. Nothing is done if the dataset does not exist

Parameters
indexthe dataset index from 0 to n-1
Exceptions
OdimH5Exceptionif an unexpected error occurs
Remarks
User is responsible for deleting the returned object

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