Bug #1270 » mt_cpp11.diff
exiv2-0.26-svn-1/CMakeLists.txt 2017-01-13 12:44:58.000000000 -0500 | ||
---|---|---|
38 | 38 |
SET( GENERIC_LIB_SOVERSION "14" ) |
39 | 39 | |
40 | 40 |
# options and their default values |
41 |
OPTION( EXIV2_CPP_STANDARD "Set the C++ Standard to compile with" 11 ) |
|
42 |
OPTION( EXIV2_CPP_STANDARD_REQUIRED "Set C++ Standard to required" ON ) |
|
43 |
OPTION( EXIV2_CPP_EXTENSION "Set C++ Extensions to required" OFF ) |
|
44 |
OPTION( EXIV2_ENABLE_VERBOSITY "Enable verbosity" OFF ) |
|
41 | 45 |
OPTION( EXIV2_ENABLE_SHARED "Build exiv2 as a shared library (dll)" ON ) |
42 | 46 |
OPTION( EXIV2_ENABLE_XMP "Build with XMP metadata support" ON ) |
43 | 47 |
OPTION( EXIV2_ENABLE_LIBXMP "Build a static convenience Library for XMP" ON ) |
... | ... | |
60 | 64 | |
61 | 65 |
ENDIF() |
62 | 66 | |
67 |
SET ( CMAKE_VERBOSE_MAKEFILE ${EXIV2_ENABLE_VERBOSITY} ) |
|
68 |
IF ( NOT ${EXIV2_CPP_STANDARD} ) |
|
69 |
SET ( EXIV2_CPP_STANDARD 11 ) |
|
70 |
ENDIF () |
|
71 | ||
63 | 72 |
# set include path for FindXXX.cmake files |
64 | 73 |
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/config/") |
65 | 74 | |
... | ... | |
86 | 95 | |
87 | 96 |
message(STATUS Compiler: ${COMPILER} " Major:" ${GCC_MAJOR} " Minor:" ${GCC_MINOR}) |
88 | 97 | |
89 |
IF ( CYGWIN OR ( ${GCC_MAJOR} GREATER 5 )) |
|
90 |
ADD_DEFINITIONS( -std=gnu++98 ) # to support snprintf |
|
91 |
ELSE() |
|
92 |
ADD_DEFINITIONS( -std=c++98 ) |
|
93 |
ENDIF() |
|
94 | ||
95 | 98 |
ENDIF( MINGW OR UNIX ) |
96 | 99 | |
100 |
set( CMAKE_CXX_STANDARD ${EXIV2_CPP_STANDARD} ) |
|
101 |
set( CMAKE_CXX_STANDARD_REQUIRED ${EXIV2_CPP_STANDARD_REQUIRED} ) |
|
102 |
set( CMAKE_CXX_EXTENSIONS ${EXIV2_CPP_EXTENSION} ) |
|
103 | ||
104 |
IF ( ${EXIV2_CPP_STANDARD} LESS 98 AND ${EXIV2_CPP_STANDARD} GREATER 10 ) |
|
105 |
ADD_DEFINITIONS( -DEXV_USING_CPP_ELEVEN=1 ) |
|
106 |
ENDIF() |
|
107 | ||
97 | 108 |
IF( EXIV2_ENABLE_COMMERCIAL ) |
98 | 109 |
SET (EXIV2_ENABLE_LENSDATA OFF) |
99 | 110 |
SET (EXIV2_ENABLE_NLS OFF) |
exiv2-0.26-svn-1/Makefile 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
90 | 90 |
bugfixes-test.sh crw-test.sh curliotest.sh eps-preview-test.sh eps-test.sh exifdata-test.sh \ |
91 | 91 |
exiv2-test.sh httpiotest.sh icc-test.sh imagetest.sh iotest.sh iptctest.sh \ |
92 | 92 |
modify-test.sh path-test.sh preview-test.sh sshiotest.sh stringto-test.sh tiff-test.sh \ |
93 |
video-test.sh write-test.sh write-video-test.sh write2-test.sh xmpparser-test.sh webp-test.sh: |
|
93 |
video-test.sh write-test.sh write-video-test.sh write2-test.sh xmpparser-test.sh webp-test.sh \ |
|
94 |
mt-test.sh: |
|
94 | 95 |
cd test && ./$@ |
95 | 96 | |
96 | 97 |
# convenience targets for running selected test scripts |
exiv2-0.26-svn-1/config/CMakeChecks.txt 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
319 | 319 | |
320 | 320 |
MESSAGE( STATUS "------------------------------------------------------------------" ) |
321 | 321 |
MESSAGE( STATUS "${PACKAGE_STRING} configure results <${PACKAGE_URL}>" ) |
322 |
MESSAGE( STATUS "C++ standard ${EXIV2_CPP_STANDARD}" ) |
|
323 |
OptionOutput( "C++ standard required " EXIV2_CPP_STANDARD_REQUIRED ) |
|
324 |
OptionOutput( "C++ extensions required " EXIV2_CPP_EXTENSION ) |
|
325 |
OptionOutput( "Enabled compilation verbosity " EXIV2_ENABLE_VERBOSITY ) |
|
322 | 326 |
OptionOutput( "Building PNG support: " EXIV2_ENABLE_PNG AND ZLIB_FOUND ) |
323 | 327 |
OptionOutput( "Building shared library: " EXIV2_ENABLE_SHARED ) |
324 | 328 |
OptionOutput( "XMP metadata support: " EXIV2_ENABLE_XMP ) |
exiv2-0.26-svn-1/include/exiv2/basicio.hpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
67 | 67 |
class EXIV2API BasicIo { |
68 | 68 |
public: |
69 | 69 |
//! BasicIo auto_ptr type |
70 |
#ifdef EXV_USING_CPP_ELEVEN |
|
71 |
typedef std::unique_ptr<BasicIo> AutoPtr; |
|
72 |
#else |
|
70 | 73 |
typedef std::auto_ptr<BasicIo> AutoPtr; |
71 | ||
74 |
#endif |
|
72 | 75 |
//! Seek starting positions |
73 | 76 |
enum Position { beg, cur, end }; |
74 | 77 |
exiv2-0.26-svn-1/include/exiv2/datasets.hpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
280 | 280 |
class EXIV2API IptcKey : public Key { |
281 | 281 |
public: |
282 | 282 |
//! Shortcut for an %IptcKey auto pointer. |
283 |
#ifdef EXV_USING_CPP_ELEVEN |
|
284 |
typedef std::unique_ptr<IptcKey> AutoPtr; |
|
285 |
#else |
|
283 | 286 |
typedef std::auto_ptr<IptcKey> AutoPtr; |
287 |
#endif |
|
284 | 288 | |
285 | 289 |
//! @name Creators |
286 | 290 |
//@{ |
exiv2-0.26-svn-1/include/exiv2/image.hpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
36 | 36 |
// + standard includes |
37 | 37 |
#include <string> |
38 | 38 |
#include <vector> |
39 |
#ifdef EXV_USING_CPP_ELEVEN |
|
40 |
#include <mutex> |
|
41 |
#endif |
|
39 | 42 | |
40 | 43 |
// ***************************************************************************** |
41 | 44 |
// namespace extensions |
... | ... | |
82 | 85 |
class EXIV2API Image { |
83 | 86 |
public: |
84 | 87 |
//! Image auto_ptr type |
88 |
#ifdef EXV_USING_CPP_ELEVEN |
|
89 |
typedef std::unique_ptr<Image> AutoPtr; |
|
90 |
#else |
|
85 | 91 |
typedef std::auto_ptr<Image> AutoPtr; |
92 |
#endif |
|
86 | 93 | |
87 | 94 |
//! @name Creators |
88 | 95 |
//@{ |
... | ... | |
476 | 483 | |
477 | 484 |
int imageType() const { return imageType_; } |
478 | 485 | |
486 |
#ifdef EXV_USING_CPP_ELEVEN |
|
487 |
static std::mutex mutex_; |
|
488 |
#endif |
|
489 | ||
479 | 490 |
protected: |
480 | 491 |
// DATA |
481 | 492 |
BasicIo::AutoPtr io_; //!< Image data IO pointer |
exiv2-0.26-svn-1/include/exiv2/metadatum.hpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
60 | 60 |
class EXIV2API Key { |
61 | 61 |
public: |
62 | 62 |
//! Shortcut for a %Key auto pointer. |
63 |
#ifdef EXV_USING_CPP_ELEVEN |
|
64 |
typedef std::unique_ptr<Key> AutoPtr; |
|
65 |
#else |
|
63 | 66 |
typedef std::auto_ptr<Key> AutoPtr; |
67 |
#endif |
|
64 | 68 | |
65 | 69 |
//! @name Creators |
66 | 70 |
//@{ |
exiv2-0.26-svn-1/include/exiv2/properties.hpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
45 | 45 |
#include <string> |
46 | 46 |
#include <iosfwd> |
47 | 47 |
#include <memory> |
48 |
#ifdef EXV_USING_CPP_ELEVEN |
|
49 |
#include <mutex> |
|
50 |
#endif |
|
48 | 51 | |
49 | 52 |
// ***************************************************************************** |
50 | 53 |
// namespace extensions |
... | ... | |
238 | 241 |
@brief Get all registered namespaces (for both Exiv2 and XMPsdk) |
239 | 242 |
*/ |
240 | 243 |
static void registeredNamespaces(Exiv2::Dictionary& nsDict); |
244 |
#ifdef EXV_USING_CPP_ELEVEN |
|
245 |
static std::mutex mutex_; |
|
246 |
#endif |
|
241 | 247 | |
242 | 248 |
}; // class XmpProperties |
243 | 249 | |
... | ... | |
247 | 253 |
class EXIV2API XmpKey : public Key { |
248 | 254 |
public: |
249 | 255 |
//! Shortcut for an %XmpKey auto pointer. |
256 |
#ifdef EXV_USING_CPP_ELEVEN |
|
257 |
typedef std::unique_ptr<XmpKey> AutoPtr; |
|
258 |
#else |
|
250 | 259 |
typedef std::auto_ptr<XmpKey> AutoPtr; |
260 |
#endif |
|
251 | 261 | |
252 | 262 |
//! @name Creators |
253 | 263 |
//@{ |
exiv2-0.26-svn-1/include/exiv2/tags.hpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
150 | 150 |
class EXIV2API ExifKey : public Key { |
151 | 151 |
public: |
152 | 152 |
//! Shortcut for an %ExifKey auto pointer. |
153 |
#ifdef EXV_USING_CPP_ELEVEN |
|
154 |
typedef std::unique_ptr<ExifKey> AutoPtr; |
|
155 |
#else |
|
153 | 156 |
typedef std::auto_ptr<ExifKey> AutoPtr; |
157 |
#endif |
|
154 | 158 | |
155 | 159 |
//! @name Creators |
156 | 160 |
//@{ |
exiv2-0.26-svn-1/include/exiv2/value.hpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
63 | 63 |
class EXIV2API Value { |
64 | 64 |
public: |
65 | 65 |
//! Shortcut for a %Value auto pointer. |
66 |
#ifdef EXV_USING_CPP_ELEVEN |
|
67 |
typedef std::unique_ptr<Value> AutoPtr; |
|
68 |
#else |
|
66 | 69 |
typedef std::auto_ptr<Value> AutoPtr; |
70 |
#endif |
|
67 | 71 | |
68 | 72 |
//! @name Creators |
69 | 73 |
//@{ |
... | ... | |
265 | 269 |
class EXIV2API DataValue : public Value { |
266 | 270 |
public: |
267 | 271 |
//! Shortcut for a %DataValue auto pointer. |
272 |
#ifdef EXV_USING_CPP_ELEVEN |
|
273 |
typedef std::unique_ptr<DataValue> AutoPtr; |
|
274 |
#else |
|
268 | 275 |
typedef std::auto_ptr<DataValue> AutoPtr; |
276 |
#endif |
|
269 | 277 | |
270 | 278 |
//! @name Creators |
271 | 279 |
//@{ |
... | ... | |
352 | 360 |
class EXIV2API StringValueBase : public Value { |
353 | 361 |
public: |
354 | 362 |
//! Shortcut for a %StringValueBase auto pointer. |
363 |
#ifdef EXV_USING_CPP_ELEVEN |
|
364 |
typedef std::unique_ptr<StringValueBase> AutoPtr; |
|
365 |
#else |
|
355 | 366 |
typedef std::auto_ptr<StringValueBase> AutoPtr; |
367 |
#endif |
|
356 | 368 | |
357 | 369 |
//! @name Creators |
358 | 370 |
//@{ |
... | ... | |
434 | 446 |
class EXIV2API StringValue : public StringValueBase { |
435 | 447 |
public: |
436 | 448 |
//! Shortcut for a %StringValue auto pointer. |
449 |
#ifdef EXV_USING_CPP_ELEVEN |
|
450 |
typedef std::unique_ptr<StringValue> AutoPtr; |
|
451 |
#else |
|
437 | 452 |
typedef std::auto_ptr<StringValue> AutoPtr; |
453 |
#endif |
|
438 | 454 | |
439 | 455 |
//! @name Creators |
440 | 456 |
//@{ |
... | ... | |
466 | 482 |
class EXIV2API AsciiValue : public StringValueBase { |
467 | 483 |
public: |
468 | 484 |
//! Shortcut for a %AsciiValue auto pointer. |
485 |
#ifdef EXV_USING_CPP_ELEVEN |
|
486 |
typedef std::unique_ptr<AsciiValue> AutoPtr; |
|
487 |
#else |
|
469 | 488 |
typedef std::auto_ptr<AsciiValue> AutoPtr; |
489 |
#endif |
|
470 | 490 | |
471 | 491 |
//! @name Creators |
472 | 492 |
//@{ |
... | ... | |
553 | 573 |
}; // class CharsetInfo |
554 | 574 | |
555 | 575 |
//! Shortcut for a %CommentValue auto pointer. |
576 |
#ifdef EXV_USING_CPP_ELEVEN |
|
577 |
typedef std::unique_ptr<CommentValue> AutoPtr; |
|
578 |
#else |
|
556 | 579 |
typedef std::auto_ptr<CommentValue> AutoPtr; |
580 |
#endif |
|
557 | 581 | |
558 | 582 |
//! @name Creators |
559 | 583 |
//@{ |
... | ... | |
640 | 664 |
class EXIV2API XmpValue : public Value { |
641 | 665 |
public: |
642 | 666 |
//! Shortcut for a %XmpValue auto pointer. |
667 |
#ifdef EXV_USING_CPP_ELEVEN |
|
668 |
typedef std::unique_ptr<XmpValue> AutoPtr; |
|
669 |
#else |
|
643 | 670 |
typedef std::auto_ptr<XmpValue> AutoPtr; |
671 |
#endif |
|
644 | 672 | |
645 | 673 |
//! XMP array types. |
646 | 674 |
enum XmpArrayType { xaNone, xaAlt, xaBag, xaSeq }; |
... | ... | |
731 | 759 |
class EXIV2API XmpTextValue : public XmpValue { |
732 | 760 |
public: |
733 | 761 |
//! Shortcut for a %XmpTextValue auto pointer. |
762 |
#ifdef EXV_USING_CPP_ELEVEN |
|
763 |
typedef std::unique_ptr<XmpTextValue> AutoPtr; |
|
764 |
#else |
|
734 | 765 |
typedef std::auto_ptr<XmpTextValue> AutoPtr; |
766 |
#endif |
|
735 | 767 | |
736 | 768 |
//! @name Creators |
737 | 769 |
//@{ |
... | ... | |
813 | 845 |
class EXIV2API XmpArrayValue : public XmpValue { |
814 | 846 |
public: |
815 | 847 |
//! Shortcut for a %XmpArrayValue auto pointer. |
848 |
#ifdef EXV_USING_CPP_ELEVEN |
|
849 |
typedef std::unique_ptr<XmpArrayValue> AutoPtr; |
|
850 |
#else |
|
816 | 851 |
typedef std::auto_ptr<XmpArrayValue> AutoPtr; |
852 |
#endif |
|
817 | 853 | |
818 | 854 |
//! @name Creators |
819 | 855 |
//@{ |
... | ... | |
909 | 945 |
class EXIV2API LangAltValue : public XmpValue { |
910 | 946 |
public: |
911 | 947 |
//! Shortcut for a %LangAltValue auto pointer. |
948 |
#ifdef EXV_USING_CPP_ELEVEN |
|
949 |
typedef std::unique_ptr<LangAltValue> AutoPtr; |
|
950 |
#else |
|
912 | 951 |
typedef std::auto_ptr<LangAltValue> AutoPtr; |
952 |
#endif |
|
913 | 953 | |
914 | 954 |
//! @name Creators |
915 | 955 |
//@{ |
... | ... | |
997 | 1037 |
class EXIV2API DateValue : public Value { |
998 | 1038 |
public: |
999 | 1039 |
//! Shortcut for a %DateValue auto pointer. |
1040 |
#ifdef EXV_USING_CPP_ELEVEN |
|
1041 |
typedef std::unique_ptr<DateValue> AutoPtr; |
|
1042 |
#else |
|
1000 | 1043 |
typedef std::auto_ptr<DateValue> AutoPtr; |
1044 |
#endif |
|
1001 | 1045 | |
1002 | 1046 |
//! @name Creators |
1003 | 1047 |
//@{ |
... | ... | |
1098 | 1142 |
class EXIV2API TimeValue : public Value { |
1099 | 1143 |
public: |
1100 | 1144 |
//! Shortcut for a %TimeValue auto pointer. |
1145 |
#ifdef EXV_USING_CPP_ELEVEN |
|
1146 |
typedef std::unique_ptr<TimeValue> AutoPtr; |
|
1147 |
#else |
|
1101 | 1148 |
typedef std::auto_ptr<TimeValue> AutoPtr; |
1149 |
#endif |
|
1102 | 1150 | |
1103 | 1151 |
//! @name Creators |
1104 | 1152 |
//@{ |
... | ... | |
1254 | 1302 |
class ValueType : public Value { |
1255 | 1303 |
public: |
1256 | 1304 |
//! Shortcut for a %ValueType\<T\> auto pointer. |
1305 |
#ifdef EXV_USING_CPP_ELEVEN |
|
1306 |
typedef std::unique_ptr<ValueType<T> > AutoPtr; |
|
1307 |
#else |
|
1257 | 1308 |
typedef std::auto_ptr<ValueType<T> > AutoPtr; |
1309 |
#endif |
|
1258 | 1310 | |
1259 | 1311 |
//! @name Creators |
1260 | 1312 |
//@{ |
exiv2-0.26-svn-1/samples/CMakeLists.txt 2017-01-13 13:03:43.000000000 -0500 | ||
---|---|---|
82 | 82 |
TARGET_LINK_LIBRARIES( geotag ${PRIVATE_VAR} exiv2lib Threads::Threads ${EXPAT_LIBRARIES} ${ZLIB_LIBRARIES}) |
83 | 83 |
INSTALL( TARGETS geotag ${INSTALL_TARGET_STANDARD_ARGS} ) |
84 | 84 | |
85 |
IF ( ${EXIV2_CPP_STANDARD} LESS 98 AND ${EXIV2_CPP_STANDARD} GREATER 10 ) |
|
86 |
SET( MULTITHREAD_SRC mt-test.cpp ) |
|
87 |
ADD_EXECUTABLE( mt-test ${MULTITHREAD_SRC} ) |
|
88 |
SET_PROPERTY( TARGET mt-test PROPERTY CXX_STANDARD 11) |
|
89 |
SET_TARGET_PROPERTIES( mt-test PROPERTIES OUTPUT_NAME mt-test ) |
|
90 |
TARGET_LINK_LIBRARIES( mt-test ${PRIVATE_VAR} exiv2lib Threads::Threads ${EXPAT_LIBRARIES} ${ZLIB_LIBRARIES}) |
|
91 |
INSTALL( TARGETS mt-test ${INSTALL_TARGET_STANDARD_ARGS} ) |
|
92 |
ENDIF() |
|
93 | ||
85 | 94 |
# ****************************************************************************** |
86 | 95 |
# Man page |
87 | 96 |
INSTALL( FILES exiv2samples.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 ) |
exiv2-0.26-svn-1/samples/Makefile 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
70 | 70 |
key-test.cpp \ |
71 | 71 |
largeiptc-test.cpp \ |
72 | 72 |
mmap-test.cpp \ |
73 |
mt-test.cpp \ |
|
73 | 74 |
prevtest.cpp \ |
74 | 75 |
remotetest.cpp \ |
75 | 76 |
stringto-test.cpp \ |
exiv2-0.26-svn-1/samples/metacopy.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
58 | 58 |
Exiv2::BasicIo::AutoPtr memIo(new Exiv2::MemIo); |
59 | 59 |
memIo->transfer(*fileIo); |
60 | 60 | |
61 |
#ifdef EXV_USING_CPP_ELEVEN |
|
62 |
Exiv2::Image::AutoPtr readImg = Exiv2::ImageFactory::open(std::move(memIo)); |
|
63 |
#else |
|
61 | 64 |
Exiv2::Image::AutoPtr readImg = Exiv2::ImageFactory::open(memIo); |
65 |
#endif |
|
62 | 66 |
assert(readImg.get() != 0); |
63 | 67 |
readImg->readMetadata(); |
64 | 68 |
exiv2-0.26-svn-1/samples/mt-test.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
17 | 17 | |
18 | 18 |
// WARNING: auto_ptr is not supported in C++11 implemented by gcc 4.9/C++11 and later |
19 | 19 | |
20 |
// Addendum: Builds with gcc v6.2.0 with c++11 works on Linux and with MinGW64. |
|
21 | ||
20 | 22 |
#include <exiv2/exiv2.hpp> |
21 | 23 |
#include <iostream> |
22 | 24 |
#include <iomanip> |
exiv2-0.26-svn-1/src/actions.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
228 | 228 |
Task* t = i->second; |
229 | 229 |
return t->clone(); |
230 | 230 |
} |
231 |
#ifdef EXV_USING_CPP_ELEVEN |
|
232 |
return Task::AutoPtr(nullptr); |
|
233 |
#else |
|
231 | 234 |
return Task::AutoPtr(0); |
235 |
#endif |
|
232 | 236 |
} // TaskFactory::create |
233 | 237 | |
234 | 238 |
Print::~Print() |
... | ... | |
284 | 288 |
<< _("Failed to open the file\n"); |
285 | 289 |
return -1; |
286 | 290 |
} |
287 |
Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path_);
|
|
291 |
Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(std::move(path_));
|
|
288 | 292 |
assert(image.get() != 0); |
289 | 293 |
image->readMetadata(); |
290 | 294 |
Exiv2::ExifData& exifData = image->exifData(); |
... | ... | |
2063 | 2067 |
if ( bStdin ) Params::instance().getStdin(stdIn); |
2064 | 2068 |
Exiv2::BasicIo::AutoPtr ioStdin = Exiv2::BasicIo::AutoPtr(new Exiv2::MemIo(stdIn.pData_,stdIn.size_)); |
2065 | 2069 | |
2070 |
#ifdef EXV_USING_CPP_ELEVEN |
|
2071 |
Exiv2::Image::AutoPtr sourceImage = bStdin ? Exiv2::ImageFactory::open(std::move(ioStdin)) : Exiv2::ImageFactory::open(std::move(source)); |
|
2072 |
#else |
|
2066 | 2073 |
Exiv2::Image::AutoPtr sourceImage = bStdin ? Exiv2::ImageFactory::open(ioStdin) : Exiv2::ImageFactory::open(source); |
2074 |
#endif |
|
2067 | 2075 |
assert(sourceImage.get() != 0); |
2068 | 2076 |
sourceImage->readMetadata(); |
2069 | 2077 |
exiv2-0.26-svn-1/src/actions.hpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
75 | 75 |
class Task { |
76 | 76 |
public: |
77 | 77 |
//! Shortcut for an auto pointer. |
78 |
#ifdef EXV_USING_CPP_ELEVEN |
|
79 |
typedef std::unique_ptr<Task> AutoPtr; |
|
80 |
#else |
|
78 | 81 |
typedef std::auto_ptr<Task> AutoPtr; |
82 |
#endif |
|
79 | 83 |
//! Virtual destructor. |
80 | 84 |
virtual ~Task(); |
81 | 85 |
//! Virtual copy construction. |
... | ... | |
159 | 163 |
public: |
160 | 164 |
virtual ~Print(); |
161 | 165 |
virtual int run(const std::string& path); |
166 |
#ifdef EXV_USING_CPP_ELEVEN |
|
167 |
typedef std::unique_ptr<Print> AutoPtr; |
|
168 |
#else |
|
162 | 169 |
typedef std::auto_ptr<Print> AutoPtr; |
170 |
#endif |
|
163 | 171 |
AutoPtr clone() const; |
164 | 172 | |
165 | 173 |
//! Print the Jpeg comment |
... | ... | |
216 | 224 |
public: |
217 | 225 |
virtual ~Rename(); |
218 | 226 |
virtual int run(const std::string& path); |
227 |
#ifdef EXV_USING_CPP_ELEVEN |
|
228 |
typedef std::unique_ptr<Rename> AutoPtr; |
|
229 |
#else |
|
219 | 230 |
typedef std::auto_ptr<Rename> AutoPtr; |
231 |
#endif |
|
220 | 232 |
AutoPtr clone() const; |
221 | 233 | |
222 | 234 |
private: |
... | ... | |
228 | 240 |
public: |
229 | 241 |
virtual ~Adjust(); |
230 | 242 |
virtual int run(const std::string& path); |
243 |
#ifdef EXV_USING_CPP_ELEVEN |
|
244 |
typedef std::unique_ptr<Adjust> AutoPtr; |
|
245 |
#else |
|
231 | 246 |
typedef std::auto_ptr<Adjust> AutoPtr; |
247 |
#endif |
|
232 | 248 |
AutoPtr clone() const; |
233 | 249 | |
234 | 250 |
private: |
... | ... | |
251 | 267 |
public: |
252 | 268 |
virtual ~Erase(); |
253 | 269 |
virtual int run(const std::string& path); |
270 |
#ifdef EXV_USING_CPP_ELEVEN |
|
271 |
typedef std::unique_ptr<Erase> AutoPtr; |
|
272 |
#else |
|
254 | 273 |
typedef std::auto_ptr<Erase> AutoPtr; |
274 |
#endif |
|
255 | 275 |
AutoPtr clone() const; |
256 | 276 | |
257 | 277 |
/*! |
... | ... | |
297 | 317 |
public: |
298 | 318 |
virtual ~Extract(); |
299 | 319 |
virtual int run(const std::string& path); |
320 |
#ifdef EXV_USING_CPP_ELEVEN |
|
321 |
typedef std::unique_ptr<Extract> AutoPtr; |
|
322 |
#else |
|
300 | 323 |
typedef std::auto_ptr<Extract> AutoPtr; |
324 |
#endif |
|
301 | 325 |
AutoPtr clone() const; |
302 | 326 | |
303 | 327 |
/*! |
... | ... | |
336 | 360 |
public: |
337 | 361 |
virtual ~Insert(); |
338 | 362 |
virtual int run(const std::string& path); |
363 |
#ifdef EXV_USING_CPP_ELEVEN |
|
364 |
typedef std::unique_ptr<Insert> AutoPtr; |
|
365 |
#else |
|
339 | 366 |
typedef std::auto_ptr<Insert> AutoPtr; |
367 |
#endif |
|
340 | 368 |
AutoPtr clone() const; |
341 | 369 | |
342 | 370 |
/*! |
... | ... | |
377 | 405 |
public: |
378 | 406 |
virtual ~Modify(); |
379 | 407 |
virtual int run(const std::string& path); |
408 |
#ifdef EXV_USING_CPP_ELEVEN |
|
409 |
typedef std::unique_ptr<Modify> AutoPtr; |
|
410 |
#else |
|
380 | 411 |
typedef std::auto_ptr<Modify> AutoPtr; |
412 |
#endif |
|
381 | 413 |
AutoPtr clone() const; |
382 | 414 |
Modify() {} |
383 | 415 |
//! Apply modification commands to the \em pImage, return 0 if successful. |
... | ... | |
410 | 442 |
public: |
411 | 443 |
virtual ~FixIso(); |
412 | 444 |
virtual int run(const std::string& path); |
445 |
#ifdef EXV_USING_CPP_ELEVEN |
|
446 |
typedef std::unique_ptr<FixIso> AutoPtr; |
|
447 |
#else |
|
413 | 448 |
typedef std::auto_ptr<FixIso> AutoPtr; |
449 |
#endif |
|
414 | 450 |
AutoPtr clone() const; |
415 | 451 | |
416 | 452 |
private: |
... | ... | |
428 | 464 |
public: |
429 | 465 |
virtual ~FixCom(); |
430 | 466 |
virtual int run(const std::string& path); |
467 |
#ifdef EXV_USING_CPP_ELEVEN |
|
468 |
typedef std::unique_ptr<FixCom> AutoPtr; |
|
469 |
#else |
|
431 | 470 |
typedef std::auto_ptr<FixCom> AutoPtr; |
471 |
#endif |
|
432 | 472 |
AutoPtr clone() const; |
433 | 473 | |
434 | 474 |
private: |
exiv2-0.26-svn-1/src/asfvideo.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
296 | 296 | |
297 | 297 |
using namespace Exiv2::Internal; |
298 | 298 | |
299 |
#ifdef EXV_USING_CPP_ELEVEN |
|
300 |
AsfVideo::AsfVideo(BasicIo::AutoPtr io) |
|
301 |
: Image(ImageType::asf, mdNone, std::move(io)) |
|
302 |
{ |
|
303 |
} // AsfVideo::AsfVideo |
|
304 |
#else |
|
299 | 305 |
AsfVideo::AsfVideo(BasicIo::AutoPtr io) |
300 | 306 |
: Image(ImageType::asf, mdNone, io) |
301 | 307 |
{ |
302 | 308 |
} // AsfVideo::AsfVideo |
309 |
#endif |
|
303 | 310 | |
304 | 311 |
std::string AsfVideo::mimeType() const |
305 | 312 |
{ |
... | ... | |
792 | 799 | |
793 | 800 |
Image::AutoPtr newAsfInstance(BasicIo::AutoPtr io, bool /*create*/) |
794 | 801 |
{ |
802 |
#ifdef EXV_USING_CPP_ELEVEN |
|
803 |
Image::AutoPtr image(new AsfVideo(std::move(io))); |
|
804 |
#else |
|
795 | 805 |
Image::AutoPtr image(new AsfVideo(io)); |
806 |
#endif |
|
796 | 807 |
if (!image->good()) { |
797 | 808 |
image.reset(); |
798 | 809 |
} |
exiv2-0.26-svn-1/src/basicio.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
583 | 583 |
// buffer, which is a workaround to ensure that the links don't get broken. |
584 | 584 |
if (ret != 0 || (buf.st_size > 1048576 && nlink == 1)) { |
585 | 585 |
pid_t pid = ::getpid(); |
586 |
#ifdef EXV_USING_CPP_ELEVEN |
|
587 |
std::unique_ptr<FileIo> fileIo; |
|
588 |
#else |
|
586 | 589 |
std::auto_ptr<FileIo> fileIo; |
590 |
#endif |
|
587 | 591 |
#ifdef EXV_UNICODE_PATH |
588 | 592 |
if (p_->wpMode_ == Impl::wpUnicode) { |
589 | 593 |
std::wstring tmpname = wpath() + s2ws(toString(pid)); |
594 |
#ifdef EXV_USING_CPP_ELEVEN |
|
595 |
fileIo = std::unique_ptr<FileIo>(new FileIo(tmpname)); |
|
596 |
#else |
|
590 | 597 |
fileIo = std::auto_ptr<FileIo>(new FileIo(tmpname)); |
598 |
#endif |
|
591 | 599 |
} |
592 | 600 |
else |
593 | 601 |
#endif |
594 | 602 |
{ |
595 | 603 |
std::string tmpname = path() + toString(pid); |
604 |
#ifdef EXV_USING_CPP_ELEVEN |
|
605 |
fileIo = std::unique_ptr<FileIo>(new FileIo(tmpname)); |
|
606 |
#else |
|
596 | 607 |
fileIo = std::auto_ptr<FileIo>(new FileIo(tmpname)); |
608 |
#endif |
|
597 | 609 |
} |
598 | 610 |
if (fileIo->open("w+b") != 0) { |
599 | 611 |
#ifdef EXV_UNICODE_PATH |
... | ... | |
607 | 619 |
} |
608 | 620 |
} |
609 | 621 |
fileIo->p_->copyXattrFrom(*this); |
622 |
#ifdef EXV_USING_CPP_ELEVEN |
|
623 |
basicIo = std::move(fileIo); |
|
624 |
#else |
|
610 | 625 |
basicIo = fileIo; |
626 |
#endif |
|
611 | 627 |
} |
612 | 628 |
else { |
613 | 629 |
basicIo.reset(new MemIo); |
exiv2-0.26-svn-1/src/bmpimage.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
46 | 46 |
// class member definitions |
47 | 47 |
namespace Exiv2 { |
48 | 48 | |
49 |
#ifdef EXV_USING_CPP_ELEVEN |
|
50 |
BmpImage::BmpImage(BasicIo::AutoPtr io) |
|
51 |
: Image(ImageType::bmp, mdNone, std::move(io)) |
|
52 |
{ |
|
53 |
} // BmpImage::BmpImage |
|
54 |
#else |
|
49 | 55 |
BmpImage::BmpImage(BasicIo::AutoPtr io) |
50 | 56 |
: Image(ImageType::bmp, mdNone, io) |
51 | 57 |
{ |
52 | 58 |
} // BmpImage::BmpImage |
59 |
#endif |
|
53 | 60 | |
54 | 61 |
std::string BmpImage::mimeType() const |
55 | 62 |
{ |
... | ... | |
131 | 138 |
// free functions |
132 | 139 |
Image::AutoPtr newBmpInstance(BasicIo::AutoPtr io, bool /*create*/) |
133 | 140 |
{ |
141 |
#ifdef EXV_USING_CPP_ELEVEN |
|
142 |
Image::AutoPtr image(new BmpImage(std::move(io))); |
|
143 |
#else |
|
134 | 144 |
Image::AutoPtr image(new BmpImage(io)); |
145 |
#endif |
|
135 | 146 |
if (!image->good()) |
136 | 147 |
{ |
137 | 148 |
image.reset(); |
exiv2-0.26-svn-1/src/cr2image.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
51 | 51 | |
52 | 52 |
using namespace Internal; |
53 | 53 | |
54 |
#ifdef EXV_USING_CPP_ELEVEN |
|
55 |
Cr2Image::Cr2Image(BasicIo::AutoPtr io, bool /*create*/) |
|
56 |
: Image(ImageType::cr2, mdExif | mdIptc | mdXmp, std::move(io)) |
|
57 |
#else |
|
54 | 58 |
Cr2Image::Cr2Image(BasicIo::AutoPtr io, bool /*create*/) |
55 | 59 |
: Image(ImageType::cr2, mdExif | mdIptc | mdXmp, io) |
60 |
#endif |
|
56 | 61 |
{ |
57 | 62 |
} // Cr2Image::Cr2Image |
58 | 63 | |
... | ... | |
188 | 193 |
ed.end()); |
189 | 194 |
} |
190 | 195 | |
196 |
#ifdef EXV_USING_CPP_ELEVEN |
|
197 |
std::unique_ptr<TiffHeaderBase> header(new Cr2Header(byteOrder)); |
|
198 |
#else |
|
191 | 199 |
std::auto_ptr<TiffHeaderBase> header(new Cr2Header(byteOrder)); |
200 |
#endif |
|
192 | 201 |
OffsetWriter offsetWriter; |
193 | 202 |
offsetWriter.setOrigin(OffsetWriter::cr2RawIfdOffset, Cr2Header::offset2addr(), byteOrder); |
194 | 203 |
return TiffParserWorker::encode(io, |
... | ... | |
207 | 216 |
// free functions |
208 | 217 |
Image::AutoPtr newCr2Instance(BasicIo::AutoPtr io, bool create) |
209 | 218 |
{ |
219 |
#ifdef EXV_USING_CPP_ELEVEN |
|
220 |
Image::AutoPtr image(new Cr2Image(std::move(io), create)); |
|
221 |
#else |
|
210 | 222 |
Image::AutoPtr image(new Cr2Image(io, create)); |
223 |
#endif |
|
211 | 224 |
if (!image->good()) { |
212 | 225 |
image.reset(); |
213 | 226 |
} |
exiv2-0.26-svn-1/src/crwimage.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
82 | 82 | |
83 | 83 |
using namespace Internal; |
84 | 84 | |
85 |
#ifdef EXV_USING_CPP_ELEVEN |
|
86 |
CrwImage::CrwImage(BasicIo::AutoPtr io, bool /*create*/) |
|
87 |
: Image(ImageType::crw, mdExif | mdComment, std::move(io)) |
|
88 |
#else |
|
85 | 89 |
CrwImage::CrwImage(BasicIo::AutoPtr io, bool /*create*/) |
86 | 90 |
: Image(ImageType::crw, mdExif | mdComment, io) |
91 |
#endif |
|
87 | 92 |
{ |
88 | 93 |
} // CrwImage::CrwImage |
89 | 94 | |
... | ... | |
222 | 227 |
// free functions |
223 | 228 |
Image::AutoPtr newCrwInstance(BasicIo::AutoPtr io, bool create) |
224 | 229 |
{ |
230 |
#ifdef EXV_USING_CPP_ELEVEN |
|
231 |
Image::AutoPtr image(new CrwImage(std::move(io), create)); |
|
232 |
#else |
|
225 | 233 |
Image::AutoPtr image(new CrwImage(io, create)); |
234 |
#endif |
|
226 | 235 |
if (!image->good()) { |
227 | 236 |
image.reset(); |
228 | 237 |
} |
... | ... | |
360 | 369 | |
361 | 370 |
void CiffComponent::add(AutoPtr component) |
362 | 371 |
{ |
372 |
#ifdef EXV_USING_CPP_ELEVEN |
|
373 |
doAdd(std::move(component)); |
|
374 |
#else |
|
363 | 375 |
doAdd(component); |
376 |
#endif |
|
364 | 377 |
} |
365 | 378 | |
366 | 379 |
void CiffEntry::doAdd(AutoPtr /*component*/) |
... | ... | |
476 | 489 |
} |
477 | 490 |
m->setDir(this->tag()); |
478 | 491 |
m->read(pData, size, o, byteOrder); |
492 |
#ifdef EXV_USING_CPP_ELEVEN |
|
493 |
add(std::move(m)); |
|
494 |
#else |
|
479 | 495 |
add(m); |
496 |
#endif |
|
480 | 497 |
o += 10; |
481 | 498 |
} |
482 | 499 |
} // CiffDirectory::readDirectory |
... | ... | |
848 | 865 |
// Directory doesn't exist yet, add it |
849 | 866 |
m_ = AutoPtr(new CiffDirectory(csd.crwDir_, csd.parent_)); |
850 | 867 |
cc_ = m_.get(); |
868 |
#ifdef EXV_USING_CPP_ELEVEN |
|
869 |
add(std::move(m_)); |
|
870 |
#else |
|
851 | 871 |
add(m_); |
872 |
#endif |
|
852 | 873 |
} |
853 | 874 |
// Recursive call to next lower level directory |
854 | 875 |
cc_ = cc_->add(crwDirs, crwTagId); |
... | ... | |
865 | 886 |
// Tag doesn't exist yet, add it |
866 | 887 |
m_ = AutoPtr(new CiffEntry(crwTagId, tag())); |
867 | 888 |
cc_ = m_.get(); |
889 |
#ifdef EXV_USING_CPP_ELEVEN |
|
890 |
add(std::move(m_)); |
|
891 |
#else |
|
868 | 892 |
add(m_); |
893 |
#endif |
|
869 | 894 |
} |
870 | 895 |
} |
871 | 896 |
return cc_; |
exiv2-0.26-svn-1/src/crwimage_int.hpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
96 | 96 |
class CiffComponent { |
97 | 97 |
public: |
98 | 98 |
//! CiffComponent auto_ptr type |
99 |
#ifdef EXV_USING_CPP_ELEVEN |
|
100 |
typedef std::unique_ptr<CiffComponent> AutoPtr; |
|
101 |
#else |
|
99 | 102 |
typedef std::auto_ptr<CiffComponent> AutoPtr; |
103 |
#endif |
|
100 | 104 |
//! Container type to hold all metadata |
101 | 105 |
typedef std::vector<CiffComponent*> Components; |
102 | 106 | |
... | ... | |
440 | 444 |
class CiffHeader { |
441 | 445 |
public: |
442 | 446 |
//! CiffHeader auto_ptr type |
447 |
#ifdef EXV_USING_CPP_ELEVEN |
|
448 |
typedef std::unique_ptr<CiffHeader> AutoPtr; |
|
449 |
#else |
|
443 | 450 |
typedef std::auto_ptr<CiffHeader> AutoPtr; |
451 |
#endif |
|
444 | 452 | |
445 | 453 |
//! @name Creators |
446 | 454 |
//@{ |
exiv2-0.26-svn-1/src/epsimage.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
1079 | 1079 |
namespace Exiv2 |
1080 | 1080 |
{ |
1081 | 1081 | |
1082 |
#ifdef EXV_USING_CPP_ELEVEN |
|
1083 |
EpsImage::EpsImage(BasicIo::AutoPtr io, bool create) |
|
1084 |
: Image(ImageType::eps, mdXmp, std::move(io)) |
|
1085 |
#else |
|
1082 | 1086 |
EpsImage::EpsImage(BasicIo::AutoPtr io, bool create) |
1083 | 1087 |
: Image(ImageType::eps, mdXmp, io) |
1088 |
#endif |
|
1084 | 1089 |
{ |
1085 | 1090 |
//LogMsg::setLevel(LogMsg::debug); |
1086 | 1091 |
if (create) { |
... | ... | |
1157 | 1162 |
// free functions |
1158 | 1163 |
Image::AutoPtr newEpsInstance(BasicIo::AutoPtr io, bool create) |
1159 | 1164 |
{ |
1165 |
#ifdef EXV_USING_CPP_ELEVEN |
|
1166 |
Image::AutoPtr image(new EpsImage(std::move(io), create)); |
|
1167 |
#else |
|
1160 | 1168 |
Image::AutoPtr image(new EpsImage(io, create)); |
1169 |
#endif |
|
1161 | 1170 |
if (!image->good()) { |
1162 | 1171 |
image.reset(); |
1163 | 1172 |
} |
exiv2-0.26-svn-1/src/exif.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
85 | 85 |
class Thumbnail { |
86 | 86 |
public: |
87 | 87 |
//! Shortcut for a %Thumbnail auto pointer. |
88 |
#ifdef EXV_USING_CPP_ELEVEN |
|
89 |
typedef std::unique_ptr<Thumbnail> AutoPtr; |
|
90 |
#else |
|
88 | 91 |
typedef std::auto_ptr<Thumbnail> AutoPtr; |
92 |
#endif |
|
89 | 93 | |
90 | 94 |
//! @name Creators |
91 | 95 |
//@{ |
... | ... | |
128 | 132 |
class TiffThumbnail : public Thumbnail { |
129 | 133 |
public: |
130 | 134 |
//! Shortcut for a %TiffThumbnail auto pointer. |
135 |
#ifdef EXV_USING_CPP_ELEVEN |
|
136 |
typedef std::unique_ptr<TiffThumbnail> AutoPtr; |
|
137 |
#else |
|
131 | 138 |
typedef std::auto_ptr<TiffThumbnail> AutoPtr; |
139 |
#endif |
|
132 | 140 | |
133 | 141 |
//! @name Manipulators |
134 | 142 |
//@{ |
... | ... | |
152 | 160 |
class JpegThumbnail : public Thumbnail { |
153 | 161 |
public: |
154 | 162 |
//! Shortcut for a %JpegThumbnail auto pointer. |
163 |
#ifdef EXV_USING_CPP_ELEVEN |
|
164 |
typedef std::unique_ptr<JpegThumbnail> AutoPtr; |
|
165 |
#else |
|
155 | 166 |
typedef std::auto_ptr<JpegThumbnail> AutoPtr; |
167 |
#endif |
|
156 | 168 | |
157 | 169 |
//! @name Manipulators |
158 | 170 |
//@{ |
... | ... | |
197 | 209 |
template<typename T> |
198 | 210 |
Exiv2::Exifdatum& setValue(Exiv2::Exifdatum& exifDatum, const T& value) |
199 | 211 |
{ |
212 |
#ifdef EXV_USING_CPP_ELEVEN |
|
213 |
std::unique_ptr<Exiv2::ValueType<T> > v |
|
214 |
= std::unique_ptr<Exiv2::ValueType<T> >(new Exiv2::ValueType<T>); |
|
215 |
#else |
|
200 | 216 |
std::auto_ptr<Exiv2::ValueType<T> > v |
201 | 217 |
= std::auto_ptr<Exiv2::ValueType<T> >(new Exiv2::ValueType<T>); |
218 |
#endif |
|
202 | 219 |
v->value_.push_back(value); |
220 |
#ifdef EXV_USING_CPP_ELEVEN |
|
221 |
exifDatum.value_ = std::move(v); |
|
222 |
#else |
|
203 | 223 |
exifDatum.value_ = v; |
224 |
#endif |
|
204 | 225 |
return exifDatum; |
205 | 226 |
} |
206 | 227 | |
... | ... | |
414 | 435 | |
415 | 436 |
Value::AutoPtr Exifdatum::getValue() const |
416 | 437 |
{ |
438 |
#ifdef EXV_USING_CPP_ELEVEN |
|
439 |
return value_.get() == 0 ? Value::AutoPtr(nullptr) : value_->clone(); |
|
440 |
#else |
|
417 | 441 |
return value_.get() == 0 ? Value::AutoPtr(0) : value_->clone(); |
442 |
#endif |
|
418 | 443 |
} |
419 | 444 | |
420 | 445 |
long Exifdatum::sizeDataArea() const |
... | ... | |
706 | 731 | |
707 | 732 |
// Encode and check if the result fits into a JPEG Exif APP1 segment |
708 | 733 |
MemIo mio1; |
734 |
#ifdef EXV_USING_CPP_ELEVEN |
|
735 |
std::unique_ptr<TiffHeaderBase> header(new TiffHeader(byteOrder, 0x00000008, false)); |
|
736 |
#else |
|
709 | 737 |
std::auto_ptr<TiffHeaderBase> header(new TiffHeader(byteOrder, 0x00000008, false)); |
738 |
#endif |
|
710 | 739 |
WriteMethod wm = TiffParserWorker::encode(mio1, |
711 | 740 |
pData, |
712 | 741 |
size, |
exiv2-0.26-svn-1/src/gifimage.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
47 | 47 |
// class member definitions |
48 | 48 |
namespace Exiv2 { |
49 | 49 | |
50 |
#ifdef EXV_USING_CPP_ELEVEN |
|
51 |
GifImage::GifImage(BasicIo::AutoPtr io) |
|
52 |
: Image(ImageType::gif, mdNone, std::move(io)) |
|
53 |
#else |
|
50 | 54 |
GifImage::GifImage(BasicIo::AutoPtr io) |
51 | 55 |
: Image(ImageType::gif, mdNone, io) |
56 |
#endif |
|
52 | 57 |
{ |
53 | 58 |
} // GifImage::GifImage |
54 | 59 | |
... | ... | |
111 | 116 |
// free functions |
112 | 117 |
Image::AutoPtr newGifInstance(BasicIo::AutoPtr io, bool /*create*/) |
113 | 118 |
{ |
119 |
#ifdef EXV_USING_CPP_ELEVEN |
|
120 |
Image::AutoPtr image(new GifImage(std::move(io))); |
|
121 |
#else |
|
114 | 122 |
Image::AutoPtr image(new GifImage(io)); |
123 |
#endif |
|
115 | 124 |
if (!image->good()) |
116 | 125 |
{ |
117 | 126 |
image.reset(); |
exiv2-0.26-svn-1/src/image.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
72 | 72 |
#include <cstring> |
73 | 73 |
#include <cassert> |
74 | 74 |
#include <iostream> |
75 |
#ifdef EXV_USING_CPP_ELEVEN |
|
76 |
#include <mutex> |
|
77 |
#endif |
|
75 | 78 | |
76 | 79 |
#include <sys/types.h> |
77 | 80 |
#include <sys/stat.h> |
... | ... | |
152 | 155 |
Image::Image(int imageType, |
153 | 156 |
uint16_t supportedMetadata, |
154 | 157 |
BasicIo::AutoPtr io) |
158 |
#ifdef EXV_USING_CPP_ELEVEN |
|
159 |
: io_(std::move(io)), |
|
160 |
#else |
|
155 | 161 |
: io_(io), |
162 |
#endif |
|
156 | 163 |
pixelWidth_(0), |
157 | 164 |
pixelHeight_(0), |
158 | 165 |
imageType_(imageType), |
... | ... | |
281 | 288 |
static std::map<int,std::string> tags; |
282 | 289 |
static bool init = true; |
283 | 290 |
static char buffer[80]; |
291 |
#ifdef EXV_USING_CPP_ELEVEN |
|
292 |
static std::mutex tagNameInitMutex; |
|
293 |
#endif |
|
284 | 294 | |
285 | 295 |
if ( init ) { |
296 |
#ifdef EXV_USING_CPP_ELEVEN |
|
297 |
std::lock_guard<std::mutex> guard(tagNameInitMutex); |
|
298 |
#endif |
|
286 | 299 |
int idx; |
287 | 300 |
const TagInfo* ti ; |
288 | 301 |
for (ti = Internal:: mnTagList(), idx = 0; ti[idx].tag_ != 0xffff; ++idx) tags[ti[idx].tag_] = ti[idx].name_; |
... | ... | |
293 | 306 |
for (ti = Internal:: mpfTagList(), idx = 0; ti[idx].tag_ != 0xffff; ++idx) tags[ti[idx].tag_] = ti[idx].name_; |
294 | 307 |
for (ti = Internal::Nikon1MakerNote::tagList(), idx = 0 |
295 | 308 |
; ti[idx].tag_ != 0xffff; ++idx) tags[ti[idx].tag_] = ti[idx].name_; |
309 |
#ifdef EXV_USING_CPP_ELEVEN |
|
310 |
init = false; |
|
311 |
#endif |
|
296 | 312 |
} |
313 |
#ifndef EXV_USING_CPP_ELEVEN |
|
297 | 314 |
init = false; |
315 |
#endif |
|
298 | 316 | |
299 | 317 |
try { |
300 | 318 |
result = tags[tag].c_str(); |
... | ... | |
847 | 865 |
Image::AutoPtr ImageFactory::open(const byte* data, long size) |
848 | 866 |
{ |
849 | 867 |
BasicIo::AutoPtr io(new MemIo(data, size)); |
868 |
#ifdef EXV_USING_CPP_ELEVEN |
|
869 |
Image::AutoPtr image = open(std::move(io)); // may throw |
|
870 |
#else |
|
850 | 871 |
Image::AutoPtr image = open(io); // may throw |
872 |
#endif |
|
851 | 873 |
if (image.get() == 0) throw Error(12); |
852 | 874 |
return image; |
853 | 875 |
} |
... | ... | |
859 | 881 |
} |
860 | 882 |
for (unsigned int i = 0; registry[i].imageType_ != ImageType::none; ++i) { |
861 | 883 |
if (registry[i].isThisType_(*io, false)) { |
884 |
#ifdef EXV_USING_CPP_ELEVEN |
|
885 |
return registry[i].newInstance_(std::move(io), false); |
|
886 |
#else |
|
862 | 887 |
return registry[i].newInstance_(io, false); |
888 |
#endif |
|
863 | 889 |
} |
864 | 890 |
} |
865 | 891 |
return Image::AutoPtr(); |
... | ... | |
868 | 894 |
Image::AutoPtr ImageFactory::create(int type, |
869 | 895 |
const std::string& path) |
870 | 896 |
{ |
897 |
#ifdef EXV_USING_CPP_ELEVEN |
|
898 |
std::unique_ptr<FileIo> fileIo(new FileIo(path)); |
|
899 |
#else |
|
871 | 900 |
std::auto_ptr<FileIo> fileIo(new FileIo(path)); |
901 |
#endif |
|
872 | 902 |
// Create or overwrite the file, then close it |
873 | 903 |
if (fileIo->open("w+b") != 0) { |
874 | 904 |
throw Error(10, path, "w+b", strError()); |
875 | 905 |
} |
876 | 906 |
fileIo->close(); |
907 |
#ifdef EXV_USING_CPP_ELEVEN |
|
908 |
BasicIo::AutoPtr io(std::move(fileIo)); |
|
909 |
Image::AutoPtr image = create(type, std::move(io)); |
|
910 |
#else |
|
877 | 911 |
BasicIo::AutoPtr io(fileIo); |
878 | 912 |
Image::AutoPtr image = create(type, io); |
913 |
#endif |
|
879 | 914 |
if (image.get() == 0) throw Error(13, type); |
880 | 915 |
return image; |
881 | 916 |
} |
... | ... | |
884 | 919 |
Image::AutoPtr ImageFactory::create(int type, |
885 | 920 |
const std::wstring& wpath) |
886 | 921 |
{ |
922 |
#ifdef EXV_USING_CPP_ELEVEN |
|
923 |
std::unique_ptr<FileIo> fileIo(new FileIo(wpath)); |
|
924 |
#else |
|
887 | 925 |
std::auto_ptr<FileIo> fileIo(new FileIo(wpath)); |
926 |
#endif |
|
888 | 927 |
// Create or overwrite the file, then close it |
889 | 928 |
if (fileIo->open("w+b") != 0) { |
890 | 929 |
throw WError(10, wpath, "w+b", strError().c_str()); |
... | ... | |
900 | 939 |
Image::AutoPtr ImageFactory::create(int type) |
901 | 940 |
{ |
902 | 941 |
BasicIo::AutoPtr io(new MemIo); |
942 |
#ifdef EXV_USING_CPP_ELEVEN |
|
943 |
Image::AutoPtr image = create(type, std::move(io)); |
|
944 |
#else |
|
903 | 945 |
Image::AutoPtr image = create(type, io); |
946 |
#endif |
|
904 | 947 |
if (image.get() == 0) throw Error(13, type); |
905 | 948 |
return image; |
906 | 949 |
} |
... | ... | |
911 | 954 |
// BasicIo instance does not need to be open |
912 | 955 |
const Registry* r = find(registry, type); |
913 | 956 |
if (0 != r) { |
957 |
#ifdef EXV_USING_CPP_ELEVEN |
|
958 |
return r->newInstance_(std::move(io), true); |
|
959 |
#else |
|
914 | 960 |
return r->newInstance_(io, true); |
961 |
#endif |
|
915 | 962 |
} |
916 | 963 |
return Image::AutoPtr(); |
917 | 964 |
} // ImageFactory::create |
exiv2-0.26-svn-1/src/iptc.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
210 | 210 | |
211 | 211 |
Value::AutoPtr Iptcdatum::getValue() const |
212 | 212 |
{ |
213 |
#ifdef EXV_USING_CPP_ELEVEN |
|
214 |
return value_.get() == 0 ? Value::AutoPtr(nullptr) : value_->clone(); |
|
215 |
#else |
|
213 | 216 |
return value_.get() == 0 ? Value::AutoPtr(0) : value_->clone(); |
217 |
#endif |
|
214 | 218 |
} |
215 | 219 | |
216 | 220 |
const Value& Iptcdatum::value() const |
... | ... | |
237 | 241 |
{ |
238 | 242 |
UShortValue::AutoPtr v(new UShortValue); |
239 | 243 |
v->value_.push_back(value); |
244 |
#ifdef EXV_USING_CPP_ELEVEN |
|
245 |
value_ = std::move(v); |
|
246 |
#else |
|
240 | 247 |
value_ = v; |
248 |
#endif |
|
241 | 249 |
return *this; |
242 | 250 |
} |
243 | 251 |
exiv2-0.26-svn-1/src/jp2image.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
141 | 141 |
namespace Exiv2 |
142 | 142 |
{ |
143 | 143 | |
144 |
#ifdef EXV_USING_CPP_ELEVEN |
|
145 |
Jp2Image::Jp2Image(BasicIo::AutoPtr io, bool create) |
|
146 |
: Image(ImageType::jp2, mdExif | mdIptc | mdXmp, std::move(io)) |
|
147 |
#else |
|
144 | 148 |
Jp2Image::Jp2Image(BasicIo::AutoPtr io, bool create) |
145 | 149 |
: Image(ImageType::jp2, mdExif | mdIptc | mdXmp, io) |
150 |
#endif |
|
146 | 151 |
{ |
147 | 152 |
if (create) |
148 | 153 |
{ |
... | ... | |
911 | 916 |
// free functions |
912 | 917 |
Image::AutoPtr newJp2Instance(BasicIo::AutoPtr io, bool create) |
913 | 918 |
{ |
919 |
#ifdef EXV_USING_CPP_ELEVEN |
|
920 |
Image::AutoPtr image(new Jp2Image(std::move(io), create)); |
|
921 |
#else |
|
914 | 922 |
Image::AutoPtr image(new Jp2Image(io, create)); |
923 |
#endif |
|
915 | 924 |
if (!image->good()) |
916 | 925 |
{ |
917 | 926 |
image.reset(); |
exiv2-0.26-svn-1/src/jpgimage.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
302 | 302 | |
303 | 303 |
} // Photoshop::setIptcIrb |
304 | 304 | |
305 |
#ifdef EXV_USING_CPP_ELEVEN |
|
306 |
JpegBase::JpegBase(int type, BasicIo::AutoPtr io, bool create, |
|
307 |
const byte initData[], long dataSize) |
|
308 |
: Image(type, mdExif | mdIptc | mdXmp | mdComment, std::move(io)) |
|
309 |
#else |
|
305 | 310 |
JpegBase::JpegBase(int type, BasicIo::AutoPtr io, bool create, |
306 | 311 |
const byte initData[], long dataSize) |
307 | 312 |
: Image(type, mdExif | mdIptc | mdXmp | mdComment, io) |
313 |
#endif |
|
308 | 314 |
{ |
309 | 315 |
if (create) { |
310 | 316 |
initImage(initData, dataSize); |
... | ... | |
1244 | 1250 |
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xDA,0x00,0x0C,0x03,0x01,0x00,0x02, |
1245 | 1251 |
0x11,0x03,0x11,0x00,0x3F,0x00,0xA0,0x00,0x0F,0xFF,0xD9 }; |
1246 | 1252 | |
1253 |
#ifdef EXV_USING_CPP_ELEVEN |
|
1254 |
JpegImage::JpegImage(BasicIo::AutoPtr io, bool create) |
|
1255 |
: JpegBase(ImageType::jpeg, std::move(io), create, blank_, sizeof(blank_)) |
|
1256 |
#else |
|
1247 | 1257 |
JpegImage::JpegImage(BasicIo::AutoPtr io, bool create) |
1248 | 1258 |
: JpegBase(ImageType::jpeg, io, create, blank_, sizeof(blank_)) |
1259 |
#endif |
|
1249 | 1260 |
{ |
1250 | 1261 |
} |
1251 | 1262 | |
... | ... | |
1272 | 1283 | |
1273 | 1284 |
Image::AutoPtr newJpegInstance(BasicIo::AutoPtr io, bool create) |
1274 | 1285 |
{ |
1286 |
#ifdef EXV_USING_CPP_ELEVEN |
|
1287 |
Image::AutoPtr image(new JpegImage(std::move(io), create)); |
|
1288 |
#else |
|
1275 | 1289 |
Image::AutoPtr image(new JpegImage(io, create)); |
1290 |
#endif |
|
1276 | 1291 |
if (!image->good()) { |
1277 | 1292 |
image.reset(); |
1278 | 1293 |
} |
... | ... | |
1296 | 1311 |
const char ExvImage::exiv2Id_[] = "Exiv2"; |
1297 | 1312 |
const byte ExvImage::blank_[] = { 0xff,0x01,'E','x','i','v','2',0xff,0xd9 }; |
1298 | 1313 | |
1314 |
#ifdef EXV_USING_CPP_ELEVEN |
|
1315 |
ExvImage::ExvImage(BasicIo::AutoPtr io, bool create) |
|
1316 |
: JpegBase(ImageType::exv, std::move(io), create, blank_, sizeof(blank_)) |
|
1317 |
#else |
|
1299 | 1318 |
ExvImage::ExvImage(BasicIo::AutoPtr io, bool create) |
1300 | 1319 |
: JpegBase(ImageType::exv, io, create, blank_, sizeof(blank_)) |
1320 |
#endif |
|
1301 | 1321 |
{ |
1302 | 1322 |
} |
1303 | 1323 | |
... | ... | |
1326 | 1346 |
Image::AutoPtr newExvInstance(BasicIo::AutoPtr io, bool create) |
1327 | 1347 |
{ |
1328 | 1348 |
Image::AutoPtr image; |
1349 |
#ifdef EXV_USING_CPP_ELEVEN |
|
1350 |
image = Image::AutoPtr(new ExvImage(std::move(io), create)); |
|
1351 |
#else |
|
1329 | 1352 |
image = Image::AutoPtr(new ExvImage(io, create)); |
1353 |
#endif |
|
1330 | 1354 |
if (!image->good()) image.reset(); |
1331 | 1355 |
return image; |
1332 | 1356 |
} |
exiv2-0.26-svn-1/src/matroskavideo.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
482 | 482 | |
483 | 483 |
using namespace Exiv2::Internal; |
484 | 484 | |
485 |
#ifdef EXV_USING_CPP_ELEVEN |
|
486 |
MatroskaVideo::MatroskaVideo(BasicIo::AutoPtr io) |
|
487 |
: Image(ImageType::mkv, mdNone, std::move(io)) |
|
488 |
#else |
|
485 | 489 |
MatroskaVideo::MatroskaVideo(BasicIo::AutoPtr io) |
486 | 490 |
: Image(ImageType::mkv, mdNone, io) |
491 |
#endif |
|
487 | 492 |
{ |
488 | 493 |
} // MatroskaVideo::MatroskaVideo |
489 | 494 | |
... | ... | |
743 | 748 | |
744 | 749 |
Image::AutoPtr newMkvInstance(BasicIo::AutoPtr io, bool /*create*/) |
745 | 750 |
{ |
751 |
#ifdef EXV_USING_CPP_ELEVEN |
|
752 |
Image::AutoPtr image(new MatroskaVideo(std::move(io))); |
|
753 |
#else |
|
746 | 754 |
Image::AutoPtr image(new MatroskaVideo(io)); |
755 |
#endif |
|
747 | 756 |
if (!image->good()) { |
748 | 757 |
image.reset(); |
749 | 758 |
} |
exiv2-0.26-svn-1/src/mrwimage.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
49 | 49 |
// class member definitions |
50 | 50 |
namespace Exiv2 { |
51 | 51 | |
52 |
#ifdef EXV_USING_CPP_ELEVEN |
|
53 |
MrwImage::MrwImage(BasicIo::AutoPtr io, bool /*create*/) |
|
54 |
: Image(ImageType::mrw, mdExif | mdIptc | mdXmp, std::move(io)) |
|
55 |
#else |
|
52 | 56 |
MrwImage::MrwImage(BasicIo::AutoPtr io, bool /*create*/) |
53 | 57 |
: Image(ImageType::mrw, mdExif | mdIptc | mdXmp, io) |
58 |
#endif |
|
54 | 59 |
{ |
55 | 60 |
} // MrwImage::MrwImage |
56 | 61 | |
... | ... | |
158 | 163 |
// free functions |
159 | 164 |
Image::AutoPtr newMrwInstance(BasicIo::AutoPtr io, bool create) |
160 | 165 |
{ |
166 |
#ifdef EXV_USING_CPP_ELEVEN |
|
167 |
Image::AutoPtr image(new MrwImage(std::move(io), create)); |
|
168 |
#else |
|
161 | 169 |
Image::AutoPtr image(new MrwImage(io, create)); |
170 |
#endif |
|
162 | 171 |
if (!image->good()) { |
163 | 172 |
image.reset(); |
164 | 173 |
} |
exiv2-0.26-svn-1/src/orfimage.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
54 | 54 | |
55 | 55 |
using namespace Internal; |
56 | 56 | |
57 |
#ifdef EXV_USING_CPP_ELEVEN |
|
58 |
OrfImage::OrfImage(BasicIo::AutoPtr io, bool create) |
|
59 |
: TiffImage(/*ImageType::orf, mdExif | mdIptc | mdXmp,*/ std::move(io),create) |
|
60 |
#else |
|
57 | 61 |
OrfImage::OrfImage(BasicIo::AutoPtr io, bool create) |
58 | 62 |
: TiffImage(/*ImageType::orf, mdExif | mdIptc | mdXmp,*/ io,create) |
63 |
#endif |
|
59 | 64 |
{ |
60 | 65 |
setTypeSupported(ImageType::orf, mdExif | mdIptc | mdXmp); |
61 | 66 |
} // OrfImage::OrfImage |
... | ... | |
185 | 190 |
ed.end()); |
186 | 191 |
} |
187 | 192 | |
193 |
#ifdef EXV_USING_CPP_ELEVEN |
|
194 |
std::unique_ptr<TiffHeaderBase> header(new OrfHeader(byteOrder)); |
|
195 |
#else |
|
188 | 196 |
std::auto_ptr<TiffHeaderBase> header(new OrfHeader(byteOrder)); |
197 |
#endif |
|
189 | 198 |
return TiffParserWorker::encode(io, |
190 | 199 |
pData, |
191 | 200 |
size, |
... | ... | |
202 | 211 |
// free functions |
203 | 212 |
Image::AutoPtr newOrfInstance(BasicIo::AutoPtr io, bool create) |
204 | 213 |
{ |
214 |
#ifdef EXV_USING_CPP_ELEVEN |
|
215 |
Image::AutoPtr image(new OrfImage(std::move(io), create)); |
|
216 |
#else |
|
205 | 217 |
Image::AutoPtr image(new OrfImage(io, create)); |
218 |
#endif |
|
206 | 219 |
if (!image->good()) { |
207 | 220 |
image.reset(); |
208 | 221 |
} |
exiv2-0.26-svn-1/src/pgfimage.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
86 | 86 |
return result; |
87 | 87 |
} |
88 | 88 | |
89 |
#ifdef EXV_USING_CPP_ELEVEN |
|
90 |
PgfImage::PgfImage(BasicIo::AutoPtr io, bool create) |
|
91 |
: Image(ImageType::pgf, mdExif | mdIptc| mdXmp | mdComment, std::move(io)) |
|
92 |
, bSwap_(isBigEndianPlatform()) |
|
93 |
#else |
|
89 | 94 |
PgfImage::PgfImage(BasicIo::AutoPtr io, bool create) |
90 | 95 |
: Image(ImageType::pgf, mdExif | mdIptc| mdXmp | mdComment, io) |
91 | 96 |
, bSwap_(isBigEndianPlatform()) |
97 |
#endif |
|
92 | 98 |
{ |
93 | 99 |
if (create) |
94 | 100 |
{ |
... | ... | |
321 | 327 |
// free functions |
322 | 328 |
Image::AutoPtr newPgfInstance(BasicIo::AutoPtr io, bool create) |
323 | 329 |
{ |
330 |
#ifdef EXV_USING_CPP_ELEVEN |
|
331 |
Image::AutoPtr image(new PgfImage(std::move(io), create)); |
|
332 |
#else |
|
324 | 333 |
Image::AutoPtr image(new PgfImage(io, create)); |
334 |
#endif |
|
325 | 335 |
if (!image->good()) |
326 | 336 |
{ |
327 | 337 |
image.reset(); |
exiv2-0.26-svn-1/src/pngimage.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
69 | 69 | |
70 | 70 |
using namespace Internal; |
71 | 71 | |
72 |
#ifdef EXV_USING_CPP_ELEVEN |
|
73 |
PngImage::PngImage(BasicIo::AutoPtr io, bool create) |
|
74 |
: Image(ImageType::png, mdExif | mdIptc | mdXmp | mdComment, std::move(io)) |
|
75 |
#else |
|
72 | 76 |
PngImage::PngImage(BasicIo::AutoPtr io, bool create) |
73 | 77 |
: Image(ImageType::png, mdExif | mdIptc | mdXmp | mdComment, io) |
78 |
#endif |
|
74 | 79 |
{ |
75 | 80 |
if (create) |
76 | 81 |
{ |
... | ... | |
707 | 712 |
// free functions |
708 | 713 |
Image::AutoPtr newPngInstance(BasicIo::AutoPtr io, bool create) |
709 | 714 |
{ |
715 |
#ifdef EXV_USING_CPP_ELEVEN |
|
716 |
Image::AutoPtr image(new PngImage(std::move(io), create)); |
|
717 |
#else |
|
710 | 718 |
Image::AutoPtr image(new PngImage(io, create)); |
719 |
#endif |
|
711 | 720 |
if (!image->good()) |
712 | 721 |
{ |
713 | 722 |
image.reset(); |
exiv2-0.26-svn-1/src/preview.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
95 | 95 |
virtual ~Loader() {} |
96 | 96 | |
97 | 97 |
//! Loader auto pointer |
98 |
#ifdef EXV_USING_CPP_ELEVEN |
|
99 |
typedef std::unique_ptr<Loader> AutoPtr; |
|
100 |
#else |
|
98 | 101 |
typedef std::auto_ptr<Loader> AutoPtr; |
102 |
#endif |
|
99 | 103 | |
100 | 104 |
//! Create a Loader subclass for requested id |
101 | 105 |
static AutoPtr create(PreviewId id, const Image &image); |
exiv2-0.26-svn-1/src/properties.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
47 | 47 |
#include <cstring> |
48 | 48 |
#include <cstdlib> |
49 | 49 |
#include <cctype> |
50 |
#ifdef EXV_USING_CPP_ELEVEN |
|
51 |
#include <mutex> |
|
52 |
#endif |
|
50 | 53 | |
51 | 54 |
// ***************************************************************************** |
52 | 55 |
namespace { |
... | ... | |
2488 | 2491 |
} |
2489 | 2492 | |
2490 | 2493 |
XmpProperties::NsRegistry XmpProperties::nsRegistry_; |
2494 |
#ifdef EXV_USING_CPP_ELEVEN |
|
2495 |
std::mutex XmpProperties::mutex_; |
|
2496 |
#endif |
|
2491 | 2497 |
Internal::RWLock XmpProperties::rwLock_; |
2492 | 2498 | |
2493 | 2499 |
const XmpNsInfo* XmpProperties::lookupNsRegistry(const XmpNsInfo::Prefix& prefix) |
2494 | 2500 |
{ |
2501 |
#ifdef EXV_USING_CPP_ELEVEN |
|
2502 |
std::lock_guard<std::mutex> guard(mutex_); |
|
2503 |
#endif |
|
2495 | 2504 |
Internal::ScopedReadLock srl(rwLock_); |
2496 | 2505 |
return lookupNsRegistryUnsafe(prefix); |
2497 | 2506 |
} |
... | ... | |
2515 | 2524 |
&& ns2.substr(ns2.size() - 1, 1) != "#") ns2 += "/"; |
2516 | 2525 |
// Check if there is already a registered namespace with this prefix |
2517 | 2526 |
const XmpNsInfo* xnp = lookupNsRegistryUnsafe(XmpNsInfo::Prefix(prefix)); |
2527 |
#ifdef EXV_USING_CPP_ELEVEN |
|
2528 |
std::lock_guard<std::mutex> guard(mutex_); |
|
2529 |
#endif |
|
2518 | 2530 |
if (xnp) { |
2519 | 2531 |
#ifndef SUPPRESS_WARNINGS |
2520 | 2532 |
if (strcmp(xnp->ns_, ns2.c_str()) != 0) { |
exiv2-0.26-svn-1/src/psdimage.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
125 | 125 |
// class member definitions |
126 | 126 |
namespace Exiv2 { |
127 | 127 | |
128 |
#ifdef EXV_USING_CPP_ELEVEN |
|
129 |
PsdImage::PsdImage(BasicIo::AutoPtr io) |
|
130 |
: Image(ImageType::psd, mdExif | mdIptc | mdXmp, std::move(io)) |
|
131 |
#else |
|
128 | 132 |
PsdImage::PsdImage(BasicIo::AutoPtr io) |
129 | 133 |
: Image(ImageType::psd, mdExif | mdIptc | mdXmp, io) |
134 |
#endif |
|
130 | 135 |
{ |
131 | 136 |
} // PsdImage::PsdImage |
132 | 137 | |
... | ... | |
683 | 688 |
// free functions |
684 | 689 |
Image::AutoPtr newPsdInstance(BasicIo::AutoPtr io, bool /*create*/) |
685 | 690 |
{ |
691 |
#ifdef EXV_USING_CPP_ELEVEN |
|
692 |
Image::AutoPtr image(new PsdImage(std::move(io))); |
|
693 |
#else |
|
686 | 694 |
Image::AutoPtr image(new PsdImage(io)); |
695 |
#endif |
|
687 | 696 |
if (!image->good()) |
688 | 697 |
{ |
689 | 698 |
image.reset(); |
exiv2-0.26-svn-1/src/quicktimevideo.cpp 2017-01-13 12:42:37.000000000 -0500 | ||
---|---|---|
611 | 611 | |
612 | 612 |
using namespace Exiv2::Internal; |
613 | 613 | |
614 |
#ifdef EXV_USING_CPP_ELEVEN |
|
615 |
QuickTimeVideo::QuickTimeVideo(BasicIo::AutoPtr io) |
|
616 |
: Image(ImageType::qtime, mdNone, std::move(io)) |
|
617 |
, timeScale_(1) |
|
618 |
#else |
|
614 | 619 |
QuickTimeVideo::QuickTimeVideo(BasicIo::AutoPtr io) |