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

« back to all changes in this revision

Viewing changes to src/datasets.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    datasets.hpp
23
 
  @brief   Iptc dataSet and type information
24
 
  @version $Rev: 769 $
 
23
  @brief   IPTC dataset and type information
 
24
  @version $Rev: 988 $
25
25
  @author  Brad Schick (brad) <brad@robotbattle.com>
26
26
  @date    24-Jul-04, brad: created
27
27
 */
84
84
        const char* photoshop_;                 //!< Photoshop string
85
85
    }; // struct DataSet
86
86
 
87
 
    //! Container for Iptc dataset information. Implemented as a static class.
 
87
    //! Container for IPTC dataset information. Implemented as a static class.
88
88
    class IptcDataSets {
89
89
    public:
90
90
        /*!
91
91
          @name Record identifiers
92
92
          @brief Record identifiers to logically group dataSets. There are other
93
 
                 possible record types, but they are not standardized by the Iptc
 
93
                 possible record types, but they are not standardized by the IPTC
94
94
                 IIM4 standard (and not commonly used in images).
95
95
         */
96
96
        //@{
186
186
        /*!
187
187
          @brief Return the name of the dataset.
188
188
          @param number The dataset number
189
 
          @param recordId The Iptc record Id
 
189
          @param recordId The IPTC record Id
190
190
          @return The name of the dataset or a string containing the hexadecimal
191
191
                  value of the dataset in the form "0x01ff", if this is an unknown
192
192
                  dataset.
195
195
        /*!
196
196
          @brief Return the title (label) of the dataset.
197
197
          @param number The dataset number
198
 
          @param recordId The Iptc record Id
 
198
          @param recordId The IPTC record Id
199
199
          @return The title (label) of the dataset
200
200
         */
201
201
        static const char* dataSetTitle(uint16_t number, uint16_t recordId);
202
202
        /*!
203
203
          @brief Return the description of the dataset.
204
204
          @param number The dataset number
205
 
          @param recordId The Iptc record Id
 
205
          @param recordId The IPTC record Id
206
206
          @return The description of the dataset
207
207
         */
208
208
        static const char* dataSetDesc(uint16_t number, uint16_t recordId);
209
209
        /*!
210
210
          @brief Return the photohsop name of a given dataset.
211
211
          @param number The dataset number
212
 
          @param recordId The Iptc record Id
 
212
          @param recordId The IPTC record Id
213
213
          @return The name used by photoshop for a dataset or an empty
214
214
                 string if photoshop does not use the dataset.
215
215
         */
217
217
        /*!
218
218
          @brief Check if a given dataset is repeatable
219
219
          @param number The dataset number
220
 
          @param recordId The Iptc record Id
 
220
          @param recordId The IPTC record Id
221
221
          @return true if the given dataset is repeatable otherwise false
222
222
         */
223
223
        static bool dataSetRepeatable(uint16_t number, uint16_t recordId);
255
255
           @throw Error if the record is not known;
256
256
         */
257
257
        static uint16_t recordId(const std::string& recordName);
 
258
        //! Return read-only list of built-in Envelope Record datasets
 
259
        static const DataSet* envelopeRecordList();
 
260
        //! Return read-only list of built-in Application2 Record datasets
 
261
        static const DataSet* application2RecordList();
258
262
        //! Print a list of all dataSets to output stream
259
263
        static void dataSetList(std::ostream& os);
260
264
 
268
272
    }; // class IptcDataSets
269
273
 
270
274
    /*!
271
 
      @brief Concrete keys for Iptc metadata.
 
275
      @brief Concrete keys for IPTC metadata.
272
276
     */
273
277
    class IptcKey : public Key {
274
278
    public:
278
282
        //! @name Creators
279
283
        //@{
280
284
        /*!
281
 
          @brief Constructor to create an Iptc key from a key string.
 
285
          @brief Constructor to create an IPTC key from a key string.
282
286
 
283
287
          @param key The key string.
284
288
          @throw Error if the first part of the key is not '<b>Iptc</b>' or
287
291
        */
288
292
        explicit IptcKey(const std::string& key);
289
293
        /*!
290
 
          @brief Constructor to create an Iptc key from dataset and record ids.
 
294
          @brief Constructor to create an IPTC key from dataset and record ids.
291
295
          @param tag Dataset id
292
296
          @param record Record id
293
297
         */
310
314
        virtual const char* familyName() const { return familyName_; }
311
315
        /*!
312
316
          @brief Return the name of the group (the second part of the key).
313
 
                 For Iptc keys, the group name is the record name.
 
317
                 For IPTC keys, the group name is the record name.
314
318
        */
315
319
        virtual std::string groupName() const { return recordName(); }
316
320
        virtual std::string tagName() const