Exiv2
tiffcomposite_int.hpp
Go to the documentation of this file.
1 // ***************************************************************** -*- C++ -*-
2 /*
3  * Copyright (C) 2004-2018 Exiv2 authors
4  * This program is part of the Exiv2 distribution.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
19  */
27 #ifndef TIFFCOMPOSITE_INT_HPP_
28 #define TIFFCOMPOSITE_INT_HPP_
29 
30 // *****************************************************************************
31 // included header files
32 #include "value.hpp"
33 #include "tifffwd_int.hpp"
34 #include "types.hpp"
35 
36 // + standard includes
37 #include <iosfwd>
38 #include <vector>
39 #include <string>
40 #include <cassert>
41 
42 // *****************************************************************************
43 // namespace extensions
44 namespace Exiv2 {
45 
46  class BasicIo;
47 
48  namespace Internal {
49 
50 // *****************************************************************************
51 // class definitions
52 
54  typedef uint16_t TiffType;
55 
57  const TiffType ttAsciiString = 2;
61  const TiffType ttSignedByte = 6;
62  const TiffType ttUndefined = 7;
63  const TiffType ttSignedShort = 8;
64  const TiffType ttSignedLong = 9;
66  const TiffType ttTiffFloat =11;
67  const TiffType ttTiffDouble =12;
68  const TiffType ttTiffIfd =13;
69 
71  TypeId toTypeId(TiffType tiffType, uint16_t tag, IfdId group);
73  TiffType toTiffType(TypeId typeId);
74 
78  namespace Tag {
79  const uint32_t none = 0x10000;
80  const uint32_t root = 0x20000;
81  const uint32_t next = 0x30000;
82  const uint32_t all = 0x40000;
83  const uint32_t pana = 0x80000;
84  }
85 
90  class TiffPathItem {
91  public:
93 
96  : extendedTag_(extendedTag), group_(group) {}
98 
100 
101  uint16_t tag() const { return static_cast<uint16_t>(extendedTag_ & 0xffff); }
104  uint32_t extendedTag() const { return extendedTag_; }
106  IfdId group() const { return group_; }
108 
109  private:
110  // DATA
111  uint32_t extendedTag_;
112  IfdId group_;
113  }; // class TiffPathItem
114 
124  class IoWrapper {
125  public:
127 
128 
134  IoWrapper(BasicIo& io, const byte* pHeader, long size, OffsetWriter* pow);
136 
138 
139 
145  long write(const byte* pData, long wcount);
152  int putb(byte data);
154  void setTarget(int id, uint32_t target);
156 
157  private:
158  // DATA
159  BasicIo& io_;
160  const byte* pHeader_;
161  long size_;
162  bool wroteHeader_;
163  OffsetWriter* pow_;
164  }; // class IoWrapper
165 
175  public:
177  typedef std::auto_ptr<TiffComponent> AutoPtr;
179  typedef std::vector<TiffComponent*> Components;
180 
182 
183  TiffComponent(uint16_t tag, IfdId group);
186  virtual ~TiffComponent();
188 
190 
191 
203  TiffComponent* addPath(uint16_t tag,
204  TiffPath& tiffPath,
205  TiffComponent* const pRoot,
206  AutoPtr object =AutoPtr(0));
212  TiffComponent* addChild(AutoPtr tiffComponent);
219  TiffComponent* addNext(AutoPtr tiffComponent);
226  void accept(TiffVisitor& visitor);
232  void setStart(const byte* pStart) { pStart_ = const_cast<byte*>(pStart); }
247  uint32_t write(IoWrapper& ioWrapper,
248  ByteOrder byteOrder,
249  int32_t offset,
250  uint32_t valueIdx,
251  uint32_t dataIdx,
252  uint32_t& imageIdx);
254 
256 
257  uint16_t tag() const { return tag_; }
260  IfdId group() const { return group_; }
262  byte* start() const { return pStart_; }
268  AutoPtr clone() const;
274  uint32_t writeData(IoWrapper& ioWrapper,
275  ByteOrder byteOrder,
276  int32_t offset,
277  uint32_t dataIdx,
278  uint32_t& imageIdx) const;
284  uint32_t writeImage(IoWrapper& ioWrapper,
285  ByteOrder byteOrder) const;
290  uint32_t size() const;
294  uint32_t count() const;
301  uint32_t sizeData() const;
308  uint32_t sizeImage() const;
312  // Todo: This is only implemented in TiffEntryBase. It is needed here so that
313  // we can sort components by tag and idx. Something is not quite right.
314  virtual int idx() const;
316 
317  protected:
319 
320  virtual TiffComponent* doAddPath(uint16_t tag,
322  TiffPath& tiffPath,
323  TiffComponent* const pRoot,
324  TiffComponent::AutoPtr object);
326  virtual TiffComponent* doAddChild(AutoPtr tiffComponent);
328  virtual TiffComponent* doAddNext(AutoPtr tiffComponent);
330  virtual void doAccept(TiffVisitor& visitor) =0;
332  virtual uint32_t doWrite(IoWrapper& ioWrapper,
333  ByteOrder byteOrder,
334  int32_t offset,
335  uint32_t valueIdx,
336  uint32_t dataIdx,
337  uint32_t& imageIdx) =0;
339 
341 
342  virtual TiffComponent* doClone() const =0;
345  virtual uint32_t doWriteData(IoWrapper& ioWrapper,
346  ByteOrder byteOrder,
347  int32_t offset,
348  uint32_t dataIdx,
349  uint32_t& imageIdx) const =0;
351  virtual uint32_t doWriteImage(IoWrapper& ioWrapper,
352  ByteOrder byteOrder) const =0;
354  virtual uint32_t doSize() const =0;
356  virtual uint32_t doCount() const =0;
358  virtual uint32_t doSizeData() const =0;
360  virtual uint32_t doSizeImage() const =0;
362 
363  private:
364  // DATA
365  uint16_t tag_;
366  IfdId group_;
367 
371  byte* pStart_;
372 
373  }; // class TiffComponent
374 
377  struct Key;
386  bool operator==(const Key& key) const;
388  uint16_t tag() const { return static_cast<uint16_t>(extendedTag_ & 0xffff); }
389 
390  // DATA
391  const char* make_;
392  uint32_t extendedTag_;
396 
397  }; // struct TiffMappingInfo
398 
402  Key(const std::string& m, uint32_t e, IfdId g) : m_(m), e_(e), g_(g) {}
404  uint32_t e_;
406  };
407 
414  class TiffEntryBase : public TiffComponent {
415  friend class TiffReader;
416  friend class TiffEncoder;
417  friend int selectNikonLd(TiffBinaryArray* const, TiffComponent* const);
418  public:
420 
424  virtual ~TiffEntryBase();
426 
428 
429 
436  void encode(TiffEncoder& encoder, const Exifdatum* datum);
438  void setOffset(int32_t offset) { offset_ = offset; }
440  void setData(byte* pData, int32_t size);
442  void setData(DataBuf buf);
448  void updateValue(Value::AutoPtr value, ByteOrder byteOrder);
454  void setValue(Value::AutoPtr value);
456 
458 
459  TiffType tiffType() const { return tiffType_; }
465  int32_t offset() const { return offset_; }
469  virtual int idx() const;
474  const byte* pData() const { return pData_; }
476  const Value* pValue() const { return pValue_; }
478 
479  protected:
481 
482  TiffEntryBase(const TiffEntryBase& rhs);
485 
487 
488  virtual void doEncode(TiffEncoder& encoder, const Exifdatum* datum) =0;
491  void setCount(uint32_t count) { count_ = count; }
493  void setIdx(int idx) { idx_ = idx; }
499  virtual uint32_t doWrite(IoWrapper& ioWrapper,
500  ByteOrder byteOrder,
501  int32_t offset,
502  uint32_t valueIdx,
503  uint32_t dataIdx,
504  uint32_t& imageIdx);
506 
508 
509  virtual uint32_t doCount() const;
515  virtual uint32_t doWriteData(IoWrapper& ioWrapper,
516  ByteOrder byteOrder,
517  int32_t offset,
518  uint32_t dataIdx,
519  uint32_t& imageIdx) const;
524  virtual uint32_t doWriteImage(IoWrapper& ioWrapper,
525  ByteOrder byteOrder) const;
527  virtual uint32_t doSize() const;
529  virtual uint32_t doSizeData() const;
531  virtual uint32_t doSizeImage() const;
533 
535  static uint32_t writeOffset(byte* buf,
536  int32_t offset,
538  ByteOrder byteOrder);
539 
540  private:
542 
543  TiffEntryBase& operator=(const TiffEntryBase& rhs);
546 
547  // DATA
548  TiffType tiffType_;
549  uint32_t count_;
550  int32_t offset_;
551 
555  uint32_t size_;
556  byte* pData_;
557  bool isMalloced_;
558  int idx_;
559  Value* pValue_;
560 
561  }; // class TiffEntryBase
562 
566  class TiffEntry : public TiffEntryBase {
567  public:
569 
570  TiffEntry(uint16_t tag, IfdId group) : TiffEntryBase(tag, group) {}
573  virtual ~TiffEntry();
575 
576  protected:
578 
579  virtual void doAccept(TiffVisitor& visitor);
580  virtual void doEncode(TiffEncoder& encoder, const Exifdatum* datum);
582 
584 
585  virtual TiffEntry* doClone() const;
587 
588  }; // class TiffEntry
589 
599  public:
601 
602  TiffDataEntryBase(uint16_t tag, IfdId group, uint16_t szTag, IfdId szGroup)
604  : TiffEntryBase(tag, group),
605  szTag_(szTag), szGroup_(szGroup) {}
607  virtual ~TiffDataEntryBase();
609 
611 
612 
621  virtual void setStrips(const Value* pSize,
622  const byte* pData,
623  uint32_t sizeData,
624  uint32_t baseOffset) =0;
626 
628 
629  uint16_t szTag() const { return szTag_; }
632  IfdId szGroup() const { return szGroup_; }
634 
635  private:
636  // DATA
637  const uint16_t szTag_;
638  const IfdId szGroup_;
639 
640  }; // class TiffDataEntryBase
641 
654  friend class TiffEncoder;
655  public:
657 
658  TiffDataEntry(uint16_t tag, IfdId group, uint16_t szTag, IfdId szGroup)
661  pDataArea_(0), sizeDataArea_(0) {}
663  virtual ~TiffDataEntry();
665 
667 
668  virtual void setStrips(const Value* pSize,
669  const byte* pData,
670  uint32_t sizeData,
671  uint32_t baseOffset);
673 
674  protected:
676 
677  virtual void doAccept(TiffVisitor& visitor);
678  virtual void doEncode(TiffEncoder& encoder, const Exifdatum* datum);
690  virtual uint32_t doWrite(IoWrapper& ioWrapper,
691  ByteOrder byteOrder,
692  int32_t offset,
693  uint32_t valueIdx,
694  uint32_t dataIdx,
695  uint32_t& imageIdx);
697 
699 
700  virtual TiffDataEntry* doClone() const;
705  virtual uint32_t doWriteData(IoWrapper& ioWrapper,
706  ByteOrder byteOrder,
707  int32_t offset,
708  uint32_t dataIdx,
709  uint32_t& imageIdx) const;
710  // Using doWriteImage from base class
711  // Using doSize() from base class
713  virtual uint32_t doSizeData() const;
714  // Using doSizeImage from base class
716 
717  private:
718  // DATA
719  byte* pDataArea_;
720  uint32_t sizeDataArea_;
721 
722  }; // class TiffDataEntry
723 
737  friend class TiffEncoder;
738  public:
740 
741  TiffImageEntry(uint16_t tag, IfdId group, uint16_t szTag, IfdId szGroup)
745  virtual ~TiffImageEntry();
747 
749 
750  virtual void setStrips(const Value* pSize,
751  const byte* pData,
752  uint32_t sizeData,
753  uint32_t baseOffset);
755 
756  protected:
758 
759  virtual void doAccept(TiffVisitor& visitor);
760  virtual void doEncode(TiffEncoder& encoder, const Exifdatum* datum);
766  virtual uint32_t doWrite(IoWrapper& ioWrapper,
767  ByteOrder byteOrder,
768  int32_t offset,
769  uint32_t valueIdx,
770  uint32_t dataIdx,
771  uint32_t& imageIdx);
773 
775 
776  virtual TiffImageEntry* doClone() const;
785  virtual uint32_t doWriteData(IoWrapper& ioWrapper,
786  ByteOrder byteOrder,
787  int32_t offset,
788  uint32_t dataIdx,
789  uint32_t& imageIdx) const;
794  virtual uint32_t doWriteImage(IoWrapper& ioWrapper,
795  ByteOrder byteOrder) const;
797  virtual uint32_t doSize() const;
799  virtual uint32_t doSizeData() const;
801  virtual uint32_t doSizeImage() const;
803 
804  private:
806  typedef std::vector<std::pair<const byte*, uint32_t> > Strips;
807 
808  // DATA
809  Strips strips_;
810 
811  }; // class TiffImageEntry
812 
819  class TiffSizeEntry : public TiffEntryBase {
820  public:
822 
823  TiffSizeEntry(uint16_t tag, IfdId group, uint16_t dtTag, IfdId dtGroup)
825  : TiffEntryBase(tag, group), dtTag_(dtTag), dtGroup_(dtGroup) {}
827  virtual ~TiffSizeEntry();
829 
831 
832  uint16_t dtTag() const { return dtTag_; }
835  IfdId dtGroup() const { return dtGroup_; }
837 
838  protected:
840 
841  virtual void doAccept(TiffVisitor& visitor);
842  virtual void doEncode(TiffEncoder& encoder, const Exifdatum* datum);
844 
846 
847  virtual TiffSizeEntry* doClone() const;
849 
850  private:
851  // DATA
852  const uint16_t dtTag_;
853  const IfdId dtGroup_;
854 
855  }; // class TiffSizeEntry
856 
861  class TiffDirectory : public TiffComponent {
862  friend class TiffEncoder;
863  public:
865 
866  TiffDirectory(uint16_t tag, IfdId group, bool hasNext =true)
868  : TiffComponent(tag, group), hasNext_(hasNext), pNext_(0) {}
870  virtual ~TiffDirectory();
872 
874 
875  bool hasNext() const { return hasNext_; }
878 
879  protected:
881 
882  TiffDirectory(const TiffDirectory& rhs);
885 
887 
888  virtual TiffComponent* doAddPath(uint16_t tag,
889  TiffPath& tiffPath,
890  TiffComponent* const pRoot,
891  TiffComponent::AutoPtr object);
892  virtual TiffComponent* doAddChild(TiffComponent::AutoPtr tiffComponent);
893  virtual TiffComponent* doAddNext(TiffComponent::AutoPtr tiffComponent);
894  virtual void doAccept(TiffVisitor& visitor);
900  virtual uint32_t doWrite(IoWrapper& ioWrapper,
901  ByteOrder byteOrder,
902  int32_t offset,
903  uint32_t valueIdx,
904  uint32_t dataIdx,
905  uint32_t& imageIdx);
907 
909 
910  virtual TiffDirectory* doClone() const;
915  virtual uint32_t doWriteData(IoWrapper& ioWrapper,
916  ByteOrder byteOrder,
917  int32_t offset,
918  uint32_t dataIdx,
919  uint32_t& imageIdx) const;
926  virtual uint32_t doWriteImage(IoWrapper& ioWrapper,
927  ByteOrder byteOrder) const;
932  virtual uint32_t doSize() const;
937  virtual uint32_t doCount() const;
942  virtual uint32_t doSizeData() const;
947  virtual uint32_t doSizeImage() const;
949 
950  private:
952 
953  TiffDirectory& operator=(const TiffDirectory& rhs);
956 
958 
959  uint32_t writeDirEntry(IoWrapper& ioWrapper,
961  ByteOrder byteOrder,
962  int32_t offset,
963  TiffComponent* pTiffComponent,
964  uint32_t valueIdx,
965  uint32_t dataIdx,
966  uint32_t& imageIdx) const;
968 
969  private:
970  // DATA
971  Components components_;
972  const bool hasNext_;
973  TiffComponent* pNext_;
974 
975  }; // class TiffDirectory
976 
984  class TiffSubIfd : public TiffEntryBase {
985  friend class TiffReader;
986  public:
988 
989  TiffSubIfd(uint16_t tag, IfdId group, IfdId newGroup);
992  virtual ~TiffSubIfd();
994 
995  protected:
997 
998  TiffSubIfd(const TiffSubIfd& rhs);
1001 
1003 
1004  virtual TiffComponent* doAddPath(uint16_t tag,
1005  TiffPath& tiffPath,
1006  TiffComponent* const pRoot,
1007  TiffComponent::AutoPtr object);
1008  virtual TiffComponent* doAddChild(TiffComponent::AutoPtr tiffComponent);
1009  virtual void doAccept(TiffVisitor& visitor);
1010  virtual void doEncode(TiffEncoder& encoder, const Exifdatum* datum);
1016  virtual uint32_t doWrite(IoWrapper& ioWrapper,
1017  ByteOrder byteOrder,
1018  int32_t offset,
1019  uint32_t valueIdx,
1020  uint32_t dataIdx,
1021  uint32_t& imageIdx);
1023 
1025 
1026  virtual TiffSubIfd* doClone() const;
1031  virtual uint32_t doWriteData(IoWrapper& ioWrapper,
1032  ByteOrder byteOrder,
1033  int32_t offset,
1034  uint32_t dataIdx,
1035  uint32_t& imageIdx) const;
1040  virtual uint32_t doWriteImage(IoWrapper& ioWrapper,
1041  ByteOrder byteOrder) const;
1043  uint32_t doSize() const;
1045  virtual uint32_t doSizeData() const;
1047  virtual uint32_t doSizeImage() const;
1049 
1050  private:
1052 
1053  TiffSubIfd& operator=(const TiffSubIfd& rhs);
1056 
1058  typedef std::vector<TiffDirectory*> Ifds;
1059 
1060  // DATA
1061  IfdId newGroup_;
1062  Ifds ifds_;
1063 
1064  }; // class TiffSubIfd
1065 
1073  class TiffMnEntry : public TiffEntryBase {
1074  friend class TiffReader;
1075  friend class TiffDecoder;
1076  friend class TiffEncoder;
1077  public:
1079 
1080  TiffMnEntry(uint16_t tag, IfdId group, IfdId mnGroup);
1083  virtual ~TiffMnEntry();
1085 
1086  protected:
1088 
1089  virtual TiffComponent* doAddPath(uint16_t tag,
1090  TiffPath& tiffPath,
1091  TiffComponent* const pRoot,
1092  TiffComponent::AutoPtr object);
1093  virtual TiffComponent* doAddChild(TiffComponent::AutoPtr tiffComponent);
1094  virtual TiffComponent* doAddNext(TiffComponent::AutoPtr tiffComponent);
1095  virtual void doAccept(TiffVisitor& visitor);
1096  virtual void doEncode(TiffEncoder& encoder, const Exifdatum* datum);
1101  virtual uint32_t doWrite(IoWrapper& ioWrapper,
1102  ByteOrder byteOrder,
1103  int32_t offset,
1104  uint32_t valueIdx,
1105  uint32_t dataIdx,
1106  uint32_t& imageIdx);
1108 
1110 
1111  virtual TiffMnEntry* doClone() const;
1113  virtual uint32_t doCount() const;
1114  // Using doWriteData from base class
1115  // Using doWriteImage from base class
1120  virtual uint32_t doSize() const;
1121  // Using doSizeData from base class
1122  // Using doSizeImage from base class
1124 
1125  private:
1127 
1128  TiffMnEntry(const TiffMnEntry& rhs);
1131  TiffMnEntry& operator=(const TiffMnEntry& rhs);
1133 
1134  // DATA
1135  IfdId mnGroup_;
1136  TiffComponent* mn_;
1137 
1138  }; // class TiffMnEntry
1139 
1150  friend class TiffReader;
1151  public:
1153 
1154  TiffIfdMakernote(uint16_t tag,
1156  IfdId group,
1157  IfdId mnGroup,
1158  MnHeader* pHeader,
1159  bool hasNext =true);
1161  virtual ~TiffIfdMakernote();
1163 
1165 
1166 
1171  bool readHeader(const byte* pData, uint32_t size, ByteOrder byteOrder);
1179  void setImageByteOrder(ByteOrder byteOrder) { imageByteOrder_ = byteOrder; }
1181 
1183 
1184  uint32_t sizeHeader() const;
1187  uint32_t writeHeader(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
1192  uint32_t mnOffset() const;
1198  uint32_t ifdOffset() const;
1205  ByteOrder byteOrder() const;
1209  ByteOrder imageByteOrder() const { return imageByteOrder_; }
1215  uint32_t baseOffset() const;
1217 
1218  protected:
1220 
1221  virtual TiffComponent* doAddPath(uint16_t tag,
1222  TiffPath& tiffPath,
1223  TiffComponent* const pRoot,
1224  TiffComponent::AutoPtr object);
1225  virtual TiffComponent* doAddChild(TiffComponent::AutoPtr tiffComponent);
1226  virtual TiffComponent* doAddNext(TiffComponent::AutoPtr tiffComponent);
1227  virtual void doAccept(TiffVisitor& visitor);
1233  virtual uint32_t doWrite(IoWrapper& ioWrapper,
1235  int32_t offset,
1236  uint32_t valueIdx,
1237  uint32_t dataIdx,
1238  uint32_t& imageIdx);
1240 
1242 
1243  virtual TiffIfdMakernote* doClone() const;
1248  virtual uint32_t doWriteData(IoWrapper& ioWrapper,
1250  int32_t offset,
1251  uint32_t dataIdx,
1252  uint32_t& imageIdx) const;
1257  virtual uint32_t doWriteImage(IoWrapper& ioWrapper,
1258  ByteOrder byteOrder) const;
1263  virtual uint32_t doSize() const;
1269  virtual uint32_t doCount() const;
1274  virtual uint32_t doSizeData() const;
1279  virtual uint32_t doSizeImage() const;
1281 
1282  private:
1291  TiffIfdMakernote(const TiffIfdMakernote& rhs);
1294  TiffIfdMakernote& operator=(const TiffIfdMakernote& rhs);
1296 
1297  // DATA
1298  MnHeader* pHeader_;
1299  TiffDirectory ifd_;
1300  uint32_t mnOffset_;
1301  ByteOrder imageByteOrder_;
1302 
1303  }; // class TiffIfdMakernote
1304 
1309  typedef int (*CfgSelFct)(uint16_t, const byte*, uint32_t, TiffComponent* const);
1310 
1312  typedef DataBuf (*CryptFct)(uint16_t, const byte*, uint32_t, TiffComponent* const);
1313 
1315  struct ArrayDef {
1317  bool operator==(uint32_t idx) const { return idx_ == idx; }
1319  uint32_t size(uint16_t tag, IfdId group) const;
1320  // DATA
1321  uint32_t idx_;
1323  uint32_t count_;
1324  };
1325 
1327  struct ArrayCfg {
1332  uint32_t tagStep() const { return elDefaultDef_.size(0, group_); }
1333  //DATA
1338  bool hasSize_;
1340  bool concat_;
1342  };
1343 
1345  struct ArraySet {
1346  const ArrayCfg cfg_;
1347  const ArrayDef* def_;
1348  const int defSize_;
1349  };
1350 
1357  public:
1359 
1360  TiffBinaryArray(uint16_t tag,
1362  IfdId group,
1363  const ArrayCfg* arrayCfg,
1364  const ArrayDef* arrayDef,
1365  int defSize);
1367  TiffBinaryArray(uint16_t tag,
1368  IfdId group,
1369  const ArraySet* arraySet,
1370  int setSize,
1371  CfgSelFct cfgSelFct);
1373  virtual ~TiffBinaryArray();
1375 
1377 
1378  uint32_t addElement(uint32_t idx, const ArrayDef& def);
1391  bool initialize(IfdId group);
1402  bool initialize(TiffComponent* const pRoot);
1404  void iniOrigDataBuf();
1406  bool updOrigDataBuf(const byte* pData, uint32_t size);
1408  void setDecoded(bool decoded) { decoded_ = decoded; }
1410 
1412 
1413  const ArrayCfg* cfg() const { return arrayCfg_; }
1416  const ArrayDef* def() const { return arrayDef_; }
1418  int defSize() const { return defSize_; }
1420  bool decoded() const { return decoded_; }
1422 
1423  protected:
1425 
1426  TiffBinaryArray(const TiffBinaryArray& rhs);
1429 
1431 
1432 
1435  virtual TiffComponent* doAddPath(uint16_t tag,
1436  TiffPath& tiffPath,
1437  TiffComponent* const pRoot,
1438  TiffComponent::AutoPtr object);
1442  virtual TiffComponent* doAddChild(TiffComponent::AutoPtr tiffComponent);
1443  virtual void doAccept(TiffVisitor& visitor);
1444  virtual void doEncode(TiffEncoder& encoder, const Exifdatum* datum);
1448  virtual uint32_t doWrite(IoWrapper& ioWrapper,
1449  ByteOrder byteOrder,
1450  int32_t offset,
1451  uint32_t valueIdx,
1452  uint32_t dataIdx,
1453  uint32_t& imageIdx);
1455 
1457 
1458  virtual TiffBinaryArray* doClone() const;
1460  virtual uint32_t doCount() const;
1461  // Using doWriteData from base class
1462  // Using doWriteImage from base class
1466  virtual uint32_t doSize() const;
1467  // Using doSizeData from base class
1468  // Using doSizeImage from base class
1470 
1471  private:
1473 
1474  TiffBinaryArray& operator=(const TiffBinaryArray& rhs);
1477 
1478  // DATA
1479  const CfgSelFct cfgSelFct_;
1480  const ArraySet* arraySet_;
1481  const ArrayCfg* arrayCfg_;
1482  const ArrayDef* arrayDef_;
1483  int defSize_;
1484  int setSize_;
1485  Components elements_;
1486  byte* origData_;
1487  uint32_t origSize_;
1488  TiffComponent* pRoot_;
1489  bool decoded_;
1490  }; // class TiffBinaryArray
1491 
1496  public:
1498 
1499  TiffBinaryElement(uint16_t tag, IfdId group);
1502  virtual ~TiffBinaryElement();
1504 
1506 
1507 
1510  void setElDef(const ArrayDef& def) { elDef_ = def; }
1514  void setElByteOrder(ByteOrder byteOrder) { elByteOrder_ = byteOrder; }
1516 
1518 
1519 
1522  const ArrayDef* elDef() const { return &elDef_; }
1526  ByteOrder elByteOrder() const { return elByteOrder_; }
1528 
1529  protected:
1531 
1532  virtual void doAccept(TiffVisitor& visitor);
1533  virtual void doEncode(TiffEncoder& encoder, const Exifdatum* datum);
1537  virtual uint32_t doWrite(IoWrapper& ioWrapper,
1538  ByteOrder byteOrder,
1539  int32_t offset,
1540  uint32_t valueIdx,
1541  uint32_t dataIdx,
1542  uint32_t& imageIdx);
1544 
1546 
1547  virtual TiffBinaryElement* doClone() const;
1551  virtual uint32_t doCount() const;
1552  // Using doWriteData from base class
1553  // Using doWriteImage from base class
1558  virtual uint32_t doSize() const;
1559  // Using doSizeData from base class
1560  // Using doSizeImage from base class
1562 
1563  private:
1564  // DATA
1565  ArrayDef elDef_;
1566  ByteOrder elByteOrder_;
1567 
1568  }; // class TiffBinaryElement
1569 
1570 // *****************************************************************************
1571 // template, inline and free functions
1572 
1577  bool cmpTagLt(TiffComponent const* lhs, TiffComponent const* rhs);
1578 
1583  bool cmpGroupLt(TiffComponent const* lhs, TiffComponent const* rhs);
1584 
1586  TiffComponent::AutoPtr newTiffEntry(uint16_t tag, IfdId group);
1587 
1589  TiffComponent::AutoPtr newTiffMnEntry(uint16_t tag, IfdId group);
1590 
1592  TiffComponent::AutoPtr newTiffBinaryElement(uint16_t tag, IfdId group);
1593 
1595  template<IfdId newGroup>
1597  {
1598  return TiffComponent::AutoPtr(new TiffDirectory(tag, newGroup));
1599  }
1600 
1602  template<IfdId newGroup>
1604  {
1605  return TiffComponent::AutoPtr(new TiffSubIfd(tag, group, newGroup));
1606  }
1607 
1609  template<const ArrayCfg* arrayCfg, int N, const ArrayDef (&arrayDef)[N]>
1611  {
1612  // *& acrobatics is a workaround for a MSVC 7.1 bug
1613  return TiffComponent::AutoPtr(
1614  new TiffBinaryArray(tag, group, arrayCfg, *(&arrayDef), N));
1615  }
1616 
1618  template<const ArrayCfg* arrayCfg>
1620  {
1621  return TiffComponent::AutoPtr(
1622  new TiffBinaryArray(tag, group, arrayCfg, 0, 0));
1623  }
1624 
1626  template<const ArraySet* arraySet, int N, CfgSelFct cfgSelFct>
1628  {
1629  return TiffComponent::AutoPtr(
1630  new TiffBinaryArray(tag, group, arraySet, N, cfgSelFct));
1631  }
1632 
1634  template<uint16_t szTag, IfdId szGroup>
1636  {
1637  return TiffComponent::AutoPtr(
1638  new TiffDataEntry(tag, group, szTag, szGroup));
1639  }
1640 
1642  template<uint16_t dtTag, IfdId dtGroup>
1644  {
1645  return TiffComponent::AutoPtr(
1646  new TiffSizeEntry(tag, group, dtTag, dtGroup));
1647  }
1648 
1650  template<uint16_t szTag, IfdId szGroup>
1652  {
1653  return TiffComponent::AutoPtr(
1654  new TiffImageEntry(tag, group, szTag, szGroup));
1655  }
1656 
1658  template<uint16_t dtTag, IfdId dtGroup>
1660  {
1661  // Todo: Same as newTiffThumbSize - consolidate (rename)?
1662  return TiffComponent::AutoPtr(
1663  new TiffSizeEntry(tag, group, dtTag, dtGroup));
1664  }
1665 
1666 }} // namespace Internal, Exiv2
1667 
1668 #endif // #ifndef TIFFCOMPOSITE_INT_HPP_
Exiv2::Internal::IoWrapper::putb
int putb(byte data)
Wraps the corresponding BasicIo::putb() method.
Definition: tiffcomposite_int.cpp:78
Exiv2::Internal::TiffComponent::writeData
uint32_t writeData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const
Write the IFD data of this component to a binary image. Return the number of bytes written....
Definition: tiffcomposite_int.cpp:1465
Exiv2::Internal::TiffComponent::accept
void accept(TiffVisitor &visitor)
Interface to accept visitors (Visitor pattern). Visitors can perform operations on all components of ...
Definition: tiffcomposite_int.cpp:887
Exiv2::Internal::TiffEntryBase::updateValue
void updateValue(Value::AutoPtr value, ByteOrder byteOrder)
Update the value. Takes ownership of the pointer passed in.
Definition: tiffcomposite_int.cpp:376
Exiv2::Internal::TiffDataEntryBase
Interface for a standard TIFF IFD entry consisting of a value which is a set of offsets to a data are...
Definition: tiffcomposite_int.hpp:598
Exiv2::Internal::TiffImageEntry::doWrite
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Write pointers into the image data area to the ioWrapper. Return the number of by...
Definition: tiffcomposite_int.cpp:1307
Exiv2::Internal::TiffBinaryArray::doAccept
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:952
Exiv2::Internal::TiffComponent::size
uint32_t size() const
Return the size in bytes of the IFD value of this component when written to a binary image.
Definition: tiffcomposite_int.cpp:1650
Exiv2::Internal::TiffComponent::tag
uint16_t tag() const
Return the tag of this entry.
Definition: tiffcomposite_int.hpp:258
Exiv2::Internal::TiffBinaryArray::addElement
uint32_t addElement(uint32_t idx, const ArrayDef &def)
Add an element to the binary array, return the size of the element.
Definition: tiffcomposite_int.cpp:614
Exiv2::Internal::ArrayDef::tiffType_
TiffType tiffType_
TIFF type of the element.
Definition: tiffcomposite_int.hpp:1322
Exiv2::Internal::TiffMnEntry::~TiffMnEntry
virtual ~TiffMnEntry()
Virtual destructor.
Definition: tiffcomposite_int.cpp:226
Exiv2::Internal::TiffVisitor::visitIfdMakernote
virtual void visitIfdMakernote(TiffIfdMakernote *object)=0
Operation to perform for an IFD makernote.
Exiv2::Internal::ArrayCfg::hasFillers_
bool hasFillers_
If true, write all defined tags.
Definition: tiffcomposite_int.hpp:1339
Exiv2::MemIo
Provides binary IO on blocks of memory by implementing the BasicIo interface. A copy-on-write impleme...
Definition: basicio.hpp:540
Exiv2::Internal::TiffDirectory::doSizeData
virtual uint32_t doSizeData() const
This class does not really implement sizeData(), it only has size(). This method must not be called; ...
Definition: tiffcomposite_int.cpp:1749
Exiv2::Internal::TiffEntryBase::tiffType
TiffType tiffType() const
Return the TIFF type.
Definition: tiffcomposite_int.hpp:460
Exiv2::Internal::TiffComponent::doAddNext
virtual TiffComponent * doAddNext(AutoPtr tiffComponent)
Implements addNext(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:858
Exiv2::Internal::TiffSubIfd::doWrite
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Write the sub-IFD pointers to the ioWrapper, return the number of bytes written....
Definition: tiffcomposite_int.cpp:1339
Exiv2::Internal::TiffMnEntry::doAddChild
virtual TiffComponent * doAddChild(TiffComponent::AutoPtr tiffComponent)
Implements addChild(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:831
Exiv2::Internal::TiffIfdMakernote::ifdOffset
uint32_t ifdOffset() const
Return the offset to the start of the Makernote IFD from the start of the Makernote....
Definition: tiffcomposite_int.cpp:513
Exiv2::Internal::newTiffThumbSize
TiffComponent::AutoPtr newTiffThumbSize(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF entry for a thumbnail (size)
Definition: tiffcomposite_int.hpp:1643
Exiv2::Internal::TiffVisitor::visitSubIfd
virtual void visitSubIfd(TiffSubIfd *object)=0
Operation to perform for a TIFF sub-IFD.
Exiv2::Internal::TiffEntryBase::setCount
void setCount(uint32_t count)
Set the number of components in this entry.
Definition: tiffcomposite_int.hpp:491
Exiv2::Internal::TiffVisitor::visitSizeEntry
virtual void visitSizeEntry(TiffSizeEntry *object)=0
Operation to perform for a TIFF size entry.
Exiv2::Internal::TiffEncoder::encodeDataEntry
void encodeDataEntry(TiffDataEntry *object, const Exifdatum *datum)
Callback encoder function for a data entry.
Definition: tiffvisitor_int.cpp:961
Exiv2::Internal::TiffIfdMakernote::doSizeImage
virtual uint32_t doSizeImage() const
Implements sizeImage(). Return the total image data size of the makernote IFD.
Definition: tiffcomposite_int.cpp:1817
Exiv2::DataBuf::pData_
byte * pData_
Pointer to the buffer, 0 if none has been allocated.
Definition: types.hpp:269
Exiv2::Internal::TiffEncoder::encodeMnEntry
void encodeMnEntry(TiffMnEntry *object, const Exifdatum *datum)
Callback encoder function for a Makernote entry.
Definition: tiffvisitor_int.cpp:1070
Exiv2::Internal::CfgSelFct
int(* CfgSelFct)(uint16_t, const byte *, uint32_t, TiffComponent *const)
Function pointer type for a function to determine which cfg + def of a corresponding array set to use...
Definition: tiffcomposite_int.hpp:1309
Exiv2::Internal::TiffBinaryArray::doAddChild
virtual TiffComponent * doAddChild(TiffComponent::AutoPtr tiffComponent)
Implements addChild(). Todo: Document it!
Definition: tiffcomposite_int.cpp:845
Exiv2::Internal::cmpGroupLt
bool cmpGroupLt(TiffComponent const *lhs, TiffComponent const *rhs)
Compare two TIFF component pointers by group. Return true if the group of component lhs is less than ...
Definition: tiffcomposite_int.cpp:1898
Exiv2::Internal::TiffComponent::doAddPath
virtual TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, TiffComponent::AutoPtr object)
Implements addPath(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:639
Exiv2::Internal::TiffMnEntry::doClone
virtual TiffMnEntry * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:327
Exiv2::Internal::TiffMnEntry::doAddPath
virtual TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, TiffComponent::AutoPtr object)
Implements addPath(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:734
Exiv2::Internal::TiffIfdMakernote::imageByteOrder
ByteOrder imageByteOrder() const
Return the byte order used for the image.
Definition: tiffcomposite_int.hpp:1209
Exiv2::Internal::newTiffBinaryArray2
TiffComponent::AutoPtr newTiffBinaryArray2(uint16_t tag, IfdId group)
Function to create and initialize a new complex binary array entry.
Definition: tiffcomposite_int.hpp:1627
Exiv2::Internal::TiffIfdMakernote::TiffIfdMakernote
TiffIfdMakernote(uint16_t tag, IfdId group, IfdId mnGroup, MnHeader *pHeader, bool hasNext=true)
Default constructor.
Definition: tiffcomposite_int.cpp:115
Exiv2::Internal::TiffSizeEntry::~TiffSizeEntry
virtual ~TiffSizeEntry()
Virtual destructor.
Definition: tiffcomposite_int.cpp:222
Exiv2::Internal::TiffBinaryArray::doSize
virtual uint32_t doSize() const
Implements size(). Todo: Document it!
Definition: tiffcomposite_int.cpp:1710
Exiv2::Internal::TiffIfdMakernote::setImageByteOrder
void setImageByteOrder(ByteOrder byteOrder)
Set the byte order used for the image.
Definition: tiffcomposite_int.hpp:1179
Exiv2::Internal::TiffComponent::setStart
void setStart(const byte *pStart)
Set a pointer to the start of the binary representation of the component in a memory buffer....
Definition: tiffcomposite_int.hpp:232
Exiv2::Internal::TiffEntryBase
This abstract base class provides the common functionality of an IFD directory entry and defines an e...
Definition: tiffcomposite_int.hpp:414
Exiv2::Value::size
virtual long size() const =0
Return the size of the value in bytes.
Exiv2::Internal::TiffComponent::addPath
TiffComponent * addPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, AutoPtr object=AutoPtr(0))
Add a TIFF entry tag to the component. Components on the path to the entry are added if they don't ex...
Definition: tiffcomposite_int.cpp:631
Exiv2::Value
Common interface for all types of values used with metadata.
Definition: value.hpp:60
Exiv2::Internal::TiffSizeEntry::dtTag
uint16_t dtTag() const
Return the group of the related entry which has the data area.
Definition: tiffcomposite_int.hpp:833
Exiv2::Internal::TiffVisitor
Abstract base class defining the interface for TIFF composite visitors (Visitor pattern)
Definition: tiffvisitor_int.hpp:73
Exiv2::Internal::TiffIfdMakernote::doSizeData
virtual uint32_t doSizeData() const
This class does not really implement sizeData(), it only has size(). This method must not be called; ...
Definition: tiffcomposite_int.cpp:1785
Exiv2::Internal::DecoderFct
void(TiffDecoder::* DecoderFct)(const TiffEntryBase *)
Function pointer type for a TiffDecoder member function to decode a TIFF component.
Definition: tifffwd_int.hpp:83
tiffvisitor_int.hpp
Internal operations on a TIFF composite tree, implemented as visitor classes.
Exiv2::Internal::TiffMnEntry::TiffMnEntry
TiffMnEntry(uint16_t tag, IfdId group, IfdId mnGroup)
Default constructor.
Definition: tiffcomposite_int.cpp:110
Exiv2::Internal::TiffComponent::~TiffComponent
virtual ~TiffComponent()
Virtual destructor.
Definition: tiffcomposite_int.cpp:179
Exiv2::Internal::TiffBinaryElement::TiffBinaryElement
TiffBinaryElement(uint16_t tag, IfdId group)
Constructor.
Definition: tiffcomposite_int.cpp:170
Exiv2::Internal::OffsetWriter::cr2RawIfdOffset
@ cr2RawIfdOffset
CR2 RAW IFD offset, a pointer in the CR2 header to the 4th IFD in a CR2 image.
Definition: tiffimage_int.hpp:430
Exiv2::Internal::TiffEncoder
TIFF composite visitor to encode metadata from an image to the TIFF tree. The metadata containers and...
Definition: tiffvisitor_int.hpp:384
Exiv2::Internal::TiffComponent::doSizeImage
virtual uint32_t doSizeImage() const =0
Implements sizeImage().
Exiv2::Internal::TiffImageEntry::doSize
virtual uint32_t doSize() const
Implements size(). Return the size of the strip pointers.
Definition: tiffcomposite_int.cpp:1687
Exiv2::Internal::TiffPath
std::stack< TiffPathItem > TiffPath
Stack to hold a path from the TIFF root element to a TIFF entry.
Definition: tifffwd_int.hpp:111
Exiv2::Internal::TiffDirectory::doWriteData
virtual uint32_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const
This class does not really implement writeData(), it only has write(). This method must not be called...
Definition: tiffcomposite_int.cpp:1474
Exiv2::Internal::EncoderFct
void(TiffEncoder::* EncoderFct)(TiffEntryBase *, const Exifdatum *)
Function pointer type for a TiffDecoder member function to decode a TIFF component.
Definition: tifffwd_int.hpp:88
Exiv2::Exifdatum
An Exif metadatum, consisting of an ExifKey and a Value and methods to manipulate these.
Definition: exif.hpp:59
Exiv2::Internal::newTiffMnEntry
TiffComponent::AutoPtr newTiffMnEntry(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF makernote entry.
Definition: tiffcomposite_int.cpp:1910
Exiv2::Internal::TiffEncoder::encodeSizeEntry
void encodeSizeEntry(TiffSizeEntry *object, const Exifdatum *datum)
Callback encoder function for a size entry.
Definition: tiffvisitor_int.cpp:1076
Exiv2::Internal::TiffBinaryElement
Element of a TiffBinaryArray.
Definition: tiffcomposite_int.hpp:1495
Exiv2::Internal::IfdId
IfdId
Type to specify the IFD to which a metadata belongs.
Definition: tags_int.hpp:54
Exiv2::Internal::TiffImageEntry::setStrips
virtual void setStrips(const Value *pSize, const byte *pData, uint32_t sizeData, uint32_t baseOffset)
Set the data areas ("strips").
Definition: tiffcomposite_int.cpp:467
Exiv2::Internal::TiffBinaryArray::setDecoded
void setDecoded(bool decoded)
Set a flag to indicate if the array was decoded.
Definition: tiffcomposite_int.hpp:1408
types.hpp
Type definitions for Exiv2 and related functionality.
Exiv2::Internal::ArraySet
Combination of array configuration and definition for arrays.
Definition: tiffcomposite_int.hpp:1345
Exiv2::Internal::TiffEntryBase::setData
void setData(byte *pData, int32_t size)
Set pointer and size of the entry's data (not taking ownership of the data).
Definition: tiffcomposite_int.cpp:366
Exiv2::Internal::TiffMappingInfo::Key::g_
IfdId g_
Group
Definition: tiffcomposite_int.hpp:405
Exiv2::Internal::TiffDataEntry::doSizeData
virtual uint32_t doSizeData() const
Implements sizeData(). Return the size of the data area.
Definition: tiffcomposite_int.cpp:1770
Exiv2::Internal::TiffVisitor::go
bool go(GoEvent event) const
Check if stop flag for event is clear, return true if it's clear.
Definition: tiffvisitor_int.cpp:102
Exiv2::undefined
@ undefined
Exif UNDEFINED type, an 8-bit byte that may contain anything.
Definition: types.hpp:137
Exiv2::Internal::ArrayCfg::group_
IfdId group_
Group for the elements.
Definition: tiffcomposite_int.hpp:1334
Exiv2::Internal::TiffEntryBase::setValue
void setValue(Value::AutoPtr value)
Set tag value. Takes ownership of the pointer passed in.
Definition: tiffcomposite_int.cpp:391
Exiv2::Internal::TiffSizeEntry::doClone
virtual TiffSizeEntry * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:312
Exiv2::Internal::newTiffImageData
TiffComponent::AutoPtr newTiffImageData(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF entry for image data.
Definition: tiffcomposite_int.hpp:1651
Exiv2::Internal::TiffIfdMakernote::doAddNext
virtual TiffComponent * doAddNext(TiffComponent::AutoPtr tiffComponent)
Implements addNext(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:882
Exiv2::Internal::TiffEncoder::encodeSubIfd
void encodeSubIfd(TiffSubIfd *object, const Exifdatum *datum)
Callback encoder function for a sub-IFD entry.
Definition: tiffvisitor_int.cpp:1081
Exiv2::Internal::TiffVisitor::visitBinaryArray
virtual void visitBinaryArray(TiffBinaryArray *object)=0
Operation to perform for a binary array.
Exiv2::Internal::TiffComponent::count
uint32_t count() const
Return the number of components in this component.
Definition: tiffcomposite_int.cpp:1012
Exiv2::Internal::TiffDirectory::doAccept
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:912
Exiv2::Internal::TiffEncoder::encodeImageEntry
void encodeImageEntry(TiffImageEntry *object, const Exifdatum *datum)
Callback encoder function for an image entry.
Definition: tiffvisitor_int.cpp:998
Exiv2::DataBuf::release
EXV_WARN_UNUSED_RESULT std::pair< byte *, long > release()
Release ownership of the buffer to the caller. Returns the buffer as a data pointer and size pair,...
Definition: types.cpp:172
Exiv2::Internal::ttTiffIfd
const TiffType ttTiffIfd
TIFF IFD type.
Definition: tiffcomposite_int.hpp:68
Exiv2::Internal::TiffIfdMakernote::setByteOrder
void setByteOrder(ByteOrder byteOrder)
Set the byte order for the makernote.
Definition: tiffcomposite_int.cpp:547
Exiv2::comment
@ comment
Exiv2 type for the Exif user comment.
Definition: types.hpp:150
Exiv2::Internal::TiffVisitor::visitMnEntry
virtual void visitMnEntry(TiffMnEntry *object)=0
Operation to perform for the makernote component.
Exiv2::Internal::TiffBinaryArray::TiffBinaryArray
TiffBinaryArray(uint16_t tag, IfdId group, const ArrayCfg *arrayCfg, const ArrayDef *arrayDef, int defSize)
Constructor.
Definition: tiffcomposite_int.cpp:128
Exiv2::Internal::TiffVisitor::geTraverse
@ geTraverse
Signal to control traversing of the composite tree.
Definition: tiffvisitor_int.hpp:78
Exiv2::Internal::TiffEntry
A standard TIFF IFD entry.
Definition: tiffcomposite_int.hpp:566
Exiv2::Internal::TiffSubIfd::TiffSubIfd
TiffSubIfd(uint16_t tag, IfdId group, IfdId newGroup)
Default constructor.
Definition: tiffcomposite_int.cpp:105
Exiv2::Internal::TiffComponent
Interface class for components of a TIFF directory hierarchy (Composite pattern). Both TIFF directori...
Definition: tiffcomposite_int.hpp:174
Exiv2::Internal::TiffBinaryArray::def
const ArrayDef * def() const
Return a pointer to the definition.
Definition: tiffcomposite_int.hpp:1416
Exiv2::Internal::ArrayCfg::hasSize_
bool hasSize_
If true, first tag is the size element.
Definition: tiffcomposite_int.hpp:1338
Exiv2::Internal::TiffSubIfd::doWriteImage
virtual uint32_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Implements writeImage(). Write the image data of each sub-IFD to the ioWrapper. Return the number of ...
Definition: tiffcomposite_int.cpp:1589
Exiv2::Internal::TiffComponent::doWriteData
virtual uint32_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const =0
Implements writeData().
Exiv2::Internal::TiffEntry::~TiffEntry
virtual ~TiffEntry()
Virtual destructor.
Definition: tiffcomposite_int.cpp:206
Exiv2::Internal::TiffMnEntry
This class is the basis for Makernote support in TIFF. It contains a pointer to a concrete Makernote....
Definition: tiffcomposite_int.hpp:1073
Exiv2::Internal::TiffBinaryArray::doClone
virtual TiffBinaryArray * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:339
Exiv2::Internal::TiffBinaryArray::updOrigDataBuf
bool updOrigDataBuf(const byte *pData, uint32_t size)
Update the original data buffer and its size, return true if successful.
Definition: tiffcomposite_int.cpp:604
Exiv2::Internal::TiffIfdMakernote::doWrite
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Write the Makernote header, TIFF directory, values and additional data to the ioW...
Definition: tiffcomposite_int.cpp:1371
Exiv2::Internal::TiffBinaryElement::doCount
virtual uint32_t doCount() const
Implements count(). Returns the count from the element definition.
Definition: tiffcomposite_int.cpp:1065
Exiv2::Internal::TiffMappingInfo::Key
Search key for TIFF mapping structures.
Definition: tiffcomposite_int.hpp:400
Exiv2::Internal::ttSignedRational
const TiffType ttSignedRational
Exif SRATIONAL type.
Definition: tiffcomposite_int.hpp:65
Exiv2::Value::count
virtual long count() const =0
Return the number of components of the value.
Exiv2::Internal::TiffBinaryArray::doAddPath
virtual TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, TiffComponent::AutoPtr object)
Implements addPath(). Todo: Document it!
Definition: tiffcomposite_int.cpp:764
Exiv2::Internal::Tag::none
const uint32_t none
Dummy tag.
Definition: tiffcomposite_int.hpp:79
Exiv2::Internal::ArrayDef::idx_
uint32_t idx_
Index in bytes from the start.
Definition: tiffcomposite_int.hpp:1321
Exiv2::Internal::TiffSubIfd::doSizeImage
virtual uint32_t doSizeImage() const
Implements sizeImage(). Return the sum of the image sizes of all sub-IFDs.
Definition: tiffcomposite_int.cpp:1808
Exiv2::Internal::TiffEntry::doClone
virtual TiffEntry * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:297
Exiv2::Internal::TiffEntryBase::doCount
virtual uint32_t doCount() const
Implements count().
Definition: tiffcomposite_int.cpp:1022
Exiv2::Internal::TiffEntryBase::~TiffEntryBase
virtual ~TiffEntryBase()
Virtual destructor.
Definition: tiffcomposite_int.cpp:198
Exiv2::Internal::ttUnsignedRational
const TiffType ttUnsignedRational
Exif RATIONAL type.
Definition: tiffcomposite_int.hpp:60
Exiv2::Internal::TiffImageEntry::doSizeImage
virtual uint32_t doSizeImage() const
Implements sizeImage(). Return the size of the image data area.
Definition: tiffcomposite_int.cpp:1827
Exiv2::Internal::TiffMnEntry::doAccept
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:933
Exiv2::Internal::Tag::next
const uint32_t next
Special tag: next IFD.
Definition: tiffcomposite_int.hpp:81
Exiv2::Internal::TiffIfdMakernote::doAccept
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:944
Exiv2::Internal::TiffIfdMakernote::doAddChild
virtual TiffComponent * doAddChild(TiffComponent::AutoPtr tiffComponent)
Implements addChild(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:840
Exiv2::Internal::TiffEntryBase::doSizeImage
virtual uint32_t doSizeImage() const
Implements sizeImage(). Return 0.
Definition: tiffcomposite_int.cpp:1822
Exiv2::Internal::TiffVisitor::visitDirectoryEnd
virtual void visitDirectoryEnd(TiffDirectory *object)
Operation to perform for a TIFF directory, at the end of the processing.
Definition: tiffvisitor_int.cpp:112
EXV_MAX
#define EXV_MAX(a, b)
Simple common max macro.
Definition: types.hpp:83
Exiv2::Internal::TiffComponent::TiffComponent
TiffComponent(uint16_t tag, IfdId group)
Constructor.
Definition: tiffcomposite_int.cpp:92
Exiv2::Internal::toTypeId
TypeId toTypeId(TiffType tiffType, uint16_t tag, IfdId group)
Convert the tiffType of a tag and group to an Exiv2 typeId.
Definition: tiffcomposite_int.cpp:1858
Exiv2::Internal::newTiffImageSize
TiffComponent::AutoPtr newTiffImageSize(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF entry for image data (size)
Definition: tiffcomposite_int.hpp:1659
Exiv2::Internal::TiffMappingInfo::group_
IfdId group_
Group that contains the tag.
Definition: tiffcomposite_int.hpp:393
Exiv2::Internal::TiffMappingInfo::operator==
bool operator==(const Key &key) const
Compare a TiffMappingInfo with a TiffMappingInfo::Key. The two are equal if TiffMappingInfo::make_ eq...
Definition: tiffcomposite_int.cpp:55
Exiv2::Internal::TiffEntryBase::idx
virtual int idx() const
Return the unique id of the entry in the image.
Definition: tiffcomposite_int.cpp:354
Exiv2::Internal::Tag::all
const uint32_t all
Special tag: all tags in a group.
Definition: tiffcomposite_int.hpp:82
Exiv2::Internal::TiffComponent::group
IfdId group() const
Return the group id of this component.
Definition: tiffcomposite_int.hpp:260
Exiv2::Internal::TiffEntry::TiffEntry
TiffEntry(uint16_t tag, IfdId group)
Constructor.
Definition: tiffcomposite_int.hpp:571
Exiv2::Internal::TiffBinaryArray::defSize
int defSize() const
Return the number of elements in the definition.
Definition: tiffcomposite_int.hpp:1418
Exiv2::Internal::TiffDirectory::doSize
virtual uint32_t doSize() const
Implements size(). Return the size of the TIFF directory, values and additional data,...
Definition: tiffcomposite_int.cpp:1655
Exiv2::Internal::TiffComponent::writeImage
uint32_t writeImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the image data of this component to a binary image. Return the number of bytes written....
Definition: tiffcomposite_int.cpp:1554
tifffwd_int.hpp
Internal TIFF parser related typedefs and forward definitions.
Exiv2::Internal::TiffPathItem::group
IfdId group() const
Return the group.
Definition: tiffcomposite_int.hpp:106
Exiv2::Internal::TiffSizeEntry::TiffSizeEntry
TiffSizeEntry(uint16_t tag, IfdId group, uint16_t dtTag, IfdId dtGroup)
Constructor.
Definition: tiffcomposite_int.hpp:824
Exiv2::Internal::TiffBinaryElement::setElByteOrder
void setElByteOrder(ByteOrder byteOrder)
Set the byte order of this element.
Definition: tiffcomposite_int.hpp:1514
Exiv2::Internal::TiffImageEntry
A standard TIFF IFD entry consisting of a value which is an array of offsets to image data areas....
Definition: tiffcomposite_int.hpp:736
Exiv2::Internal::TiffEntryBase::pValue
const Value * pValue() const
Return a const pointer to the converted value of this component.
Definition: tiffcomposite_int.hpp:476
Exiv2::Internal::groupName
const char * groupName(IfdId ifdId)
Return the group name for a group id.
Definition: tags_int.cpp:2158
Exiv2::Internal::IoWrapper
Simple IO wrapper to ensure that the header is only written if there is any other data at all.
Definition: tiffcomposite_int.hpp:124
Exiv2::Internal::TiffDirectory::hasNext
bool hasNext() const
Return true if the directory has a next pointer.
Definition: tiffcomposite_int.hpp:876
Exiv2::Internal::ArrayCfg::elTiffType_
TiffType elTiffType_
Type for the array entry and the size element, if any.
Definition: tiffcomposite_int.hpp:1336
enforce.hpp
Port of D's enforce() to C++ & Exiv2.
Exiv2::Internal::TiffBinaryArray::doCount
virtual uint32_t doCount() const
Implements count(). Todo: Document it!
Definition: tiffcomposite_int.cpp:1043
Exiv2::Internal::TiffMnEntry::doWrite
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write() by forwarding the call to the actual concrete Makernote, if there is one.
Definition: tiffcomposite_int.cpp:1358
Exiv2::Value::dataArea
virtual DataBuf dataArea() const
Return a copy of the data area if the value has one. The caller owns this copy and DataBuf ensures th...
Definition: value.cpp:193
Exiv2::Internal::TiffMappingInfo::Key::Key
Key(const std::string &m, uint32_t e, IfdId g)
Constructor.
Definition: tiffcomposite_int.hpp:402
Exiv2::Internal::TiffEncoder::encodeBinaryArray
void encodeBinaryArray(TiffBinaryArray *object, const Exifdatum *datum)
Callback encoder function for a binary array.
Definition: tiffvisitor_int.cpp:951
Exiv2::Internal::TiffDataEntry::TiffDataEntry
TiffDataEntry(uint16_t tag, IfdId group, uint16_t szTag, IfdId szGroup)
Constructor.
Definition: tiffcomposite_int.hpp:659
Exiv2::Internal::MnHeader::size
virtual uint32_t size() const =0
Return the size of the header (in bytes).
Exiv2::Internal::TiffIfdMakernote::writeHeader
uint32_t writeHeader(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition: tiffcomposite_int.cpp:558
Exiv2::Internal::TiffComponent::doCount
virtual uint32_t doCount() const =0
Implements count().
Exiv2::Internal::TiffDataEntry::setStrips
virtual void setStrips(const Value *pSize, const byte *pData, uint32_t sizeData, uint32_t baseOffset)
Set the data areas ("strips").
Definition: tiffcomposite_int.cpp:400
Exiv2::Internal::ArrayCfg
Additional configuration for a binary array.
Definition: tiffcomposite_int.hpp:1327
Exiv2::Internal::TiffDirectory::~TiffDirectory
virtual ~TiffDirectory()
Virtual destructor.
Definition: tiffcomposite_int.cpp:183
Exiv2::Internal::TiffEntryBase::doSizeData
virtual uint32_t doSizeData() const
Implements sizeData(). Return 0.
Definition: tiffcomposite_int.cpp:1755
Exiv2::Internal::TiffVisitor::visitDataEntry
virtual void visitDataEntry(TiffDataEntry *object)=0
Operation to perform for a TIFF data entry.
Exiv2::Internal::TiffComponent::addChild
TiffComponent * addChild(AutoPtr tiffComponent)
Add a child to the component. Default is to do nothing.
Definition: tiffcomposite_int.cpp:806
tiffimage_int.hpp
Internal class TiffParserWorker to parse TIFF data.
Exiv2::Internal::TiffComponent::doSizeData
virtual uint32_t doSizeData() const =0
Implements sizeData().
Exiv2::Internal::TiffEntryBase::doWrite
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Write the value of a standard TIFF entry to the ioWrapper, return the number of b...
Definition: tiffcomposite_int.cpp:1245
Exiv2::Internal::ttUnsignedLong
const TiffType ttUnsignedLong
Exif LONG type.
Definition: tiffcomposite_int.hpp:59
Exiv2::Internal::TiffComponent::Components
std::vector< TiffComponent * > Components
Container type to hold all metadata.
Definition: tiffcomposite_int.hpp:179
Exiv2::Internal::TiffMappingInfo
TIFF mapping table for functions to decode special cases.
Definition: tiffcomposite_int.hpp:376
Exiv2::Internal::TiffImageEntry::doAccept
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:902
Exiv2::Internal::TiffEntryBase::doWriteImage
virtual uint32_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Implements writeImage(). Standard TIFF entries have no image data: write nothing and return 0.
Definition: tiffcomposite_int.cpp:1583
Exiv2::Internal::TiffEntry::doAccept
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:892
enforce
void enforce(bool condition, const T &arg1)
Ensure that condition is true, otherwise throw an exception of the type exception_t.
Definition: enforce.hpp:43
Exiv2::Internal::TiffIfdMakernote::sizeHeader
uint32_t sizeHeader() const
Return the size of the header in bytes.
Definition: tiffcomposite_int.cpp:552
Exiv2::Internal::TiffSizeEntry
A TIFF IFD entry containing the size of a data area of a related TiffDataEntry. This component is use...
Definition: tiffcomposite_int.hpp:819
Exiv2::Internal::TiffMnEntry::doSize
virtual uint32_t doSize() const
Implements size() by forwarding the call to the actual concrete Makernote, if there is one.
Definition: tiffcomposite_int.cpp:1697
Exiv2::Internal::TiffIfdMakernote::doWriteImage
virtual uint32_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Implements writeImage(). Write the image data of the IFD of the Makernote. Return the number of bytes...
Definition: tiffcomposite_int.cpp:1599
Exiv2::Internal::TiffDataEntry::~TiffDataEntry
virtual ~TiffDataEntry()
Virtual destructor.
Definition: tiffcomposite_int.cpp:214
Exiv2::Internal::TiffComponent::sizeImage
uint32_t sizeImage() const
Return the size in bytes of the image data of this component when written to a binary image....
Definition: tiffcomposite_int.cpp:1791
Exiv2::Internal::TiffDirectory::doAddNext
virtual TiffComponent * doAddNext(TiffComponent::AutoPtr tiffComponent)
Implements addNext(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:863
Exiv2::Internal::ArraySet::defSize_
const int defSize_
Size of the array definition array.
Definition: tiffcomposite_int.hpp:1348
Exiv2::Internal::TiffPathItem::extendedTag
uint32_t extendedTag() const
Return the extended tag (32 bit so that it can contain special tags)
Definition: tiffcomposite_int.hpp:104
Exiv2::Internal::TiffImageEntry::doSizeData
virtual uint32_t doSizeData() const
Implements sizeData(). Return the size of the image data area.
Definition: tiffcomposite_int.cpp:1760
Exiv2::Internal::TiffPathItem::tag
uint16_t tag() const
Return the tag corresponding to the extended tag.
Definition: tiffcomposite_int.hpp:102
Exiv2::Internal::TiffImageEntry::doWriteData
virtual uint32_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const
Implements writeData(). Write the image data area to the ioWrapper. Return the number of bytes writte...
Definition: tiffcomposite_int.cpp:1496
Exiv2::Internal::MnHeader::write
virtual uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const =0
Write the header to a data buffer, return the number of bytes written.
Exiv2::Internal::TiffComponent::clone
AutoPtr clone() const
Return an auto-pointer to a copy of itself (deep copy, but without any children). The caller owns thi...
Definition: tiffcomposite_int.cpp:292
Exiv2::Internal::ttSignedLong
const TiffType ttSignedLong
Exif SLONG type.
Definition: tiffcomposite_int.hpp:64
Exiv2::Internal::TiffDataEntryBase::szGroup
IfdId szGroup() const
Return the group of the entry which has the size.
Definition: tiffcomposite_int.hpp:632
Exiv2::Internal::TiffBinaryElement::doWrite
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Todo: Document it!
Definition: tiffcomposite_int.cpp:1450
Exiv2::Internal::TiffBinaryArray::~TiffBinaryArray
virtual ~TiffBinaryArray()
Virtual destructor.
Definition: tiffcomposite_int.cpp:236
Exiv2::Internal::TiffIfdMakernote::doAddPath
virtual TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, TiffComponent::AutoPtr object)
Implements addPath(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:756
Exiv2::DataBuf
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:204
Exiv2::l2Data
EXIV2API long l2Data(byte *buf, int32_t l, ByteOrder byteOrder)
Convert a signed long to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:445
Exiv2::Internal::TiffBinaryArray::decoded
bool decoded() const
Return the flag which indicates if the array was decoded.
Definition: tiffcomposite_int.hpp:1420
Exiv2::unsignedByte
@ unsignedByte
Exif BYTE type, 8-bit unsigned integer.
Definition: types.hpp:131
Exiv2::us2Data
EXIV2API long us2Data(byte *buf, uint16_t s, ByteOrder byteOrder)
Convert an unsigned short to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:395
Exiv2::Internal::TiffEncoder::encodeTiffEntry
void encodeTiffEntry(TiffEntry *object, const Exifdatum *datum)
Callback encoder function for a standard TIFF entry.
Definition: tiffvisitor_int.cpp:993
Exiv2::signedByte
@ signedByte
Exif SBYTE type, an 8-bit signed (twos-complement) integer.
Definition: types.hpp:136
Exiv2::Internal::TiffBinaryElement::doClone
virtual TiffBinaryElement * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:344
Exiv2::Internal::TiffVisitor::visitEntry
virtual void visitEntry(TiffEntry *object)=0
Operation to perform for a TIFF entry.
Exiv2::Internal::ArraySet::def_
const ArrayDef * def_
Binary array definition array.
Definition: tiffcomposite_int.hpp:1347
Exiv2::BasicIo::putb
virtual int putb(byte data)=0
Write one byte to the IO source. Current IO position is advanced by one byte.
Exiv2::Internal::TiffDecoder
TIFF composite visitor to decode metadata from the TIFF tree and add it to an Image,...
Definition: tiffvisitor_int.hpp:284
Exiv2::DataBuf::size_
long size_
The current size of the buffer.
Definition: types.hpp:271
Exiv2::Internal::TiffComponent::doSize
virtual uint32_t doSize() const =0
Implements size().
Exiv2::Internal::TiffDirectory::doWrite
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Write the TIFF directory, values and additional data, including the next-IFD,...
Definition: tiffcomposite_int.cpp:1080
Exiv2::Internal::newTiffDirectory
TiffComponent::AutoPtr newTiffDirectory(uint16_t tag, IfdId)
Function to create and initialize a new TIFF directory.
Definition: tiffcomposite_int.hpp:1596
Exiv2::Internal::TiffMappingInfo::decoderFct_
DecoderFct decoderFct_
Decoder function for matching tags.
Definition: tiffcomposite_int.hpp:394
Exiv2::Internal::MnHeader::setByteOrder
virtual void setByteOrder(ByteOrder byteOrder)
Set the byte order for the makernote.
Definition: makernote_int.cpp:211
Exiv2::Internal::TiffDirectory::doWriteImage
virtual uint32_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Implements writeImage(). Write the image data of the TIFF directory to the ioWrapper by forwarding th...
Definition: tiffcomposite_int.cpp:1560
Exiv2::Internal::Tag::pana
const uint32_t pana
Special tag: root IFD of Panasonic RAW images.
Definition: tiffcomposite_int.hpp:83
Exiv2::Internal::TiffIfdMakernote::~TiffIfdMakernote
virtual ~TiffIfdMakernote()
Virtual destructor.
Definition: tiffcomposite_int.cpp:231
Exiv2::Internal::TiffDataEntry
A standard TIFF IFD entry consisting of a value which is an offset to a data area and the data area....
Definition: tiffcomposite_int.hpp:653
Exiv2::Internal::TiffEntryBase::pData
const byte * pData() const
Return a pointer to the binary representation of the value of this component.
Definition: tiffcomposite_int.hpp:474
Exiv2::Internal::TiffIfdMakernote::doClone
virtual TiffIfdMakernote * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:333
Exiv2::Internal::TiffBinaryElement::doEncode
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:972
Exiv2::Internal::IoWrapper::setTarget
void setTarget(int id, uint32_t target)
Wrapper for OffsetWriter::setTarget(), using an int instead of the enum to reduce include deps.
Definition: tiffcomposite_int.cpp:87
Exiv2::Internal::cmpTagLt
bool cmpTagLt(TiffComponent const *lhs, TiffComponent const *rhs)
Compare two TIFF component pointers by tag. Return true if the tag of component lhs is less than that...
Definition: tiffcomposite_int.cpp:1890
Exiv2::Internal::TiffEntryBase::encode
void encode(TiffEncoder &encoder, const Exifdatum *datum)
Encode a TIFF component from the metadatum provided and information from the encoder as needed.
Definition: tiffcomposite_int.cpp:967
Exiv2::Internal::ArraySet::cfg_
const ArrayCfg cfg_
Binary array configuration.
Definition: tiffcomposite_int.hpp:1346
Exiv2::Internal::TiffDataEntryBase::~TiffDataEntryBase
virtual ~TiffDataEntryBase()
Virtual destructor.
Definition: tiffcomposite_int.cpp:210
Exiv2::Internal::TiffEncoder::encodeBinaryElement
void encodeBinaryElement(TiffBinaryElement *object, const Exifdatum *datum)
Callback encoder function for an element of a binary array.
Definition: tiffvisitor_int.cpp:956
Exiv2::Internal::TiffDataEntry::doAccept
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:897
Exiv2::Internal::TiffMnEntry::doEncode
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:997
Exiv2::Internal::TiffMappingInfo::Key::m_
std::string m_
Camera make.
Definition: tiffcomposite_int.hpp:403
Exiv2::Internal::TiffBinaryElement::elByteOrder
ByteOrder elByteOrder() const
Return the byte order of this element.
Definition: tiffcomposite_int.hpp:1526
Exiv2::Internal::TiffComponent::doWrite
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)=0
Implements write().
Exiv2::Value::toLong
virtual long toLong(long n=0) const =0
Convert the n-th component of the value to a long. The behaviour of this method may be undefined if t...
Exiv2::Internal::TiffBinaryElement::~TiffBinaryElement
virtual ~TiffBinaryElement()
Virtual destructor.
Definition: tiffcomposite_int.cpp:243
Exiv2::Internal::ArrayDef::count_
uint32_t count_
Number of components.
Definition: tiffcomposite_int.hpp:1323
Exiv2::Internal::TiffSizeEntry::dtGroup
IfdId dtGroup() const
Return the group of the related entry which has the data area.
Definition: tiffcomposite_int.hpp:835
Exiv2::Value::copy
virtual long copy(byte *buf, ByteOrder byteOrder) const =0
Write value to a data buffer.
Exiv2::Internal::TiffVisitor::visitBinaryElement
virtual void visitBinaryElement(TiffBinaryElement *object)=0
Operation to perform for an element of a binary array.
makernote_int.hpp
Makernote factory and registry, IFD makernote header, and camera vendor specific makernote implementa...
Exiv2::Internal::TiffSubIfd::doSizeData
virtual uint32_t doSizeData() const
Implements sizeData(). Return the sum of the sizes of all sub-IFDs.
Definition: tiffcomposite_int.cpp:1776
Exiv2
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
Exiv2::Internal::TiffDataEntry::doClone
virtual TiffDataEntry * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:302
Exiv2::Internal::TiffDataEntry::doWriteData
virtual uint32_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const
Implements writeData(). Write the data area to the ioWrapper. Return the number of bytes written.
Definition: tiffcomposite_int.cpp:1510
Exiv2::Internal::TiffMappingInfo::extendedTag_
uint32_t extendedTag_
Tag (32 bit so that it can contain special tags)
Definition: tiffcomposite_int.hpp:392
value.hpp
Value interface and concrete subclasses.
Exiv2::Internal::TiffMnEntry::doAddNext
virtual TiffComponent * doAddNext(TiffComponent::AutoPtr tiffComponent)
Implements addNext(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:873
Exiv2::Internal::TiffVisitor::visitImageEntry
virtual void visitImageEntry(TiffImageEntry *object)=0
Operation to perform for a TIFF image entry.
Exiv2::Internal::TiffDataEntry::doWrite
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Write pointers into the data area to the ioWrapper, relative to the offsets in th...
Definition: tiffcomposite_int.cpp:1283
Exiv2::Internal::ArrayCfg::cryptFct_
CryptFct cryptFct_
Crypt function, 0 if not used.
Definition: tiffcomposite_int.hpp:1337
Exiv2::TypeId
TypeId
Exiv2 value type identifiers.
Definition: types.hpp:130
Exiv2::Internal::MnHeader::read
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)=0
Read the header from a data buffer, return true if ok.
Exiv2::Internal::TiffBinaryArray::initialize
bool initialize(IfdId group)
Setup cfg and def for the component, in case of a complex binary array. Else do nothing....
Definition: tiffcomposite_int.cpp:570
Exiv2::Internal::toTiffType
TiffType toTiffType(TypeId typeId)
Convert the Exiv2 typeId to a TIFF value type.
Definition: tiffcomposite_int.cpp:1877
Exiv2::Internal::TiffDataEntryBase::szTag
uint16_t szTag() const
Return the group of the entry which has the size.
Definition: tiffcomposite_int.hpp:630
Exiv2::Internal::TiffIfdMakernote::doCount
virtual uint32_t doCount() const
Implements count(). Return the number of entries in the IFD of the Makernote. Does not count entries ...
Definition: tiffcomposite_int.cpp:1038
Exiv2::Internal::TiffMappingInfo::tag
uint16_t tag() const
Return the tag corresponding to the extended tag.
Definition: tiffcomposite_int.hpp:388
Exiv2::ul2Data
EXIV2API long ul2Data(byte *buf, uint32_t l, ByteOrder byteOrder)
Convert an unsigned long to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:408
Exiv2::Internal::TiffComponent::addNext
TiffComponent * addNext(AutoPtr tiffComponent)
Add a "next" component to the component. Default is to do nothing.
Definition: tiffcomposite_int.cpp:853
Exiv2::TypeInfo::typeName
static const char * typeName(TypeId typeId)
Return the name of the type, 0 if unknown.
Definition: types.cpp:107
Exiv2::Internal::TiffVisitor::visitBinaryArrayEnd
virtual void visitBinaryArrayEnd(TiffBinaryArray *object)
Operation to perform for a TIFF binary array, at the end of the processing.
Definition: tiffvisitor_int.cpp:120
Exiv2::Internal::TiffCreator::create
static std::auto_ptr< TiffComponent > create(uint32_t extendedTag, IfdId group)
Create the TiffComponent for TIFF entry extendedTag and group. The embedded lookup table is used to f...
Definition: tiffimage_int.cpp:1624
EXV_MIN
#define EXV_MIN(a, b)
Simple common min macro.
Definition: types.hpp:81
Exiv2::TagInfo
Tag information.
Definition: tags.hpp:82
Exiv2::Internal::TiffComponent::doAccept
virtual void doAccept(TiffVisitor &visitor)=0
Implements accept().
Exiv2::Internal::exifTagList
const TagInfo * exifTagList()
Return read-only list of built-in Exif IFD tags.
Definition: tags_int.cpp:1761
Exiv2::Internal::TiffDirectory::doClone
virtual TiffDirectory * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:317
Exiv2::Internal::TiffBinaryArray::cfg
const ArrayCfg * cfg() const
Return a pointer to the configuration.
Definition: tiffcomposite_int.hpp:1414
EXV_WARNING
#define EXV_WARNING
Shorthand for a temp warning log message object and return its ostringstream.
Definition: error.hpp:148
Exiv2::Internal::TiffEntryBase::doSize
virtual uint32_t doSize() const
Implements size(). Return the size of a standard TIFF entry.
Definition: tiffcomposite_int.cpp:1682
Exiv2::Internal::ttUnsignedByte
const TiffType ttUnsignedByte
Exif BYTE type.
Definition: tiffcomposite_int.hpp:56
Exiv2::Internal::TiffImageEntry::doEncode
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:992
Exiv2::Internal::TiffPathItem::TiffPathItem
TiffPathItem(uint32_t extendedTag, IfdId group)
Constructor.
Definition: tiffcomposite_int.hpp:95
Exiv2::Internal::ttUndefined
const TiffType ttUndefined
Exif UNDEFINED type.
Definition: tiffcomposite_int.hpp:62
Exiv2::Internal::TiffMappingInfo::encoderFct_
EncoderFct encoderFct_
Encoder function for matching tags.
Definition: tiffcomposite_int.hpp:395
Exiv2::Internal::TiffReader
TIFF composite visitor to read the TIFF structure from a block of memory and build the composite from...
Definition: tiffvisitor_int.hpp:630
Exiv2::BasicIo::write
virtual long write(const byte *data, long wcount)=0
Write data to the IO source. Current IO position is advanced by the number of bytes written.
Exiv2::Internal::TiffDataEntry::doEncode
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:982
Exiv2::Internal::TiffBinaryElement::doSize
virtual uint32_t doSize() const
Implements size(). Returns count * type-size, both taken from the element definition.
Definition: tiffcomposite_int.cpp:1738
Exiv2::Internal::TiffIfdMakernote::readHeader
bool readHeader(const byte *pData, uint32_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if successful.
Definition: tiffcomposite_int.cpp:539
Exiv2::Internal::TiffType
uint16_t TiffType
TIFF value type.
Definition: tiffcomposite_int.hpp:54
Exiv2::Internal::OffsetWriter
Class to insert pointers or offsets to computed addresses at specific locations in an image....
Definition: tiffimage_int.hpp:426
Exiv2::Internal::TiffEntryBase::setOffset
void setOffset(int32_t offset)
Set the offset.
Definition: tiffcomposite_int.hpp:438
Exiv2::Internal::TiffComponent::sizeData
uint32_t sizeData() const
Return the size in bytes of the IFD data of this component when written to a binary image....
Definition: tiffcomposite_int.cpp:1744
Exiv2::Internal::TiffComponent::doAddChild
virtual TiffComponent * doAddChild(AutoPtr tiffComponent)
Implements addChild(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:811
Exiv2::Internal::TiffBinaryElement::setElDef
void setElDef(const ArrayDef &def)
Set the array definition for this element.
Definition: tiffcomposite_int.hpp:1510
Exiv2::Internal::gpsTagList
const TagInfo * gpsTagList()
Return read-only list of built-in GPS tags.
Definition: tags_int.cpp:1934
Exiv2::Internal::TiffEntryBase::offset
int32_t offset() const
Return the offset to the data area relative to the base for the component (usually the start of the T...
Definition: tiffcomposite_int.hpp:465
Exiv2::Internal::ArrayDef::size
uint32_t size(uint16_t tag, IfdId group) const
Get the size in bytes of a tag.
Definition: tiffcomposite_int.cpp:564
Exiv2::ByteOrder
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:113
Exiv2::Internal::ArrayCfg::tagStep
uint32_t tagStep() const
Return the size of the default tag, which is used to calculate tag numbers as idx/tagStep.
Definition: tiffcomposite_int.hpp:1332
Exiv2::Internal::TiffBinaryArray
Composite to model an array of different tags. The tag types as well as other aspects of the array ar...
Definition: tiffcomposite_int.hpp:1356
Exiv2::Internal::TiffBinaryArray::iniOrigDataBuf
void iniOrigDataBuf()
Initialize the original data buffer and its size from the base entry.
Definition: tiffcomposite_int.cpp:598
Exiv2::Internal::TiffEntryBase::doWriteData
virtual uint32_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const
Implements writeData(). Standard TIFF entries have no data: write nothing and return 0.
Definition: tiffcomposite_int.cpp:1487
Exiv2::Internal::TiffEntry::doEncode
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:987
Exiv2::Internal::Tag::root
const uint32_t root
Special tag: root IFD.
Definition: tiffcomposite_int.hpp:80
Exiv2::Internal::TiffImageEntry::TiffImageEntry
TiffImageEntry(uint16_t tag, IfdId group, uint16_t szTag, IfdId szGroup)
Constructor.
Definition: tiffcomposite_int.hpp:742
Exiv2::Internal::TiffSubIfd::~TiffSubIfd
virtual ~TiffSubIfd()
Virtual destructor.
Definition: tiffcomposite_int.cpp:191
Exiv2::Internal::ttTiffDouble
const TiffType ttTiffDouble
TIFF DOUBLE type.
Definition: tiffcomposite_int.hpp:67
Exiv2::Internal::MnHeader::ifdOffset
virtual uint32_t ifdOffset() const
Return the offset to the start of the Makernote IFD from the start of the Makernote (= the start of t...
Definition: makernote_int.cpp:215
Exiv2::Internal::TiffVisitor::visitDirectoryNext
virtual void visitDirectoryNext(TiffDirectory *object)
Operation to perform for a TIFF directory, after all components and before the next entry is processe...
Definition: tiffvisitor_int.cpp:108
Exiv2::Internal::TiffImageEntry::doWriteImage
virtual uint32_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Implements writeImage(). Write the image data area to the ioWrapper. Return the number of bytes writt...
Definition: tiffcomposite_int.cpp:1609
Exiv2::Internal::TiffIfdMakernote::doSize
virtual uint32_t doSize() const
Implements size(). Return the size of the Makernote header, TIFF directory, values and additional dat...
Definition: tiffcomposite_int.cpp:1705
Exiv2::Internal::newTiffBinaryArray0
TiffComponent::AutoPtr newTiffBinaryArray0(uint16_t tag, IfdId group)
Function to create and initialize a new binary array entry.
Definition: tiffcomposite_int.hpp:1610
Exiv2::Internal::TiffComponent::doWriteImage
virtual uint32_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const =0
Implements writeImage().
Exiv2::Internal::TiffSubIfd::doEncode
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:1007
Exiv2::Internal::TiffImageEntry::~TiffImageEntry
virtual ~TiffImageEntry()
Virtual destructor.
Definition: tiffcomposite_int.cpp:218
Exiv2::Internal::IoWrapper::write
long write(const byte *pData, long wcount)
Wraps the corresponding BasicIo::write() method.
Definition: tiffcomposite_int.cpp:69
Exiv2::Internal::TiffSubIfd::doAccept
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:924
Exiv2::Error
BasicError< char > Error
Error class used for exceptions (std::string based)
Definition: error.hpp:323
Exiv2::Internal::newTiffEntry
TiffComponent::AutoPtr newTiffEntry(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF entry.
Definition: tiffcomposite_int.cpp:1905
Exiv2::Internal::ArrayCfg::concat_
bool concat_
If true, concatenate gaps between defined tags to single tags.
Definition: tiffcomposite_int.hpp:1340
Exiv2::Value::sizeDataArea
virtual long sizeDataArea() const
Return the size of the data area, 0 if there is none.
Definition: value.cpp:188
Exiv2::MemIo::mmap
virtual byte * mmap(bool=false)
Allow direct access to the underlying data buffer. The buffer is not protected against write access i...
Definition: basicio.cpp:1338
Exiv2::Internal::TiffSizeEntry::doEncode
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:1002
Exiv2::Internal::TiffComponent::write
uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Write a TiffComponent to a binary image.
Definition: tiffcomposite_int.cpp:1070
Exiv2::Internal::TiffDataEntryBase::TiffDataEntryBase
TiffDataEntryBase(uint16_t tag, IfdId group, uint16_t szTag, IfdId szGroup)
Constructor.
Definition: tiffcomposite_int.hpp:603
Exiv2::Internal::newTiffSubIfd
TiffComponent::AutoPtr newTiffSubIfd(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF sub-directory.
Definition: tiffcomposite_int.hpp:1603
Exiv2::Internal::TiffMnCreator::create
static TiffComponent * create(uint16_t tag, IfdId group, const std::string &make, const byte *pData, uint32_t size, ByteOrder byteOrder)
Create the Makernote for camera make and details from the makernote entry itself if needed....
Definition: makernote_int.cpp:166
Exiv2::Internal::TiffIfdMakernote::mnOffset
uint32_t mnOffset() const
Return the offset to the makernote from the start of the TIFF header.
Definition: tiffcomposite_int.cpp:528
Exiv2::Internal::TiffComponent::AutoPtr
std::auto_ptr< TiffComponent > AutoPtr
TiffComponent auto_ptr type.
Definition: tiffcomposite_int.hpp:177
Exiv2::Internal::TiffMnEntry::doCount
virtual uint32_t doCount() const
Implements count(). Return number of components in the entry.
Definition: tiffcomposite_int.cpp:1027
Exiv2::TagInfo::tag_
uint16_t tag_
Tag.
Definition: tags.hpp:95
Exiv2::Internal::TiffDirectory::doCount
virtual uint32_t doCount() const
Implements count(). Return the number of entries in the TIFF directory. Does not count entries which ...
Definition: tiffcomposite_int.cpp:1017
Exiv2::Internal::MnHeader
Makernote header interface. This class is used with TIFF makernotes.
Definition: makernote_int.hpp:136
Exiv2::Internal::TiffBinaryElement::elDef
const ArrayDef * elDef() const
Return the array definition of this element.
Definition: tiffcomposite_int.hpp:1522
Exiv2::string
@ string
IPTC string type.
Definition: types.hpp:147
Exiv2::Internal::TiffMappingInfo::make_
const char * make_
Camera make for which these mapping functions apply.
Definition: tiffcomposite_int.hpp:391
Exiv2::Internal::OffsetWriter::OffsetId
OffsetId
Identifiers for supported offsets.
Definition: tiffimage_int.hpp:429
Exiv2::Internal::TiffComponent::start
byte * start() const
Return a pointer to the start of the binary representation of the component.
Definition: tiffcomposite_int.hpp:262
Exiv2::Internal::ArrayCfg::elDefaultDef_
ArrayDef elDefaultDef_
Default element.
Definition: tiffcomposite_int.hpp:1341
Exiv2::Internal::TiffSubIfd::doClone
virtual TiffSubIfd * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:322
Exiv2::Internal::TiffBinaryArray::doEncode
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:977
Exiv2::Internal::TiffIfdMakernote::byteOrder
ByteOrder byteOrder() const
Return the byte order for the makernote. Requires the image byte order to be set (setImageByteOrder()...
Definition: tiffcomposite_int.cpp:519
Exiv2::Internal::TiffSubIfd::doSize
uint32_t doSize() const
Implements size(). Return the size of the sub-Ifd pointers.
Definition: tiffcomposite_int.cpp:1692
Exiv2::Internal::ttSignedByte
const TiffType ttSignedByte
Exif SBYTE type.
Definition: tiffcomposite_int.hpp:61
Exiv2::MemIo::size
virtual size_t size() const
Get the current memory buffer size in bytes.
Definition: basicio.cpp:1353
Exiv2::Internal::TiffVisitor::geKnownMakernote
@ geKnownMakernote
Signal used by TiffReader to signal an unknown makernote.
Definition: tiffvisitor_int.hpp:80
EXV_ERROR
#define EXV_ERROR
Shorthand for a temp error log message object and return its ostringstream.
Definition: error.hpp:150
Exiv2::Internal::TiffVisitor::visitDirectory
virtual void visitDirectory(TiffDirectory *object)=0
Operation to perform for a TIFF directory.
Exiv2::Internal::TiffSizeEntry::doAccept
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:907
Exiv2::Internal::TiffMappingInfo::Key::e_
uint32_t e_
Extended tag.
Definition: tiffcomposite_int.hpp:404
Exiv2::Internal::TiffComponent::doClone
virtual TiffComponent * doClone() const =0
Internal virtual copy constructor, implements clone().
Exiv2::Internal::TiffDirectory::doSizeImage
virtual uint32_t doSizeImage() const
Implements sizeImage(). Return the sum of the image sizes of all components plus that of the next-IFD...
Definition: tiffcomposite_int.cpp:1796
Exiv2::Internal::newTiffBinaryArray1
TiffComponent::AutoPtr newTiffBinaryArray1(uint16_t tag, IfdId group)
Function to create and initialize a new simple binary array entry.
Definition: tiffcomposite_int.hpp:1619
Exiv2::Internal::TiffEntryBase::doEncode
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)=0
Implements encode().
Exiv2::Internal::TiffDirectory::TiffDirectory
TiffDirectory(uint16_t tag, IfdId group, bool hasNext=true)
Default constructor.
Definition: tiffcomposite_int.hpp:867
Exiv2::BasicIo
An interface for simple binary IO.
Definition: basicio.hpp:55
Exiv2::Internal::TiffSubIfd
This class models a TIFF sub-directory (sub-IFD). A sub-IFD is an entry with one or more values that ...
Definition: tiffcomposite_int.hpp:984
Exiv2::Internal::ttTiffFloat
const TiffType ttTiffFloat
TIFF FLOAT type.
Definition: tiffcomposite_int.hpp:66
Exiv2::Internal::TiffImageEntry::doClone
virtual TiffImageEntry * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:307
Exiv2::Internal::TiffSubIfd::doAddChild
virtual TiffComponent * doAddChild(TiffComponent::AutoPtr tiffComponent)
Implements addChild(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:823
Exiv2::Internal::TiffSubIfd::doAddPath
virtual TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, TiffComponent::AutoPtr object)
Implements addPath(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:699
Exiv2::Internal::TiffIfdMakernote
Tiff IFD Makernote. This is a concrete class suitable for all IFD makernotes.
Definition: tiffcomposite_int.hpp:1149
Exiv2::Internal::ArrayDef
Defines one tag in a binary array.
Definition: tiffcomposite_int.hpp:1315
Exiv2::Internal::TiffEntryBase::TiffEntryBase
TiffEntryBase(uint16_t tag, IfdId group, TiffType tiffType=ttUndefined)
Default constructor.
Definition: tiffcomposite_int.cpp:97
Exiv2::Internal::ArrayDef::operator==
bool operator==(uint32_t idx) const
Comparison with idx.
Definition: tiffcomposite_int.hpp:1317
Exiv2::Internal::IoWrapper::IoWrapper
IoWrapper(BasicIo &io, const byte *pHeader, long size, OffsetWriter *pow)
Definition: tiffcomposite_int.cpp:63
Exiv2::Internal::TiffDataEntryBase::setStrips
virtual void setStrips(const Value *pSize, const byte *pData, uint32_t sizeData, uint32_t baseOffset)=0
Set the data areas ("strips").
Exiv2::Internal::TiffIfdMakernote::baseOffset
uint32_t baseOffset() const
Return the base offset for use with the makernote IFD entries relative to the start of the TIFF heade...
Definition: tiffcomposite_int.cpp:533
Exiv2::Internal::ttAsciiString
const TiffType ttAsciiString
Exif ASCII type.
Definition: tiffcomposite_int.hpp:57
Exiv2::Internal::TiffBinaryElement::doAccept
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:962
Exiv2::Internal::TiffEntryBase::setIdx
void setIdx(int idx)
Set the unique id of the entry in the image.
Definition: tiffcomposite_int.hpp:493
Exiv2::Internal::ttSignedShort
const TiffType ttSignedShort
Exif SSHORT type.
Definition: tiffcomposite_int.hpp:63
Exiv2::TypeInfo::typeSize
static long typeSize(TypeId typeId)
Return the size in bytes of one element of this type.
Definition: types.cpp:121
Exiv2::Internal::MnHeader::baseOffset
virtual uint32_t baseOffset(uint32_t mnOffset) const
Return the base offset for the makernote IFD entries relative to the start of the TIFF header....
Definition: makernote_int.cpp:225
Exiv2::Internal::TiffIfdMakernote::doWriteData
virtual uint32_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const
This class does not really implement writeData(), it only has write(). This method must not be called...
Definition: tiffcomposite_int.cpp:1544
Exiv2::Internal::TiffComponent::idx
virtual int idx() const
Return the unique id of the entry in the image.
Definition: tiffcomposite_int.cpp:349
Exiv2::Internal::TiffDirectory::doAddChild
virtual TiffComponent * doAddChild(TiffComponent::AutoPtr tiffComponent)
Implements addChild(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:816
Exiv2::Internal::newTiffThumbData
TiffComponent::AutoPtr newTiffThumbData(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF entry for a thumbnail (data)
Definition: tiffcomposite_int.hpp:1635
Exiv2::Value::AutoPtr
std::auto_ptr< Value > AutoPtr
Shortcut for a Value auto pointer.
Definition: value.hpp:63
Exiv2::Internal::TiffPathItem
A tupel consisting of extended Tag and group used as an item in TIFF paths.
Definition: tiffcomposite_int.hpp:90
Exiv2::Internal::TiffDirectory
This class models a TIFF directory (Ifd). It is a composite component of the TIFF tree.
Definition: tiffcomposite_int.hpp:861
Exiv2::Internal::TiffSubIfd::doWriteData
virtual uint32_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const
Implements writeData(). Write the sub-IFDs to the ioWrapper. Return the number of bytes written.
Definition: tiffcomposite_int.cpp:1527
Exiv2::Internal::ttUnsignedShort
const TiffType ttUnsignedShort
Exif SHORT type.
Definition: tiffcomposite_int.hpp:58
Exiv2::Internal::CryptFct
DataBuf(* CryptFct)(uint16_t, const byte *, uint32_t, TiffComponent *const)
Function pointer type for a crypt function used for binary arrays.
Definition: tiffcomposite_int.hpp:1312
Exiv2::Internal::TiffEntryBase::writeOffset
static uint32_t writeOffset(byte *buf, int32_t offset, TiffType tiffType, ByteOrder byteOrder)
Helper function to write an offset to a preallocated binary buffer.
Definition: tiffcomposite_int.cpp:1260
Exiv2::s2Data
EXIV2API long s2Data(byte *buf, int16_t s, ByteOrder byteOrder)
Convert a signed short to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:432
Exiv2::Internal::TiffBinaryArray::doWrite
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Todo: Document it!
Definition: tiffcomposite_int.cpp:1388
Exiv2::Internal::OffsetWriter::setTarget
void setTarget(OffsetId id, uint32_t target)
Set the target for offset id, i.e., the address to which the offset points.
Definition: tiffimage_int.cpp:2081
error.hpp
Error class for exceptions, log message class.
Exiv2::Internal::ArrayCfg::byteOrder_
ByteOrder byteOrder_
Byte order, invalidByteOrder to inherit.
Definition: tiffcomposite_int.hpp:1335
tiffcomposite_int.hpp
Internal classes used in a TIFF composite structure.
Exiv2::Internal::MnHeader::byteOrder
virtual ByteOrder byteOrder() const
Return the byte order for the makernote. If the return value is invalidByteOrder, this means that the...
Definition: makernote_int.cpp:220
Exiv2::Internal::newTiffBinaryElement
TiffComponent::AutoPtr newTiffBinaryElement(uint16_t tag, IfdId group)
Function to create and initialize a new binary array element.
Definition: tiffcomposite_int.cpp:1915
Exiv2::Internal::TiffVisitor::visitIfdMakernoteEnd
virtual void visitIfdMakernoteEnd(TiffIfdMakernote *object)
Operation to perform after processing an IFD makernote.
Definition: tiffvisitor_int.cpp:116
Exiv2::Internal::TiffDirectory::doAddPath
virtual TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, TiffComponent::AutoPtr object)
Implements addPath(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:647