~ubuntu-branches/ubuntu/precise/exiv2/precise

« back to all changes in this revision

Viewing changes to src/tiffparser.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2006-12-07 18:40:10 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20061207184010-0ouu8v0dr8nznob9
Tags: 0.12-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
/*!
22
22
  @file    tiffparser.hpp
23
23
  @brief   Class TiffParser to parse TIFF data.
24
 
  @version $Rev: 808 $
 
24
  @version $Rev: 837 $
25
25
  @author  Andreas Huggel (ahu)
26
26
           <a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
27
27
  @date    15-Mar-06, ahu: created
31
31
 
32
32
// *****************************************************************************
33
33
// included header files
34
 
#include "tiffcomposite.hpp"
 
34
#include "tifffwd.hpp"
35
35
#include "types.hpp"
36
36
 
37
37
// + standard includes
43
43
namespace Exiv2 {
44
44
 
45
45
// *****************************************************************************
46
 
// class declarations
47
 
 
48
 
    class Image;
49
 
 
50
 
// *****************************************************************************
51
46
// class definitions
52
47
 
53
48
    /*!
63
58
          is created.  If the pointer that is returned is 0, then the TIFF entry
64
59
          should be ignored.
65
60
        */
66
 
        static TiffComponent::AutoPtr create(uint32_t extendedTag,
67
 
                                             uint16_t group);
 
61
        static std::auto_ptr<TiffComponent> create(uint32_t extendedTag,
 
62
                                                   uint16_t group);
68
63
 
69
64
    private:
70
65
        static const TiffStructure tiffStructure_[]; //<! TIFF structure
90
85
                           in TIFF format; no checks are performed.
91
86
          @param size      Length of the data buffer.
92
87
          @param createFct Factory function to create new TIFF components.
 
88
          @param findDecoderFct Function to access special decoding info.
93
89
        */
94
90
        static void decode(      Image*             pImage,
95
91
                           const byte*              pData,
96
92
                                 uint32_t           size,
97
 
                                 TiffCompFactoryFct createFct);
 
93
                                 TiffCompFactoryFct createFct,
 
94
                                 FindDecoderFct     findDecoderFct);
98
95
    }; // class TiffParser
99
96
 
 
97
    /*!
 
98
      @brief Table of TIFF decoding functions and find function.
 
99
             This class is separated from the metadata decoder visitor so that
 
100
             the parser can be parametrized with a different table if needed.
 
101
             This is used, eg., for CR2 format, which uses a different decoder
 
102
             table.
 
103
     */
 
104
    class TiffDecoder {
 
105
    public:
 
106
        /*!
 
107
          @brief Find the decoder function for a key. 
 
108
 
 
109
          If the returned pointer is 0, the tag should not be decoded, 
 
110
          else the decoder function should be used.
 
111
 
 
112
          @param make Camera make
 
113
          @param extendedTag Extended tag
 
114
          @param group %Group
 
115
 
 
116
          @return Pointer to the decoder function
 
117
         */
 
118
        static const DecoderFct findDecoder(const std::string& make, 
 
119
                                                  uint32_t     extendedTag,
 
120
                                                  uint16_t     group);
 
121
 
 
122
    private:
 
123
        static const TiffDecoderInfo tiffDecoderInfo_[]; //<! TIFF decoder table
 
124
 
 
125
    }; // class TiffDecoder
 
126
 
100
127
}                                       // namespace Exiv2
101
128
 
102
129
#endif                                  // #ifndef TIFFPARSER_HPP_