NitfDesSubheader.h

Go to the documentation of this file.
00001 /*
00002  * The information in this file is
00003  * Copyright(c) 2007 Ball Aerospace & Technologies Corporation
00004  * and is subject to the terms and conditions of the
00005  * GNU Lesser General Public License Version 2.1
00006  * The license text is available from   
00007  * http://www.gnu.org/licenses/lgpl.html
00008  */
00009 
00010 #ifndef NITFDESSUBHEADER_H
00011 #define NITFDESSUBHEADER_H
00012 
00013 #include "NitfHeader.h"
00014 #include <memory>
00015 #include <string>
00016 
00017 class ossimNitfDesHeaderV2_X;
00018 class RasterDataDescriptor;
00019 class ossimContainerProperty;
00020 
00021 namespace Nitf
00022 {
00023    /**
00024     * Represents the NITF DES subheader.
00025     */
00026    class DesSubheader : public Header
00027    {
00028    public:
00029       /**
00030        * Constructs the DesSubheader.
00031        *
00032        * @param fileVersion
00033        *        Either Nitf::VERSION_02_00 or Nitf::VERSION_02_10.
00034        * @param index
00035        *        The index of this DES.
00036        */
00037       DesSubheader(const std::string& fileVersion, unsigned int index);
00038 
00039       /**
00040        * Adds NITF DesSubheader metadata to the DynamicObject.
00041        *
00042        * @param pHeader
00043        *        The source of the metadata.
00044        * @param pDescriptor
00045        *        The destination for the metadata.
00046        *
00047        * @return \c True on success, \c false otherwise.
00048        */
00049       bool importMetadata(const ossimPropertyInterface* pHeader, RasterDataDescriptor* pDescriptor);
00050 
00051       std::string getMetadataPath() const;
00052 
00053       FactoryResource<DynamicObject> createDefaultsDynamicObject(const RasterDataDescriptor* pDescriptor);
00054 
00055    protected: // special import/export code
00056       /**
00057        * @copydoc Nitf::Header::exportMetadataValue()
00058        *
00059        * <b>This function is specialized for exporting classification strings.</b>
00060        */
00061       static bool exportClassificationString(const RasterDataDescriptor* pDescriptor,
00062          const DataVariant& prop,
00063          ossimContainerProperty* pProperties, const std::string& appName,
00064          const std::string& ossimName);
00065 
00066       /**
00067        * @copydoc Nitf::Header::exportMetadataValue()
00068        *
00069        * <b>This function is specialized for exporting classification dates and times.</b>
00070        */
00071       static bool exportClassificationDate(const RasterDataDescriptor* pDescriptor,
00072          const DataVariant& prop,
00073          ossimContainerProperty* pProperties, const std::string& appName,
00074          const std::string& ossimName);
00075 
00076    private:
00077       DesSubheader& operator=(const DesSubheader& rhs);
00078 
00079       const unsigned int mIndex;
00080    };
00081 }
00082 
00083 #endif

Software Development Kit - Opticks 4.9.0 Build 16218