replace several typedefs with using

Signed-off-by: Rosen Penev <rosenp@gmail.com>
main
Rosen Penev 3 years ago
parent 95355fe214
commit def782fb65

@ -36,7 +36,7 @@ namespace Exiv2 {
class EXIV2API BasicIo { class EXIV2API BasicIo {
public: public:
//! BasicIo auto_ptr type //! BasicIo auto_ptr type
typedef std::unique_ptr<BasicIo> UniquePtr; using UniquePtr = std::unique_ptr<BasicIo>;
//! Seek starting positions //! Seek starting positions
enum Position { beg, cur, end }; enum Position { beg, cur, end };

@ -245,7 +245,7 @@ namespace Exiv2 {
class EXIV2API IptcKey : public Key { class EXIV2API IptcKey : public Key {
public: public:
//! Shortcut for an %IptcKey auto pointer. //! Shortcut for an %IptcKey auto pointer.
typedef std::unique_ptr<IptcKey> UniquePtr; using UniquePtr = std::unique_ptr<IptcKey>;
//! @name Creators //! @name Creators
//@{ //@{
@ -322,7 +322,7 @@ namespace Exiv2 {
/*! /*!
@brief typedef for string:string map @brief typedef for string:string map
*/ */
typedef std::map<std::string,std::string> Dictionary; using Dictionary = std::map<std::string, std::string>;
// ***************************************************************************** // *****************************************************************************
// free functions // free functions

@ -68,7 +68,7 @@ namespace Exiv2 {
specific way. The default handler sends the log message to specific way. The default handler sends the log message to
standard error. standard error.
*/ */
typedef void (*Handler)(int, const char*); using Handler = void (*)(int, const char*);
//! @name Creators //! @name Creators
//@{ //@{
@ -290,7 +290,7 @@ namespace Exiv2 {
}; // class BasicError }; // class BasicError
//! Error class used for exceptions (std::string based) //! Error class used for exceptions (std::string based)
typedef BasicError<char> Error; using Error = BasicError<char>;
// ***************************************************************************** // *****************************************************************************
// free functions, template and inline definitions // free functions, template and inline definitions

@ -354,7 +354,7 @@ namespace Exiv2 {
}; // class ExifThumb }; // class ExifThumb
//! Container type to hold all metadata //! Container type to hold all metadata
typedef std::list<Exifdatum> ExifMetadata; using ExifMetadata = std::list<Exifdatum>;
/*! /*!
@brief A container for Exif data. This is a top-level class of the %Exiv2 @brief A container for Exif data. This is a top-level class of the %Exiv2
@ -371,9 +371,9 @@ namespace Exiv2 {
class EXIV2API ExifData { class EXIV2API ExifData {
public: public:
//! ExifMetadata iterator type //! ExifMetadata iterator type
typedef ExifMetadata::iterator iterator; using iterator = ExifMetadata::iterator;
//! ExifMetadata const iterator type //! ExifMetadata const iterator type
typedef ExifMetadata::const_iterator const_iterator; using const_iterator = ExifMetadata::const_iterator;
//! @name Manipulators //! @name Manipulators
//@{ //@{

@ -31,14 +31,12 @@ namespace Exiv2 {
}; };
//! List of native previews. This is meant to be used only by the PreviewManager. //! List of native previews. This is meant to be used only by the PreviewManager.
typedef std::vector<NativePreview> NativePreviewList; using NativePreviewList = std::vector<NativePreview>;
/*! /*!
@brief Options for printStructure @brief Options for printStructure
*/ */
typedef enum { kpsNone, kpsBasic, kpsXMP, kpsRecursive enum PrintStructureOption { kpsNone, kpsBasic, kpsXMP, kpsRecursive, kpsIccProfile, kpsIptcErase };
, kpsIccProfile , kpsIptcErase
} PrintStructureOption;
/*! /*!
@brief Abstract base class defining the interface for an image. This is @brief Abstract base class defining the interface for an image. This is
@ -53,7 +51,7 @@ namespace Exiv2 {
class EXIV2API Image { class EXIV2API Image {
public: public:
//! Image auto_ptr type //! Image auto_ptr type
typedef std::unique_ptr<Image> UniquePtr; using UniquePtr = std::unique_ptr<Image>;
//! @name Creators //! @name Creators
//@{ //@{
@ -490,9 +488,9 @@ namespace Exiv2 {
}; // class Image }; // class Image
//! Type for function pointer that creates new Image instances //! Type for function pointer that creates new Image instances
typedef Image::UniquePtr (*NewInstanceFct)(BasicIo::UniquePtr io, bool create); using NewInstanceFct = Image::UniquePtr (*)(BasicIo::UniquePtr io, bool create);
//! Type for function pointer that checks image types //! Type for function pointer that checks image types
typedef bool (*IsThisTypeFct)(BasicIo& iIo, bool advance); using IsThisTypeFct = bool (*)(BasicIo& iIo, bool advance);
/*! /*!
@brief Returns an Image instance of the specified type. @brief Returns an Image instance of the specified type.

@ -25,11 +25,10 @@ extern "C" {
#endif #endif
//! @brief typedef for prototype of handler function. //! @brief typedef for prototype of handler function.
typedef int (*ini_handler)(void* user, const char* section, using ini_handler = int (*)(void* user, const char* section, const char* name, const char* value);
const char* name, const char* value);
//! Typedef for prototype of fgets-style reader function. //! Typedef for prototype of fgets-style reader function.
typedef char* (*ini_reader)(char* str, int num, void* stream); using ini_reader = char* (*)(char* str, int num, void* stream);
/*! /*!
@brief Parse given INI-style file. May have [section]s, name=value pairs @brief Parse given INI-style file. May have [section]s, name=value pairs

@ -138,7 +138,7 @@ namespace Exiv2 {
}; // class Iptcdatum }; // class Iptcdatum
//! Container type to hold all metadata //! Container type to hold all metadata
typedef std::vector<Iptcdatum> IptcMetadata; using IptcMetadata = std::vector<Iptcdatum>;
/*! /*!
@brief A container for IPTC data. This is a top-level class of the %Exiv2 library. @brief A container for IPTC data. This is a top-level class of the %Exiv2 library.
@ -153,9 +153,9 @@ namespace Exiv2 {
class EXIV2API IptcData { class EXIV2API IptcData {
public: public:
//! IptcMetadata iterator type //! IptcMetadata iterator type
typedef IptcMetadata::iterator iterator; using iterator = IptcMetadata::iterator;
//! IptcMetadata const iterator type //! IptcMetadata const iterator type
typedef IptcMetadata::const_iterator const_iterator; using const_iterator = IptcMetadata::const_iterator;
// Use the compiler generated constructors and assignment operator // Use the compiler generated constructors and assignment operator

@ -27,7 +27,7 @@ namespace Exiv2 {
class EXIV2API Key { class EXIV2API Key {
public: public:
//! Shortcut for a %Key auto pointer. //! Shortcut for a %Key auto pointer.
typedef std::unique_ptr<Key> UniquePtr; using UniquePtr = std::unique_ptr<Key>;
//! @name Creators //! @name Creators
//@{ //@{

@ -16,7 +16,7 @@ namespace Exiv2 {
// class definitions // class definitions
//! Type of preview image. //! Type of preview image.
typedef int PreviewId; using PreviewId = int;
/*! /*!
@brief Preview image properties. @brief Preview image properties.
@ -37,13 +37,14 @@ namespace Exiv2 {
}; };
//! Container type to hold all preview images metadata. //! Container type to hold all preview images metadata.
typedef std::vector<PreviewProperties> PreviewPropertiesList; using PreviewPropertiesList = std::vector<PreviewProperties>;
/*! /*!
@brief Class that holds preview image properties and data buffer. @brief Class that holds preview image properties and data buffer.
*/ */
class EXIV2API PreviewImage { class EXIV2API PreviewImage {
friend class PreviewManager; friend class PreviewManager;
public: public:
//! @name Constructors //! @name Constructors
//@{ //@{

@ -198,7 +198,7 @@ namespace Exiv2 {
*/ */
static void unregisterNs(); static void unregisterNs();
//! Type for the namespace registry //! Type for the namespace registry
typedef std::map<std::string, XmpNsInfo> NsRegistry; using NsRegistry = std::map<std::string, XmpNsInfo>;
/*! /*!
@brief Get the registered namespace for a specific \em prefix from the registry. @brief Get the registered namespace for a specific \em prefix from the registry.
*/ */
@ -221,7 +221,7 @@ namespace Exiv2 {
{ {
public: public:
//! Shortcut for an %XmpKey auto pointer. //! Shortcut for an %XmpKey auto pointer.
typedef std::unique_ptr<XmpKey> UniquePtr; using UniquePtr = std::unique_ptr<XmpKey>;
//! @name Creators //! @name Creators
//@{ //@{

@ -12,53 +12,6 @@ namespace Exiv2
{ {
namespace Internal namespace Internal
{ {
// TODO: remove these custom implementations once we have C++11
template <class T>
struct remove_const
{
typedef T type;
};
template <class T>
struct remove_const<const T>
{
typedef T type;
};
template <class T>
struct remove_volatile
{
typedef T type;
};
template <class T>
struct remove_volatile<volatile T>
{
typedef T type;
};
template <class T>
struct remove_cv
{
typedef typename remove_const<typename remove_volatile<T>::type>::type type;
};
template <class T>
struct remove_pointer
{
typedef T type;
};
template <class T>
struct remove_pointer<T*>
{
typedef T type;
};
template <class T>
struct remove_pointer<T* const>
{
typedef T type;
};
/*! /*!
* Common base class of all slice implementations. * Common base class of all slice implementations.
* *
@ -133,9 +86,9 @@ namespace Exiv2
template <template <typename data_type> class storage_type, typename data_type> template <template <typename data_type> class storage_type, typename data_type>
struct ConstSliceBase : SliceBase struct ConstSliceBase : SliceBase
{ {
typedef typename storage_type<data_type>::iterator iterator; using iterator = typename storage_type<data_type>::iterator;
typedef typename storage_type<data_type>::const_iterator const_iterator; using const_iterator = typename storage_type<data_type>::const_iterator;
typedef typename storage_type<data_type>::value_type value_type; using value_type = typename storage_type<data_type>::value_type;
/*! /*!
* Default constructor, requires begin to be smaller than end, * Default constructor, requires begin to be smaller than end,
@ -220,9 +173,9 @@ namespace Exiv2
template <template <typename> class storage_type, typename data_type> template <template <typename> class storage_type, typename data_type>
struct MutableSliceBase : public ConstSliceBase<storage_type, data_type> struct MutableSliceBase : public ConstSliceBase<storage_type, data_type>
{ {
typedef typename ConstSliceBase<storage_type, data_type>::iterator iterator; using iterator = typename ConstSliceBase<storage_type, data_type>::iterator;
typedef typename ConstSliceBase<storage_type, data_type>::const_iterator const_iterator; using const_iterator = typename ConstSliceBase<storage_type, data_type>::const_iterator;
typedef typename ConstSliceBase<storage_type, data_type>::value_type value_type; using value_type = typename ConstSliceBase<storage_type, data_type>::value_type;
/*! /*!
* Forwards everything to the constructor of const_slice_base * Forwards everything to the constructor of const_slice_base
@ -290,7 +243,7 @@ namespace Exiv2
return ConstSliceBase<storage_type, const data_type>(this->storage_.data_, this->begin_, this->end_); return ConstSliceBase<storage_type, const data_type>(this->storage_.data_, this->begin_, this->end_);
} }
typedef ConstSliceBase<storage_type, data_type> base_type; using base_type = ConstSliceBase<storage_type, data_type>;
/*! /*!
* Create a mutable sub-slice with the given bounds (with respect to * Create a mutable sub-slice with the given bounds (with respect to
@ -328,11 +281,11 @@ namespace Exiv2
template <typename container> template <typename container>
struct ContainerStorage struct ContainerStorage
{ {
typedef typename container::iterator iterator; using iterator = typename container::iterator;
typedef typename container::const_iterator const_iterator; using const_iterator = typename container::const_iterator;
typedef typename Internal::remove_cv<typename container::value_type>::type value_type; using value_type = std::remove_cv_t<typename container::value_type>;
/*! /*!
* @throw std::out_of_range when end is larger than the container's * @throw std::out_of_range when end is larger than the container's
@ -399,9 +352,9 @@ namespace Exiv2
template <typename storage_type> template <typename storage_type>
struct PtrSliceStorage struct PtrSliceStorage
{ {
typedef typename remove_cv<typename remove_pointer<storage_type>::type>::type value_type; using value_type = std::remove_cv_t<std::remove_pointer_t<storage_type> >;
typedef value_type* iterator; using iterator = value_type*;
typedef const value_type* const_iterator; using const_iterator = const value_type*;
/*! /*!
* Stores ptr and checks that it is not `NULL`. The slice's bounds * Stores ptr and checks that it is not `NULL`. The slice's bounds
@ -500,11 +453,11 @@ namespace Exiv2
template <typename container> template <typename container>
struct Slice : public Internal::MutableSliceBase<Internal::ContainerStorage, container> struct Slice : public Internal::MutableSliceBase<Internal::ContainerStorage, container>
{ {
typedef typename container::iterator iterator; using iterator = typename container::iterator;
typedef typename container::const_iterator const_iterator; using const_iterator = typename container::const_iterator;
typedef typename Internal::remove_cv<typename container::value_type>::type value_type; using value_type = std::remove_cv_t<typename container::value_type>;
/*! /*!
* @brief Construct a slice of the container `cont` starting at `begin` * @brief Construct a slice of the container `cont` starting at `begin`
@ -558,11 +511,11 @@ namespace Exiv2
template <typename container> template <typename container>
struct Slice<const container> : public Internal::ConstSliceBase<Internal::ContainerStorage, const container> struct Slice<const container> : public Internal::ConstSliceBase<Internal::ContainerStorage, const container>
{ {
typedef typename container::iterator iterator; using iterator = typename container::iterator;
typedef typename container::const_iterator const_iterator; using const_iterator = typename container::const_iterator;
typedef typename Internal::remove_cv<typename container::value_type>::type value_type; using value_type = std::remove_cv_t<typename container::value_type>;
Slice(const container& cont, size_t begin, size_t end) Slice(const container& cont, size_t begin, size_t end)
: Internal::ConstSliceBase<Internal::ContainerStorage, const container>(cont, begin, end) : Internal::ConstSliceBase<Internal::ContainerStorage, const container>(cont, begin, end)

@ -24,9 +24,9 @@ namespace Exiv2 {
// type definitions // type definitions
//! Type for a function pointer for functions interpreting the tag value //! Type for a function pointer for functions interpreting the tag value
typedef std::ostream& (*PrintFct)(std::ostream&, const Value&, const ExifData* pExifData); using PrintFct = std::ostream& (*)(std::ostream&, const Value&, const ExifData* pExifData);
//! A function returning a tag list. //! A function returning a tag list.
typedef const TagInfo* (*TagListFct)(); using TagListFct = const TagInfo* (*)();
// ***************************************************************************** // *****************************************************************************
// class definitions // class definitions
@ -106,7 +106,7 @@ namespace Exiv2 {
class EXIV2API ExifKey : public Key { class EXIV2API ExifKey : public Key {
public: public:
//! Shortcut for an %ExifKey auto pointer. //! Shortcut for an %ExifKey auto pointer.
typedef std::unique_ptr<ExifKey> UniquePtr; using UniquePtr = std::unique_ptr<ExifKey>;
//! @name Creators //! @name Creators
//@{ //@{

@ -19,7 +19,9 @@
/*! /*!
@brief Macro to make calls to member functions through a pointer more readable. @brief Macro to make calls to member functions through a pointer more readable.
See the C++ FAQ LITE, item See the C++ FAQ LITE, item
<a href="http://www.parashift.com/c++-faq-lite/pointers-to-members.html#faq-33.5" title="[33.5] How can I avoid syntax errors when calling a member function using a pointer-to-member-function?">[33.5] How can I avoid syntax errors when calling a member function using a pointer-to-member-function?</a>. <a href="http://www.parashift.com/c++-faq-lite/pointers-to-members.html#faq-33.5" title="[33.5] How can I avoid
syntax errors when calling a member function using a pointer-to-member-function?">[33.5] How can I avoid syntax errors
when calling a member function using a pointer-to-member-function?</a>.
*/ */
#define EXV_CALL_MEMBER_FN(object, ptrToMember) ((object).*(ptrToMember)) #define EXV_CALL_MEMBER_FN(object, ptrToMember) ((object).*(ptrToMember))
@ -35,31 +37,28 @@ namespace Exiv2 {
// type definitions // type definitions
//! 1 byte unsigned integer type. //! 1 byte unsigned integer type.
typedef uint8_t byte; using byte = uint8_t;
//! 8 byte unsigned rational type. //! 8 byte unsigned rational type.
typedef std::pair<uint32_t, uint32_t> URational; using URational = std::pair<uint32_t, uint32_t>;
//! 8 byte signed rational type. //! 8 byte signed rational type.
typedef std::pair<int32_t, int32_t> Rational; using Rational = std::pair<int32_t, int32_t>;
//! Type to express the byte order (little or big endian) //! Type to express the byte order (little or big endian)
enum ByteOrder enum ByteOrder {
{
invalidByteOrder, invalidByteOrder,
littleEndian, littleEndian,
bigEndian, bigEndian,
}; };
//! Type to indicate write method used by TIFF parsers //! Type to indicate write method used by TIFF parsers
enum WriteMethod enum WriteMethod {
{
wmIntrusive, wmIntrusive,
wmNonIntrusive, wmNonIntrusive,
}; };
//! An identifier for each type of metadata //! An identifier for each type of metadata
enum MetadataId enum MetadataId {
{
mdNone = 0, mdNone = 0,
mdExif = 1, mdExif = 1,
mdIptc = 2, mdIptc = 2,
@ -69,8 +68,7 @@ namespace Exiv2 {
}; };
//! An identifier for each mode of metadata support //! An identifier for each mode of metadata support
enum AccessMode enum AccessMode {
{
amNone = 0, amNone = 0,
amRead = 1, amRead = 1,
amWrite = 2, amWrite = 2,
@ -115,7 +113,7 @@ namespace Exiv2 {
}; };
//! Container for binary data //! Container for binary data
typedef std::vector<byte> Blob; using Blob = std::vector<byte>;
// ***************************************************************************** // *****************************************************************************
// class definitions // class definitions
@ -136,7 +134,6 @@ namespace Exiv2 {
static TypeId typeId(const std::string& typeName); static TypeId typeId(const std::string& typeName);
//! Return the size in bytes of one element of this type //! Return the size in bytes of one element of this type
static size_t typeSize(TypeId typeId); static size_t typeSize(TypeId typeId);
}; };
/*! /*!
@ -239,8 +236,7 @@ namespace Exiv2 {
EXIV2API uint16_t getUShort(const byte* buf, ByteOrder byteOrder); EXIV2API uint16_t getUShort(const byte* buf, ByteOrder byteOrder);
//! Read a 2 byte unsigned short value from a Slice //! Read a 2 byte unsigned short value from a Slice
template <typename T> template <typename T>
uint16_t getUShort(const Slice<T>& buf, ByteOrder byteOrder) uint16_t getUShort(const Slice<T>& buf, ByteOrder byteOrder) {
{
if (byteOrder == littleEndian) { if (byteOrder == littleEndian) {
return static_cast<byte>(buf.at(1)) << 8 | static_cast<byte>(buf.at(0)); return static_cast<byte>(buf.at(1)) << 8 | static_cast<byte>(buf.at(0));
} }
@ -331,9 +327,7 @@ namespace Exiv2 {
by size hex digits, false otherwise. If size is 0, any number of by size hex digits, false otherwise. If size is 0, any number of
digits is allowed and all are checked. digits is allowed and all are checked.
*/ */
EXIV2API bool isHex(const std::string& str, EXIV2API bool isHex(const std::string& str, size_t size = 0, const std::string& prefix = "");
size_t size =0,
const std::string& prefix ="");
/*! /*!
@brief Converts a string in the form "%Y:%m:%d %H:%M:%S", e.g., @brief Converts a string in the form "%Y:%m:%d %H:%M:%S", e.g.,
@ -462,21 +456,20 @@ namespace Exiv2 {
@endcode @endcode
*/ */
template <typename T, typename K, int N> template <typename T, typename K, int N>
const T* find(T (&src)[N], const K& key) const T* find(T (&src)[N], const K& key) {
{
const T* rc = std::find(src, src + N, key); const T* rc = std::find(src, src + N, key);
return rc == src + N ? nullptr : rc; return rc == src + N ? nullptr : rc;
} }
//! Template used in the COUNTOF macro to determine the size of an array //! Template used in the COUNTOF macro to determine the size of an array
template <typename T, int N> char (&sizer(T (&)[N]))[N]; template <typename T, int N>
char (&sizer(T (&)[N]))[N];
//! Macro to determine the size of an array //! Macro to determine the size of an array
#define EXV_COUNTOF(a) (sizeof(Exiv2::sizer(a))) #define EXV_COUNTOF(a) (sizeof(Exiv2::sizer(a)))
//! Utility function to convert the argument of any type to a string //! Utility function to convert the argument of any type to a string
template <typename T> template <typename T>
std::string toString(const T& arg) std::string toString(const T& arg) {
{
std::ostringstream os; std::ostringstream os;
os << arg; os << arg;
return os.str(); return os.str();
@ -494,8 +487,7 @@ namespace Exiv2 {
conversion was successful or \c false if not. conversion was successful or \c false if not.
*/ */
template <typename T> template <typename T>
T stringTo(const std::string& s, bool& ok) T stringTo(const std::string& s, bool& ok) {
{
std::istringstream is(s); std::istringstream is(s);
T tmp = T(); T tmp = T();
ok = bool(is >> tmp); ok = bool(is >> tmp);
@ -524,8 +516,7 @@ namespace Exiv2 {
anyway... anyway...
*/ */
template <typename IntType> template <typename IntType>
IntType gcd(IntType n, IntType m) IntType gcd(IntType n, IntType m) {
{
// Avoid repeated construction // Avoid repeated construction
IntType zero(0); IntType zero(0);
@ -546,11 +537,9 @@ namespace Exiv2 {
// positive value (the standard guarantees this for built-in types, // positive value (the standard guarantees this for built-in types,
// and we require it of user-defined types). // and we require it of user-defined types).
for (;;) { for (;;) {
if(m == zero) if (m == zero) return n;
return n;
n %= m; n %= m;
if(n == zero) if (n == zero) return m;
return m;
m %= n; m %= n;
} }
} }

@ -32,7 +32,7 @@ namespace Exiv2 {
class EXIV2API Value { class EXIV2API Value {
public: public:
//! Shortcut for a %Value auto pointer. //! Shortcut for a %Value auto pointer.
typedef std::unique_ptr<Value> UniquePtr; using UniquePtr = std::unique_ptr<Value>;
//! @name Creators //! @name Creators
//@{ //@{
@ -240,7 +240,7 @@ namespace Exiv2 {
class EXIV2API DataValue : public Value { class EXIV2API DataValue : public Value {
public: public:
//! Shortcut for a %DataValue auto pointer. //! Shortcut for a %DataValue auto pointer.
typedef std::unique_ptr<DataValue> UniquePtr; using UniquePtr = std::unique_ptr<DataValue>;
explicit DataValue(TypeId typeId =undefined); explicit DataValue(TypeId typeId =undefined);
@ -294,7 +294,7 @@ namespace Exiv2 {
DataValue* clone_() const override; DataValue* clone_() const override;
//! Type used to store the data. //! Type used to store the data.
typedef std::vector<byte> ValueType; using ValueType = std::vector<byte>;
// DATA // DATA
ValueType value_; //!< Stores the data value ValueType value_; //!< Stores the data value
@ -309,7 +309,7 @@ namespace Exiv2 {
class EXIV2API StringValueBase : public Value { class EXIV2API StringValueBase : public Value {
public: public:
//! Shortcut for a %StringValueBase auto pointer. //! Shortcut for a %StringValueBase auto pointer.
typedef std::unique_ptr<StringValueBase> UniquePtr; using UniquePtr = std::unique_ptr<StringValueBase>;
//! @name Creators //! @name Creators
//@{ //@{
@ -378,7 +378,7 @@ namespace Exiv2 {
class EXIV2API StringValue : public StringValueBase { class EXIV2API StringValue : public StringValueBase {
public: public:
//! Shortcut for a %StringValue auto pointer. //! Shortcut for a %StringValue auto pointer.
typedef std::unique_ptr<StringValue> UniquePtr; using UniquePtr = std::unique_ptr<StringValue>;
//! @name Creators //! @name Creators
//@{ //@{
@ -410,7 +410,7 @@ namespace Exiv2 {
class EXIV2API AsciiValue : public StringValueBase { class EXIV2API AsciiValue : public StringValueBase {
public: public:
//! Shortcut for a %AsciiValue auto pointer. //! Shortcut for a %AsciiValue auto pointer.
typedef std::unique_ptr<AsciiValue> UniquePtr; using UniquePtr = std::unique_ptr<AsciiValue>;
//! @name Creators //! @name Creators
//@{ //@{
@ -498,7 +498,7 @@ namespace Exiv2 {
}; // class CharsetInfo }; // class CharsetInfo
//! Shortcut for a %CommentValue auto pointer. //! Shortcut for a %CommentValue auto pointer.
typedef std::unique_ptr<CommentValue> UniquePtr; using UniquePtr = std::unique_ptr<CommentValue>;
//! @name Creators //! @name Creators
//@{ //@{
@ -582,7 +582,7 @@ namespace Exiv2 {
class EXIV2API XmpValue : public Value { class EXIV2API XmpValue : public Value {
public: public:
//! Shortcut for a %XmpValue auto pointer. //! Shortcut for a %XmpValue auto pointer.
typedef std::unique_ptr<XmpValue> UniquePtr; using UniquePtr = std::unique_ptr<XmpValue>;
//! XMP array types. //! XMP array types.
enum XmpArrayType { xaNone, xaAlt, xaBag, xaSeq }; enum XmpArrayType { xaNone, xaAlt, xaBag, xaSeq };
@ -652,7 +652,7 @@ namespace Exiv2 {
class EXIV2API XmpTextValue : public XmpValue { class EXIV2API XmpTextValue : public XmpValue {
public: public:
//! Shortcut for a %XmpTextValue auto pointer. //! Shortcut for a %XmpTextValue auto pointer.
typedef std::unique_ptr<XmpTextValue> UniquePtr; using UniquePtr = std::unique_ptr<XmpTextValue>;
//! @name Creators //! @name Creators
//@{ //@{
@ -741,7 +741,7 @@ namespace Exiv2 {
class EXIV2API XmpArrayValue : public XmpValue { class EXIV2API XmpArrayValue : public XmpValue {
public: public:
//! Shortcut for a %XmpArrayValue auto pointer. //! Shortcut for a %XmpArrayValue auto pointer.
typedef std::unique_ptr<XmpArrayValue> UniquePtr; using UniquePtr = std::unique_ptr<XmpArrayValue>;
//! @name Creators //! @name Creators
//@{ //@{
@ -831,7 +831,7 @@ namespace Exiv2 {
class EXIV2API LangAltValue : public XmpValue { class EXIV2API LangAltValue : public XmpValue {
public: public:
//! Shortcut for a %LangAltValue auto pointer. //! Shortcut for a %LangAltValue auto pointer.
typedef std::unique_ptr<LangAltValue> UniquePtr; using UniquePtr = std::unique_ptr<LangAltValue>;
//! @name Creators //! @name Creators
//@{ //@{
@ -901,7 +901,7 @@ namespace Exiv2 {
public: public:
//! Type used to store language alternative arrays. //! Type used to store language alternative arrays.
typedef std::map<std::string, std::string,LangAltValueComparator> ValueType; using ValueType = std::map<std::string, std::string, LangAltValueComparator>;
// DATA // DATA
/*! /*!
@brief Map to store the language alternative values. The language @brief Map to store the language alternative values. The language
@ -920,7 +920,7 @@ namespace Exiv2 {
class EXIV2API DateValue : public Value { class EXIV2API DateValue : public Value {
public: public:
//! Shortcut for a %DateValue auto pointer. //! Shortcut for a %DateValue auto pointer.
typedef std::unique_ptr<DateValue> UniquePtr; using UniquePtr = std::unique_ptr<DateValue>;
//! @name Creators //! @name Creators
//@{ //@{
@ -1011,7 +1011,7 @@ namespace Exiv2 {
class EXIV2API TimeValue : public Value { class EXIV2API TimeValue : public Value {
public: public:
//! Shortcut for a %TimeValue auto pointer. //! Shortcut for a %TimeValue auto pointer.
typedef std::unique_ptr<TimeValue> UniquePtr; using UniquePtr = std::unique_ptr<TimeValue>;
//! @name Creators //! @name Creators
//@{ //@{
@ -1132,7 +1132,7 @@ namespace Exiv2 {
class ValueType : public Value { class ValueType : public Value {
public: public:
//! Shortcut for a %ValueType\<T\> auto pointer. //! Shortcut for a %ValueType\<T\> auto pointer.
typedef std::unique_ptr<ValueType<T> > UniquePtr; using UniquePtr = std::unique_ptr<ValueType<T> >;
//! @name Creators //! @name Creators
//@{ //@{
@ -1198,11 +1198,11 @@ namespace Exiv2 {
//@} //@}
//! Container for values //! Container for values
typedef std::vector<T> ValueList; using ValueList = std::vector<T>;
//! Iterator type defined for convenience. //! Iterator type defined for convenience.
typedef typename std::vector<T>::iterator iterator; using iterator = typename std::vector<T>::iterator;
//! Const iterator type defined for convenience. //! Const iterator type defined for convenience.
typedef typename std::vector<T>::const_iterator const_iterator; using const_iterator = typename std::vector<T>::const_iterator;
// DATA // DATA
/*! /*!
@ -1281,21 +1281,21 @@ namespace Exiv2 {
}; // class ValueType }; // class ValueType
//! Unsigned short value type //! Unsigned short value type
typedef ValueType<uint16_t> UShortValue; using UShortValue = ValueType<uint16_t>;
//! Unsigned long value type //! Unsigned long value type
typedef ValueType<uint32_t> ULongValue; using ULongValue = ValueType<uint32_t>;
//! Unsigned rational value type //! Unsigned rational value type
typedef ValueType<URational> URationalValue; using URationalValue = ValueType<URational>;
//! Signed short value type //! Signed short value type
typedef ValueType<int16_t> ShortValue; using ShortValue = ValueType<int16_t>;
//! Signed long value type //! Signed long value type
typedef ValueType<int32_t> LongValue; using LongValue = ValueType<int32_t>;
//! Signed rational value type //! Signed rational value type
typedef ValueType<Rational> RationalValue; using RationalValue = ValueType<Rational>;
//! Float value type //! Float value type
typedef ValueType<float> FloatValue; using FloatValue = ValueType<float>;
//! Double value type //! Double value type
typedef ValueType<double> DoubleValue; using DoubleValue = ValueType<double>;
// ***************************************************************************** // *****************************************************************************
// free functions, template and inline definitions // free functions, template and inline definitions

@ -133,7 +133,7 @@ namespace Exiv2 {
}; // class Xmpdatum }; // class Xmpdatum
//! Container type to hold all metadata //! Container type to hold all metadata
typedef std::vector<Xmpdatum> XmpMetadata; using XmpMetadata = std::vector<Xmpdatum>;
/*! /*!
@brief A container for XMP data. This is a top-level class of @brief A container for XMP data. This is a top-level class of
@ -151,9 +151,9 @@ namespace Exiv2 {
XmpData() = default; XmpData() = default;
//! XmpMetadata iterator type //! XmpMetadata iterator type
typedef XmpMetadata::iterator iterator; using iterator = XmpMetadata::iterator;
//! XmpMetadata const iterator type //! XmpMetadata const iterator type
typedef XmpMetadata::const_iterator const_iterator; using const_iterator = XmpMetadata::const_iterator;
//! @name Manipulators //! @name Manipulators
//@{ //@{
@ -305,7 +305,7 @@ namespace Exiv2 {
@param pLockData Pointer to the pLockData passed to initialize() @param pLockData Pointer to the pLockData passed to initialize()
@param lockUnlock Indicates whether to lock (true) or unlock (false) @param lockUnlock Indicates whether to lock (true) or unlock (false)
*/ */
typedef void (*XmpLockFct)(void* pLockData, bool lockUnlock); using XmpLockFct = void (*)(void* pLockData, bool lockUnlock);
/*! /*!
@brief Initialize the XMP Toolkit. @brief Initialize the XMP Toolkit.

@ -269,7 +269,7 @@ namespace Jzon
Node *GetCopy() const override; Node *GetCopy() const override;
private: private:
typedef std::vector<NamedNodePtr> ChildList; using ChildList = std::vector<NamedNodePtr>;
ChildList children; ChildList children;
}; };
@ -336,7 +336,7 @@ namespace Jzon
Node *GetCopy() const override; Node *GetCopy() const override;
private: private:
typedef std::vector<Node*> ChildList; using ChildList = std::vector<Node *>;
ChildList children; ChildList children;
}; };

Loading…
Cancel
Save