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

« back to all changes in this revision

Viewing changes to src/iptc.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:
20
20
 */
21
21
/*!
22
22
  @file    iptc.hpp
23
 
  @brief   Encoding and decoding of Iptc data
24
 
  @version $Rev: 801 $
 
23
  @brief   Encoding and decoding of IPTC data
 
24
  @version $Rev: 988 $
25
25
  @author  Brad Schick (brad)
26
26
           <a href="mailto:brad@robotbattle.com">brad@robotbattle.com</a>
27
27
  @date    31-Jul-04, brad: created
49
49
// class definitions
50
50
 
51
51
    /*!
52
 
      @brief Information related to one Iptc dataset. An Iptc metadatum consists
 
52
      @brief Information related to one IPTC dataset. An IPTC metadatum consists
53
53
             of an IptcKey and a Value and provides methods to manipulate these.
54
54
     */
55
55
    class Iptcdatum : public Metadatum {
267
267
    }; // class FindMetadatumById
268
268
 
269
269
    /*!
270
 
      @brief A container for Iptc data. This is a top-level class of
 
270
      @brief A container for IPTC data. This is a top-level class of
271
271
             the %Exiv2 library.
272
272
 
273
 
      Provide high-level access to the Iptc data of an image:
274
 
      - read Iptc information from JPEG files
 
273
      Provide high-level access to the IPTC data of an image:
 
274
      - read IPTC information from JPEG files
275
275
      - access metadata through keys and standard C++ iterators
276
276
      - add, modify and delete metadata
277
 
      - write Iptc data to JPEG files
278
 
      - extract Iptc metadata to files, insert from these files
 
277
      - write IPTC data to JPEG files
 
278
      - extract IPTC metadata to files, insert from these files
279
279
    */
280
280
    class IptcData {
281
281
    public:
289
289
        //! @name Manipulators
290
290
        //@{
291
291
        /*!
292
 
          @brief Load the Iptc data from a byte buffer. The format must follow
 
292
          @brief Load the IPTC data from a byte buffer. The format must follow
293
293
                 the IPTC IIM4 standard.
294
294
          @param buf Pointer to the data buffer to read from
295
295
          @param len Number of bytes in the data buffer
296
296
          @return 0 if successful;<BR>
297
 
                 5 if Iptc data is invalid or corrupt;<BR>
 
297
                 5 if IPTC data is invalid or corrupt;<BR>
298
298
         */
299
299
        int load(const byte* buf, long len);
300
300
        /*!
315
315
         */
316
316
        int add(const IptcKey& key, Value* value);
317
317
        /*!
318
 
          @brief Add a copy of the Iptcdatum to the Iptc metadata. A check
 
318
          @brief Add a copy of the Iptcdatum to the IPTC metadata. A check
319
319
                 for non-repeatable datasets is performed.
320
320
          @return 0 if successful;<BR>
321
321
                 6 if the dataset already exists and is not repeatable;<BR>
363
363
        //! End of the metadata
364
364
        const_iterator end() const { return iptcMetadata_.end(); }
365
365
        /*!
366
 
          @brief Write the Iptc data to a data buffer and return the data buffer.
 
366
          @brief Write the IPTC data to a data buffer and return the data buffer.
367
367
                 Caller owns this buffer. The copied data follows the IPTC IIM4
368
368
                 standard.
369
 
          @return Data buffer containing the Iptc data.
 
369
          @return Data buffer containing the IPTC data.
370
370
         */
371
371
        DataBuf copy() const;
372
372
        /*!
383
383
         */
384
384
        const_iterator findId(uint16_t dataset,
385
385
                              uint16_t record = IptcDataSets::application2) const;
386
 
        //! Return true if there is no Iptc metadata
 
386
        //! Return true if there is no IPTC metadata
387
387
        bool empty() const { return count() == 0; }
388
388
        //! Get the number of metadata entries
389
389
        long count() const { return static_cast<long>(iptcMetadata_.size()); }
390
390
        /*!
391
 
          @brief Return the exact size of all contained Iptc metadata
 
391
          @brief Return the exact size of all contained IPTC metadata
392
392
         */
393
393
        long size() const;
394
394
        //@}