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 {
public:
//! BasicIo auto_ptr type
typedef std::unique_ptr<BasicIo> UniquePtr;
using UniquePtr = std::unique_ptr<BasicIo>;
//! Seek starting positions
enum Position { beg, cur, end };

@ -245,7 +245,7 @@ namespace Exiv2 {
class EXIV2API IptcKey : public Key {
public:
//! Shortcut for an %IptcKey auto pointer.
typedef std::unique_ptr<IptcKey> UniquePtr;
using UniquePtr = std::unique_ptr<IptcKey>;
//! @name Creators
//@{
@ -322,10 +322,10 @@ namespace Exiv2 {
/*!
@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
//! Output operator for dataSet
EXIV2API std::ostream& operator<<(std::ostream& os, const DataSet& dataSet);

@ -68,7 +68,7 @@ namespace Exiv2 {
specific way. The default handler sends the log message to
standard error.
*/
typedef void (*Handler)(int, const char*);
using Handler = void (*)(int, const char*);
//! @name Creators
//@{
@ -290,10 +290,10 @@ namespace Exiv2 {
}; // class BasicError
//! 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
//! Return the error message for the error with code \em code.
const char* errMsg(int code);

@ -354,7 +354,7 @@ namespace Exiv2 {
}; // class ExifThumb
//! 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
@ -371,9 +371,9 @@ namespace Exiv2 {
class EXIV2API ExifData {
public:
//! ExifMetadata iterator type
typedef ExifMetadata::iterator iterator;
using iterator = ExifMetadata::iterator;
//! ExifMetadata const iterator type
typedef ExifMetadata::const_iterator const_iterator;
using const_iterator = ExifMetadata::const_iterator;
//! @name Manipulators
//@{

@ -31,14 +31,12 @@ namespace Exiv2 {
};
//! 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
*/
typedef enum { kpsNone, kpsBasic, kpsXMP, kpsRecursive
, kpsIccProfile , kpsIptcErase
} PrintStructureOption;
enum PrintStructureOption { kpsNone, kpsBasic, kpsXMP, kpsRecursive, kpsIccProfile, kpsIptcErase };
/*!
@brief Abstract base class defining the interface for an image. This is
@ -53,7 +51,7 @@ namespace Exiv2 {
class EXIV2API Image {
public:
//! Image auto_ptr type
typedef std::unique_ptr<Image> UniquePtr;
using UniquePtr = std::unique_ptr<Image>;
//! @name Creators
//@{
@ -490,9 +488,9 @@ namespace Exiv2 {
}; // class Image
//! 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
typedef bool (*IsThisTypeFct)(BasicIo& iIo, bool advance);
using IsThisTypeFct = bool (*)(BasicIo& iIo, bool advance);
/*!
@brief Returns an Image instance of the specified type.

@ -25,11 +25,10 @@ extern "C" {
#endif
//! @brief typedef for prototype of handler function.
typedef int (*ini_handler)(void* user, const char* section,
const char* name, const char* value);
using ini_handler = int (*)(void* user, const char* section, const char* name, const char* value);
//! 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

@ -138,7 +138,7 @@ namespace Exiv2 {
}; // class Iptcdatum
//! 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.
@ -153,9 +153,9 @@ namespace Exiv2 {
class EXIV2API IptcData {
public:
//! IptcMetadata iterator type
typedef IptcMetadata::iterator iterator;
using iterator = IptcMetadata::iterator;
//! IptcMetadata const iterator type
typedef IptcMetadata::const_iterator const_iterator;
using const_iterator = IptcMetadata::const_iterator;
// Use the compiler generated constructors and assignment operator

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

@ -12,11 +12,11 @@
// namespace extensions
namespace Exiv2 {
// *****************************************************************************
// class definitions
// *****************************************************************************
// class definitions
//! Type of preview image.
typedef int PreviewId;
using PreviewId = int;
/*!
@brief Preview image properties.
@ -37,13 +37,14 @@ namespace Exiv2 {
};
//! 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.
*/
class EXIV2API PreviewImage {
friend class PreviewManager;
public:
//! @name Constructors
//@{

@ -198,7 +198,7 @@ namespace Exiv2 {
*/
static void unregisterNs();
//! 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.
*/
@ -221,7 +221,7 @@ namespace Exiv2 {
{
public:
//! Shortcut for an %XmpKey auto pointer.
typedef std::unique_ptr<XmpKey> UniquePtr;
using UniquePtr = std::unique_ptr<XmpKey>;
//! @name Creators
//@{

@ -12,53 +12,6 @@ namespace Exiv2
{
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.
*
@ -133,9 +86,9 @@ namespace Exiv2
template <template <typename data_type> class storage_type, typename data_type>
struct ConstSliceBase : SliceBase
{
typedef typename storage_type<data_type>::iterator iterator;
typedef typename storage_type<data_type>::const_iterator const_iterator;
typedef typename storage_type<data_type>::value_type value_type;
using iterator = typename storage_type<data_type>::iterator;
using const_iterator = typename storage_type<data_type>::const_iterator;
using value_type = typename storage_type<data_type>::value_type;
/*!
* Default constructor, requires begin to be smaller than end,
@ -220,9 +173,9 @@ namespace Exiv2
template <template <typename> class storage_type, typename data_type>
struct MutableSliceBase : public ConstSliceBase<storage_type, data_type>
{
typedef typename ConstSliceBase<storage_type, data_type>::iterator iterator;
typedef typename ConstSliceBase<storage_type, data_type>::const_iterator const_iterator;
typedef typename ConstSliceBase<storage_type, data_type>::value_type value_type;
using iterator = typename ConstSliceBase<storage_type, data_type>::iterator;
using const_iterator = typename ConstSliceBase<storage_type, data_type>::const_iterator;
using value_type = typename ConstSliceBase<storage_type, data_type>::value_type;
/*!
* 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_);
}
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
@ -328,11 +281,11 @@ namespace Exiv2
template <typename container>
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
@ -399,9 +352,9 @@ namespace Exiv2
template <typename storage_type>
struct PtrSliceStorage
{
typedef typename remove_cv<typename remove_pointer<storage_type>::type>::type value_type;
typedef value_type* iterator;
typedef const value_type* const_iterator;
using value_type = std::remove_cv_t<std::remove_pointer_t<storage_type> >;
using iterator = value_type*;
using const_iterator = const value_type*;
/*!
* Stores ptr and checks that it is not `NULL`. The slice's bounds
@ -500,11 +453,11 @@ namespace Exiv2
template <typename 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`
@ -558,11 +511,11 @@ namespace Exiv2
template <typename 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)
: Internal::ConstSliceBase<Internal::ContainerStorage, const container>(cont, begin, end)

@ -24,12 +24,12 @@ namespace Exiv2 {
// type definitions
//! 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.
typedef const TagInfo* (*TagListFct)();
using TagListFct = const TagInfo* (*)();
// *****************************************************************************
// class definitions
// *****************************************************************************
// class definitions
//! The details of an Exif group. Groups include IFDs and binary arrays.
struct EXIV2API GroupInfo {
@ -106,7 +106,7 @@ namespace Exiv2 {
class EXIV2API ExifKey : public Key {
public:
//! Shortcut for an %ExifKey auto pointer.
typedef std::unique_ptr<ExifKey> UniquePtr;
using UniquePtr = std::unique_ptr<ExifKey>;
//! @name Creators
//@{

@ -19,9 +19,11 @@
/*!
@brief Macro to make calls to member functions through a pointer more readable.
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))
// *****************************************************************************
// forward declarations
@ -31,35 +33,32 @@ struct tm;
// namespace extensions
namespace Exiv2 {
// *****************************************************************************
// type definitions
// *****************************************************************************
// type definitions
//! 1 byte unsigned integer type.
typedef uint8_t byte;
using byte = uint8_t;
//! 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.
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)
enum ByteOrder
{
enum ByteOrder {
invalidByteOrder,
littleEndian,
bigEndian,
};
//! Type to indicate write method used by TIFF parsers
enum WriteMethod
{
enum WriteMethod {
wmIntrusive,
wmNonIntrusive,
};
//! An identifier for each type of metadata
enum MetadataId
{
enum MetadataId {
mdNone = 0,
mdExif = 1,
mdIptc = 2,
@ -69,8 +68,7 @@ namespace Exiv2 {
};
//! An identifier for each mode of metadata support
enum AccessMode
{
enum AccessMode {
amNone = 0,
amRead = 1,
amWrite = 2,
@ -93,32 +91,32 @@ namespace Exiv2 {
undefined = 7, //!< Exif UNDEFINED type, an 8-bit byte that may contain anything.
signedShort = 8, //!< Exif SSHORT type, a 16-bit (2-byte) signed (twos-complement) integer.
signedLong = 9, //!< Exif SLONG type, a 32-bit (4-byte) signed (twos-complement) integer.
signedRational =10, //!< Exif SRATIONAL type, two SLONGs: numerator and denominator of a fraction.
tiffFloat =11, //!< TIFF FLOAT type, single precision (4-byte) IEEE format.
tiffDouble =12, //!< TIFF DOUBLE type, double precision (8-byte) IEEE format.
tiffIfd =13, //!< TIFF IFD type, 32-bit (4-byte) unsigned integer.
unsignedLongLong =16, //!< Exif LONG LONG type, 64-bit (8-byte) unsigned integer.
signedLongLong =17, //!< Exif LONG LONG type, 64-bit (8-byte) signed integer.
tiffIfd8 =18, //!< TIFF IFD type, 64-bit (8-byte) unsigned integer.
string =0x10000, //!< IPTC string type.
date =0x10001, //!< IPTC date type.
time =0x10002, //!< IPTC time type.
comment =0x10003, //!< %Exiv2 type for the Exif user comment.
directory =0x10004, //!< %Exiv2 type for a CIFF directory.
xmpText =0x10005, //!< XMP text type.
xmpAlt =0x10006, //!< XMP alternative type.
xmpBag =0x10007, //!< XMP bag type.
xmpSeq =0x10008, //!< XMP sequence type.
langAlt =0x10009, //!< XMP language alternative type.
invalidTypeId =0x1fffe, //!< Invalid type id.
lastTypeId =0x1ffff //!< Last type id.
signedRational = 10, //!< Exif SRATIONAL type, two SLONGs: numerator and denominator of a fraction.
tiffFloat = 11, //!< TIFF FLOAT type, single precision (4-byte) IEEE format.
tiffDouble = 12, //!< TIFF DOUBLE type, double precision (8-byte) IEEE format.
tiffIfd = 13, //!< TIFF IFD type, 32-bit (4-byte) unsigned integer.
unsignedLongLong = 16, //!< Exif LONG LONG type, 64-bit (8-byte) unsigned integer.
signedLongLong = 17, //!< Exif LONG LONG type, 64-bit (8-byte) signed integer.
tiffIfd8 = 18, //!< TIFF IFD type, 64-bit (8-byte) unsigned integer.
string = 0x10000, //!< IPTC string type.
date = 0x10001, //!< IPTC date type.
time = 0x10002, //!< IPTC time type.
comment = 0x10003, //!< %Exiv2 type for the Exif user comment.
directory = 0x10004, //!< %Exiv2 type for a CIFF directory.
xmpText = 0x10005, //!< XMP text type.
xmpAlt = 0x10006, //!< XMP alternative type.
xmpBag = 0x10007, //!< XMP bag type.
xmpSeq = 0x10008, //!< XMP sequence type.
langAlt = 0x10009, //!< XMP language alternative type.
invalidTypeId = 0x1fffe, //!< Invalid type id.
lastTypeId = 0x1ffff //!< Last type id.
};
//! Container for binary data
typedef std::vector<byte> Blob;
using Blob = std::vector<byte>;
// *****************************************************************************
// class definitions
// *****************************************************************************
// class definitions
//! Type information lookup functions. Implemented as a static class.
class EXIV2API TypeInfo {
@ -136,7 +134,6 @@ namespace Exiv2 {
static TypeId typeId(const std::string& typeName);
//! Return the size in bytes of one element of this type
static size_t typeSize(TypeId typeId);
};
/*!
@ -210,7 +207,7 @@ namespace Exiv2 {
//! Returns a (read-only) C-style string pointer.
const char* c_str(size_t offset = 0) const;
bool empty() const {return pData_.empty(); }
bool empty() const { return pData_.empty(); }
private:
std::vector<byte> pData_;
@ -232,15 +229,14 @@ namespace Exiv2 {
//! Overload of makeSlice for `const DataBuf`, returning an immutable Slice
EXIV2API Slice<const byte*> makeSlice(const DataBuf& buf, size_t begin, size_t end);
// *****************************************************************************
// free functions
// *****************************************************************************
// free functions
//! Read a 2 byte unsigned short value from the data buffer
EXIV2API uint16_t getUShort(const byte* buf, ByteOrder byteOrder);
//! Read a 2 byte unsigned short value from a Slice
template <typename T>
uint16_t getUShort(const Slice<T>& buf, ByteOrder byteOrder)
{
uint16_t getUShort(const Slice<T>& buf, ByteOrder byteOrder) {
if (byteOrder == littleEndian) {
return static_cast<byte>(buf.at(1)) << 8 | static_cast<byte>(buf.at(0));
}
@ -324,16 +320,14 @@ namespace Exiv2 {
stream, prefixed with the position in the buffer adjusted by
offset.
*/
EXIV2API void hexdump(std::ostream& os, const byte* buf, long len, long offset =0);
EXIV2API void hexdump(std::ostream& os, const byte* buf, long len, long offset = 0);
/*!
@brief Return true if str is a hex number starting with prefix followed
by size hex digits, false otherwise. If size is 0, any number of
digits is allowed and all are checked.
*/
EXIV2API bool isHex(const std::string& str,
size_t size =0,
const std::string& prefix ="");
EXIV2API bool isHex(const std::string& str, size_t size = 0, const std::string& prefix = "");
/*!
@brief Converts a string in the form "%Y:%m:%d %H:%M:%S", e.g.,
@ -414,8 +408,8 @@ namespace Exiv2 {
*/
EXIV2API Rational floatToRationalCast(float f);
// *****************************************************************************
// template and inline definitions
// *****************************************************************************
// template and inline definitions
/*!
@brief Find an element that matches \em key in the array \em src.
@ -461,22 +455,21 @@ namespace Exiv2 {
}
@endcode
*/
template<typename T, typename K, int N>
const T* find(T (&src)[N], const K& key)
{
template <typename T, typename K, int N>
const T* find(T (&src)[N], const K& key) {
const T* rc = std::find(src, src + N, key);
return rc == src + N ? nullptr : rc;
}
//! 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
#define EXV_COUNTOF(a) (sizeof(Exiv2::sizer(a)))
//! Utility function to convert the argument of any type to a string
template<typename T>
std::string toString(const T& arg)
{
template <typename T>
std::string toString(const T& arg) {
std::ostringstream os;
os << arg;
return os.str();
@ -493,9 +486,8 @@ namespace Exiv2 {
@return Returns the converted value and sets \em ok to \c true if the
conversion was successful or \c false if not.
*/
template<typename T>
T stringTo(const std::string& s, bool& ok)
{
template <typename T>
T stringTo(const std::string& s, bool& ok) {
std::istringstream is(s);
T tmp = T();
ok = bool(is >> tmp);
@ -512,7 +504,7 @@ namespace Exiv2 {
and returns \c true if it is "true", "t" or "1", and \c false if it is
"false", "f" or "0".
*/
template<>
template <>
bool stringTo<bool>(const std::string& s, bool& ok);
/*!
@ -524,8 +516,7 @@ namespace Exiv2 {
anyway...
*/
template <typename IntType>
IntType gcd(IntType n, IntType m)
{
IntType gcd(IntType n, IntType m) {
// Avoid repeated construction
IntType zero(0);
@ -545,12 +536,10 @@ namespace Exiv2 {
// As n and m are now positive, we can be sure that %= returns a
// positive value (the standard guarantees this for built-in types,
// and we require it of user-defined types).
for(;;) {
if(m == zero)
return n;
for (;;) {
if (m == zero) return n;
n %= m;
if(n == zero)
return m;
if (n == zero) return m;
m %= n;
}
}

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

@ -133,7 +133,7 @@ namespace Exiv2 {
}; // class Xmpdatum
//! 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
@ -151,9 +151,9 @@ namespace Exiv2 {
XmpData() = default;
//! XmpMetadata iterator type
typedef XmpMetadata::iterator iterator;
using iterator = XmpMetadata::iterator;
//! XmpMetadata const iterator type
typedef XmpMetadata::const_iterator const_iterator;
using const_iterator = XmpMetadata::const_iterator;
//! @name Manipulators
//@{
@ -305,7 +305,7 @@ namespace Exiv2 {
@param pLockData Pointer to the pLockData passed to initialize()
@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.

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

Loading…
Cancel
Save