@@ -78,7 +78,7 @@ namespace Exiv2 {
78
78
class EXIV2API Image {
79
79
public:
80
80
// ! Image auto_ptr type
81
- typedef std::auto_ptr <Image> AutoPtr ;
81
+ typedef std::unique_ptr <Image> UniquePtr ;
82
82
83
83
// ! @name Creators
84
84
// @{
@@ -89,7 +89,7 @@ namespace Exiv2 {
89
89
*/
90
90
Image (int imageType,
91
91
uint16_t supportedMetadata,
92
- BasicIo::AutoPtr io);
92
+ BasicIo::UniquePtr io);
93
93
// ! Virtual Destructor
94
94
virtual ~Image ();
95
95
// @}
@@ -481,7 +481,7 @@ namespace Exiv2 {
481
481
482
482
protected:
483
483
// DATA
484
- BasicIo::AutoPtr io_; // !< Image data IO pointer
484
+ BasicIo::UniquePtr io_; // !< Image data IO pointer
485
485
ExifData exifData_; // !< Exif data container
486
486
IptcData iptcData_; // !< IPTC data container
487
487
XmpData xmpData_; // !< XMP data container
@@ -519,7 +519,7 @@ namespace Exiv2 {
519
519
}; // class Image
520
520
521
521
// ! Type for function pointer that creates new Image instances
522
- typedef Image::AutoPtr (*NewInstanceFct)(BasicIo::AutoPtr io, bool create);
522
+ typedef Image::UniquePtr (*NewInstanceFct)(BasicIo::UniquePtr io, bool create);
523
523
// ! Type for function pointer that checks image types
524
524
typedef bool (*IsThisTypeFct)(BasicIo& iIo, bool advance);
525
525
@@ -545,13 +545,13 @@ namespace Exiv2 {
545
545
@throw Error If the file is not found or it is unable to connect to the server to
546
546
read the remote file.
547
547
*/
548
- static BasicIo::AutoPtr createIo (const std::string& path, bool useCurl = true );
548
+ static BasicIo::UniquePtr createIo (const std::string& path, bool useCurl = true );
549
549
#ifdef EXV_UNICODE_PATH
550
550
/* !
551
551
@brief Like createIo() but accepts a unicode path in an std::wstring.
552
552
@note This function is only available on Windows.
553
553
*/
554
- static BasicIo::AutoPtr createIo (const std::wstring& wpath, bool useCurl = true );
554
+ static BasicIo::UniquePtr createIo (const std::wstring& wpath, bool useCurl = true );
555
555
#endif
556
556
/* !
557
557
@brief Create an Image subclass of the appropriate type by reading
@@ -566,13 +566,13 @@ namespace Exiv2 {
566
566
@throw Error If opening the file fails or it contains data of an
567
567
unknown image type.
568
568
*/
569
- static Image::AutoPtr open (const std::string& path, bool useCurl = true );
569
+ static Image::UniquePtr open (const std::string& path, bool useCurl = true );
570
570
#ifdef EXV_UNICODE_PATH
571
571
/* !
572
572
@brief Like open() but accepts a unicode path in an std::wstring.
573
573
@note This function is only available on Windows.
574
574
*/
575
- static Image::AutoPtr open (const std::wstring& wpath, bool useCurl = true );
575
+ static Image::UniquePtr open (const std::wstring& wpath, bool useCurl = true );
576
576
#endif
577
577
/* !
578
578
@brief Create an Image subclass of the appropriate type by reading
@@ -585,7 +585,7 @@ namespace Exiv2 {
585
585
matches that of the data buffer.
586
586
@throw Error If the memory contains data of an unknown image type.
587
587
*/
588
- static Image::AutoPtr open (const byte* data, long size);
588
+ static Image::UniquePtr open (const byte* data, long size);
589
589
/* !
590
590
@brief Create an Image subclass of the appropriate type by reading
591
591
the provided BasicIo instance. %Image type is derived from the
@@ -603,7 +603,7 @@ namespace Exiv2 {
603
603
determined, the pointer is 0.
604
604
@throw Error If opening the BasicIo fails
605
605
*/
606
- static Image::AutoPtr open (BasicIo::AutoPtr io);
606
+ static Image::UniquePtr open (BasicIo::UniquePtr io);
607
607
/* !
608
608
@brief Create an Image subclass of the requested type by creating a
609
609
new image file. If the file already exists, it will be overwritten.
@@ -613,13 +613,13 @@ namespace Exiv2 {
613
613
type.
614
614
@throw Error If the image type is not supported.
615
615
*/
616
- static Image::AutoPtr create (int type, const std::string& path);
616
+ static Image::UniquePtr create (int type, const std::string& path);
617
617
#ifdef EXV_UNICODE_PATH
618
618
/* !
619
619
@brief Like create() but accepts a unicode path in an std::wstring.
620
620
@note This function is only available on Windows.
621
621
*/
622
- static Image::AutoPtr create (int type, const std::wstring& wpath);
622
+ static Image::UniquePtr create (int type, const std::wstring& wpath);
623
623
#endif
624
624
/* !
625
625
@brief Create an Image subclass of the requested type by creating a
@@ -629,7 +629,7 @@ namespace Exiv2 {
629
629
type.
630
630
@throw Error If the image type is not supported
631
631
*/
632
- static Image::AutoPtr create (int type);
632
+ static Image::UniquePtr create (int type);
633
633
/* !
634
634
@brief Create an Image subclass of the requested type by writing a
635
635
new image to a BasicIo instance. If the BasicIo instance already
@@ -644,7 +644,7 @@ namespace Exiv2 {
644
644
@return An auto-pointer that owns an Image instance of the requested
645
645
type. If the image type is not supported, the pointer is 0.
646
646
*/
647
- static Image::AutoPtr create (int type, BasicIo::AutoPtr io);
647
+ static Image::UniquePtr create (int type, BasicIo::UniquePtr io);
648
648
/* !
649
649
@brief Returns the image type of the provided file.
650
650
@param path %Image file. The contents of the file are tested to
0 commit comments