#1279 Cleaned up doxygen warnings for doc and website.

v0.27.3
Robin Mills 8 years ago
parent 199820576d
commit 192a2a83cf

@ -343,7 +343,7 @@ TYPEDEF_HIDES_STRUCT = NO
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols. # corresponding to a cache size of 2^16 = 65536 symbols.
SYMBOL_CACHE_SIZE = 0 # SYMBOL_CACHE_SIZE = 0
# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
@ -709,7 +709,10 @@ EXCLUDE = ../samples/Jzon.h \
../src/getopt_win32.h \ ../src/getopt_win32.h \
../src/private.h \ ../src/private.h \
../src/timegm.h \ ../src/timegm.h \
../src/tzfile.h ../src/tzfile.h \
../src/fff.h \
../include/exiv2/exv_msvc.h \
../include/exiv2/exv_msvc-webready.h
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded # directories that are symbolic links (a Unix file system feature) are excluded
@ -1484,13 +1487,13 @@ XML_OUTPUT = xml
# which can be used by a validating XML parser to check the # which can be used by a validating XML parser to check the
# syntax of the XML files. # syntax of the XML files.
XML_SCHEMA = # XML_SCHEMA =
# The XML_DTD tag can be used to specify an XML DTD, # The XML_DTD tag can be used to specify an XML DTD,
# which can be used by a validating XML parser to check the # which can be used by a validating XML parser to check the
# syntax of the XML files. # syntax of the XML files.
XML_DTD = # XML_DTD =
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will # If the XML_PROGRAMLISTING tag is set to YES Doxygen will
# dump the program listings (including syntax highlighting # dump the program listings (including syntax highlighting
@ -1702,7 +1705,7 @@ DOT_NUM_THREADS = 0
# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
# directory containing the font. # directory containing the font.
DOT_FONTNAME = FreeSans DOT_FONTNAME = Arial
# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
# The default size is 10pt. # The default size is 10pt.
@ -1838,7 +1841,7 @@ MSCFILE_DIRS =
# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
DOT_GRAPH_MAX_NODES = 50 DOT_GRAPH_MAX_NODES = 100
# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
# graphs generated by dot. A depth value of 3 means that only nodes reachable # graphs generated by dot. A depth value of 3 means that only nodes reachable

@ -1071,6 +1071,7 @@ namespace Exiv2 {
// Pimpl idiom // Pimpl idiom
class Impl; class Impl;
//! Pointer to implementation
Impl* p_; Impl* p_;
}; // class RemoteIo }; // class RemoteIo

@ -84,7 +84,7 @@ namespace Exiv2 {
@brief Print out the structure of image file. @brief Print out the structure of image file.
@throw Error if reading of the file fails or the image data is @throw Error if reading of the file fails or the image data is
not valid (does not look like data of the specific image type). not valid (does not look like data of the specific image type).
@caution This function is not thread safe and intended for exiv2 -pS for debugging. @warning This function is not thread safe and intended for exiv2 -pS for debugging.
*/ */
void printStructure(std::ostream& out, PrintStructureOption option,int depth); void printStructure(std::ostream& out, PrintStructureOption option,int depth);
/*! /*!

@ -267,6 +267,7 @@ namespace Exiv2 {
EXIV2API const char* errMsg(int code); EXIV2API const char* errMsg(int code);
template<typename charT> template<typename charT>
//! BasicError constructor
BasicError<charT>::BasicError(int code) BasicError<charT>::BasicError(int code)
: code_(code), count_(0) : code_(code), count_(0)
{ {
@ -274,6 +275,7 @@ namespace Exiv2 {
} }
template<typename charT> template<typename A> template<typename charT> template<typename A>
//! BasicError constructor
BasicError<charT>::BasicError(int code, const A& arg1) BasicError<charT>::BasicError(int code, const A& arg1)
: code_(code), count_(1), arg1_(toBasicString<charT>(arg1)) : code_(code), count_(1), arg1_(toBasicString<charT>(arg1))
{ {
@ -281,6 +283,7 @@ namespace Exiv2 {
} }
template<typename charT> template<typename A, typename B> template<typename charT> template<typename A, typename B>
//! BasicError constructor
BasicError<charT>::BasicError(int code, const A& arg1, const B& arg2) BasicError<charT>::BasicError(int code, const A& arg1, const B& arg2)
: code_(code), count_(2), : code_(code), count_(2),
arg1_(toBasicString<charT>(arg1)), arg1_(toBasicString<charT>(arg1)),
@ -290,6 +293,7 @@ namespace Exiv2 {
} }
template<typename charT> template<typename A, typename B, typename C> template<typename charT> template<typename A, typename B, typename C>
//! BasicError constructor
BasicError<charT>::BasicError(int code, const A& arg1, const B& arg2, const C& arg3) BasicError<charT>::BasicError(int code, const A& arg1, const B& arg2, const C& arg3)
: code_(code), count_(3), : code_(code), count_(3),
arg1_(toBasicString<charT>(arg1)), arg1_(toBasicString<charT>(arg1)),

@ -151,7 +151,7 @@ namespace Exiv2 {
/*! /*!
@brief Get the path of file URL. @brief Get the path of file URL.
@param url The file URL in the format file:///<path> or file://<host>/<path>. @param url The file URL in the format file:///path or file://host/path
@return the path of file URL. @return the path of file URL.
*/ */
EXIV2API std::string pathOfFileUrl(const std::string& url); EXIV2API std::string pathOfFileUrl(const std::string& url);

@ -8,6 +8,13 @@
#include "datasets.hpp" #include "datasets.hpp"
namespace Exiv2 { namespace Exiv2 {
/*!
@brief execute an HTTP request
@param request - a Dictionary of headers to send to server
@param response - a Dictionary of response headers (dictionary is filled by the response)
@param errors - a String with an error
@return Server response 200 = OK, 404 = Not Found etc...
*/
EXIV2API int http(Exiv2::Dictionary& request,Exiv2::Dictionary& response,std::string& errors); EXIV2API int http(Exiv2::Dictionary& request,Exiv2::Dictionary& response,std::string& errors);
} }

@ -104,8 +104,8 @@ namespace Exiv2 {
@brief Print out the structure of image file. @brief Print out the structure of image file.
@throw Error if reading of the file fails or the image data is @throw Error if reading of the file fails or the image data is
not valid (does not look like data of the specific image type). not valid (does not look like data of the specific image type).
@caution This function is not thread safe and intended for exiv2 -pS for debugging. @warning This function is not thread safe and intended for exiv2 -pS for debugging.
@caution You may need to put the stream into binary mode (see src/actions.cpp) @warning You may need to put the stream into binary mode (see src/actions.cpp)
*/ */
virtual void printStructure(std::ostream& out, PrintStructureOption option =kpsNone, int depth=0); virtual void printStructure(std::ostream& out, PrintStructureOption option =kpsNone, int depth=0);
/*! /*!
@ -224,6 +224,7 @@ namespace Exiv2 {
@brief Set the image iccProfile. The new profile is not written @brief Set the image iccProfile. The new profile is not written
to the image until the writeMetadata() method is called. to the image until the writeMetadata() method is called.
@param iccProfile DataBuf containing profile (binary) @param iccProfile DataBuf containing profile (binary)
@param bTestValid - tests that iccProfile contains credible data
*/ */
virtual void setIccProfile(DataBuf& iccProfile,bool bTestValid=true); virtual void setIccProfile(DataBuf& iccProfile,bool bTestValid=true);
/*! /*!
@ -340,6 +341,7 @@ namespace Exiv2 {
@brief is the host platform littleEndian @brief is the host platform littleEndian
*/ */
bool isLittleEndianPlatform(); bool isLittleEndianPlatform();
bool isStringType(uint16_t type); bool isStringType(uint16_t type);
bool isShortType(uint16_t type); bool isShortType(uint16_t type);
bool isLongType(uint16_t type); bool isLongType(uint16_t type);
@ -466,6 +468,7 @@ namespace Exiv2 {
const NativePreviewList& nativePreviews() const; const NativePreviewList& nativePreviews() const;
//@} //@}
//! set type support for this image format
void setTypeSupported( void setTypeSupported(
int imageType, int imageType,
uint16_t supportedMetadata uint16_t supportedMetadata
@ -474,6 +477,7 @@ namespace Exiv2 {
supportedMetadata_ = supportedMetadata; supportedMetadata_ = supportedMetadata;
} }
//! set type support for this image format
int imageType() const { return imageType_; } int imageType() const { return imageType_; }
protected: protected:

@ -84,7 +84,7 @@ namespace Exiv2
@brief Print out the structure of image file. @brief Print out the structure of image file.
@throw Error if reading of the file fails or the image data is @throw Error if reading of the file fails or the image data is
not valid (does not look like data of the specific image type). not valid (does not look like data of the specific image type).
@caution This function is not thread safe and intended for exiv2 -pS for debugging. @warning This function is not thread safe and intended for exiv2 -pS for debugging.
*/ */
void printStructure(std::ostream& out, PrintStructureOption option,int depth); void printStructure(std::ostream& out, PrintStructureOption option,int depth);

@ -157,7 +157,7 @@ namespace Exiv2 {
@brief Print out the structure of image file. @brief Print out the structure of image file.
@throw Error if reading of the file fails or the image data is @throw Error if reading of the file fails or the image data is
not valid (does not look like data of the specific image type). not valid (does not look like data of the specific image type).
@caution This function is not thread safe and intended for exiv2 -pS for debugging. @warning This function is not thread safe and intended for exiv2 -pS for debugging.
*/ */
void printStructure(std::ostream& out, PrintStructureOption option,int depth); void printStructure(std::ostream& out, PrintStructureOption option,int depth);
//@} //@}

@ -91,7 +91,7 @@ namespace Exiv2
@brief Print out the structure of image file. @brief Print out the structure of image file.
@throw Error if reading of the file fails or the image data is @throw Error if reading of the file fails or the image data is
not valid (does not look like data of the specific image type). not valid (does not look like data of the specific image type).
@caution This function is not thread safe and intended for exiv2 -pS for debugging. @warning This function is not thread safe and intended for exiv2 -pS for debugging.
*/ */
void printStructure(std::ostream& out, PrintStructureOption option,int depth); void printStructure(std::ostream& out, PrintStructureOption option,int depth);
//@} //@}

@ -213,6 +213,8 @@ namespace Exiv2 {
@note This invalidates XMP keys generated in this namespace. @note This invalidates XMP keys generated in this namespace.
*/ */
static void unregisterNs(const std::string& ns); static void unregisterNs(const std::string& ns);
//! lock to be used while modifying properties
static Exiv2::RWLock rwLock_; static Exiv2::RWLock rwLock_;
/*! /*!

@ -143,45 +143,56 @@ namespace Exiv2 {
class RWLock class RWLock
{ {
public: public:
//! constructor (acquires the lock)
RWLock(const pthread_rwlockattr_t *attr = 0) RWLock(const pthread_rwlockattr_t *attr = 0)
{ {
pthread_rwlock_init(&rwlock_, attr); pthread_rwlock_init(&rwlock_, attr);
} }
//! constructor (releases lock)
~RWLock() ~RWLock()
{ {
pthread_rwlock_destroy(&rwlock_); pthread_rwlock_destroy(&rwlock_);
} }
//! acquire rw lock
void wrlock() void wrlock()
{ {
pthread_rwlock_wrlock(&rwlock_); pthread_rwlock_wrlock(&rwlock_);
} }
//! test to see if the rw lock can be acquired
bool trywrlock() bool trywrlock()
{ {
return 0 == pthread_rwlock_trywrlock(&rwlock_); return 0 == pthread_rwlock_trywrlock(&rwlock_);
} }
//! acquire rd lock
void rdlock() void rdlock()
{ {
pthread_rwlock_rdlock(&rwlock_); pthread_rwlock_rdlock(&rwlock_);
} }
//! test to see if the rd lock can be acquired
bool tryrdlock() bool tryrdlock()
{ {
return 0 == pthread_rwlock_tryrdlock(&rwlock_); return 0 == pthread_rwlock_tryrdlock(&rwlock_);
} }
//! release rw lock
void unlock() void unlock()
{ {
pthread_rwlock_unlock(&rwlock_); pthread_rwlock_unlock(&rwlock_);
} }
//! unlock rd lock
void rdunlock() { unlock(); } void rdunlock() { unlock(); }
//! unlock rw lock
void wrunlock() { unlock(); } void wrunlock() { unlock(); }
private: private:
//! the lock itself
pthread_rwlock_t rwlock_; pthread_rwlock_t rwlock_;
}; };
#endif #endif
@ -193,15 +204,18 @@ namespace Exiv2 {
class ScopedReadLock class ScopedReadLock
{ {
public: public:
//! constructor - locks the object
ScopedReadLock(RWLock &rwlock): ScopedReadLock(RWLock &rwlock):
rwlock_(rwlock) rwlock_(rwlock)
{ {
rwlock_.rdlock(); rwlock_.rdlock();
} }
//! destructor - unlocks the object used in constructor
~ScopedReadLock() { rwlock_.rdunlock(); } ~ScopedReadLock() { rwlock_.rdunlock(); }
private: private:
//! object locked by the constructor (and released by destructor)
RWLock &rwlock_; RWLock &rwlock_;
}; };
@ -212,15 +226,18 @@ namespace Exiv2 {
class ScopedWriteLock class ScopedWriteLock
{ {
public: public:
//! constructor - locks the object
ScopedWriteLock(RWLock &rwlock): ScopedWriteLock(RWLock &rwlock):
rwlock_(rwlock) rwlock_(rwlock)
{ {
rwlock_.wrlock(); rwlock_.wrlock();
} }
//! destructor - unlocks the object used in constructor
~ScopedWriteLock() { rwlock_.wrunlock(); } ~ScopedWriteLock() { rwlock_.wrunlock(); }
private: private:
//! object locked by the constructor (and released by destructor)
RWLock &rwlock_; RWLock &rwlock_;
}; };
} }

@ -88,7 +88,7 @@ namespace Exiv2 {
@brief Print out the structure of image file. @brief Print out the structure of image file.
@throw Error if reading of the file fails or the image data is @throw Error if reading of the file fails or the image data is
not valid (does not look like data of the specific image type). not valid (does not look like data of the specific image type).
@caution This function is not thread safe and intended for exiv2 -p{S|R} as a file debugging aid @warning This function is not thread safe and intended for exiv2 -p{S|R} as a file debugging aid
*/ */
virtual void printStructure(std::ostream& out, PrintStructureOption option,int depth=-1); virtual void printStructure(std::ostream& out, PrintStructureOption option,int depth=-1);

@ -30,8 +30,30 @@ namespace Exiv2
class UtilsVideo class UtilsVideo
{ {
public: public:
/*!
@brief compare a buffer and string
@param buf - binary buffer
@param str - nul terminated C string
@return true if match
*/
static bool compareTagValue(Exiv2::DataBuf &buf, const char *str); static bool compareTagValue(Exiv2::DataBuf &buf, const char *str);
/*!
@brief compare a buffer and an array of strings
@param buf - binary buffer
@param arr - array of C strings C
@param arraysize - length of arr
@return true if match
*/
static bool compareTagValue(Exiv2::DataBuf& buf,const char arr[][5],int32_t arraysize); static bool compareTagValue(Exiv2::DataBuf& buf,const char arr[][5],int32_t arraysize);
/*!
@brief compare a buffer and string
@param buf - binary buffer
@param str - C string (not guaranteed nul terminated)
@param size - number of bytes to compare
@return true if match
*/
static bool simpleBytesComparison(Exiv2::DataBuf& buf ,const char* str,int32_t size); static bool simpleBytesComparison(Exiv2::DataBuf& buf ,const char* str,int32_t size);
}; // class UtilsVideo }; // class UtilsVideo

@ -879,6 +879,7 @@ namespace Exiv2 {
XMP spec chapter B.4 (page 42) the xml:lang qualifier is to be compared case insensitive. XMP spec chapter B.4 (page 42) the xml:lang qualifier is to be compared case insensitive.
*/ */
struct LangAltValueComparator { struct LangAltValueComparator {
//! LangAltValueComparator comparison case insensitive function
bool operator() (const std::string& str1, const std::string& str2) const bool operator() (const std::string& str1, const std::string& str2) const
{ {
int result = str1.size() < str2.size() ? 1 int result = str1.size() < str2.size() ? 1

@ -37,6 +37,9 @@
// + standard includes // + standard includes
#include <vector> #include <vector>
/*!
@brief CPLUSPLUS11 is the value of macro --cplusplus for C++11
*/
#define CPLUSPLUS11 201103L #define CPLUSPLUS11 201103L
#if __cplusplus >= CPLUSPLUS11 #if __cplusplus >= CPLUSPLUS11
@ -57,9 +60,16 @@
@brief exv_grep_key_t is a simple string and the ignore flag @brief exv_grep_key_t is a simple string and the ignore flag
*/ */
struct Exiv2_grep_key_t { struct Exiv2_grep_key_t {
/*!
@brief Exiv2_grep_key_t constructor
*/
Exiv2_grep_key_t(std::string pattern,bool bIgnoreCase) Exiv2_grep_key_t(std::string pattern,bool bIgnoreCase)
:pattern_(pattern),bIgnoreCase_(bIgnoreCase) {} :pattern_(pattern),bIgnoreCase_(bIgnoreCase) {}
//! simple string to match
std::string pattern_; std::string pattern_;
//! should we ignore cast in the match?
bool bIgnoreCase_; bool bIgnoreCase_;
}; };
/*! /*!

@ -1483,7 +1483,7 @@ namespace Exiv2 {
bool isMalloced_; //!< Was the blocksMap_ allocated? bool isMalloced_; //!< Was the blocksMap_ allocated?
bool eof_; //!< EOF indicator bool eof_; //!< EOF indicator
Protocol protocol_; //!< the protocol of url Protocol protocol_; //!< the protocol of url
uint32_t totalRead_; uint32_t totalRead_; //!< bytes requested from host
// METHODS // METHODS
/*! /*!

@ -64,12 +64,15 @@ namespace Exiv2 {
std::ostream& printCsLensByFocalLengthAndMaxAperture(std::ostream& os, std::ostream& printCsLensByFocalLengthAndMaxAperture(std::ostream& os,
const Value& value, const Value& value,
const ExifData* metadata); const ExifData* metadata);
//! Special treatment pretty-print function for non-unique lens ids.
std::ostream& printCsLensByFocalLength(std::ostream& os, std::ostream& printCsLensByFocalLength(std::ostream& os,
const Value& value, const Value& value,
const ExifData* metadata); const ExifData* metadata);
//! Special treatment pretty-print function for non-unique lens ids.
std::ostream& printCsLensByFocalLengthTC(std::ostream& os, std::ostream& printCsLensByFocalLengthTC(std::ostream& os,
const Value& value, const Value& value,
const ExifData* metadata); const ExifData* metadata);
//! Special treatment pretty-print function for non-unique lens ids.
std::ostream& printCsLensFFFF(std::ostream& os, std::ostream& printCsLensFFFF(std::ostream& os,
const Value& value, const Value& value,
const ExifData* metadata); const ExifData* metadata);
@ -1592,6 +1595,7 @@ namespace Exiv2 {
return tagInfoPr_; return tagInfoPr_;
} }
//! canonTimeZoneCity - array of cityID/cityName used by Canon
extern const TagDetails canonTimeZoneCity[] = { extern const TagDetails canonTimeZoneCity[] = {
{ 0x0000, N_("n/a") }, { 0x0000, N_("n/a") },
{ 0x0001, N_("Chatham Islands") }, { 0x0001, N_("Chatham Islands") },
@ -1797,6 +1801,7 @@ namespace Exiv2 {
&& std::string(td.label_).find(ltfl.maxAperture_) != std::string::npos); && std::string(td.label_).find(ltfl.maxAperture_) != std::string::npos);
} }
//! extractLensFocalLength from metadata
void extractLensFocalLength(LensTypeAndFocalLengthAndMaxAperture& ltfl, void extractLensFocalLength(LensTypeAndFocalLengthAndMaxAperture& ltfl,
const ExifData* metadata) const ExifData* metadata)
{ {
@ -1815,6 +1820,7 @@ namespace Exiv2 {
} }
} }
//! convertFocalLength to a human readable string
void convertFocalLength(LensTypeAndFocalLengthAndMaxAperture& ltfl, void convertFocalLength(LensTypeAndFocalLengthAndMaxAperture& ltfl,
double divisor) double divisor)
{ {
@ -1828,6 +1834,7 @@ namespace Exiv2 {
ltfl.focalLength_ = oss.str(); ltfl.focalLength_ = oss.str();
} }
//! printCsLensByFocalLengthAndMaxAperture to human readable string
std::ostream& printCsLensByFocalLengthAndMaxAperture(std::ostream& os, std::ostream& printCsLensByFocalLengthAndMaxAperture(std::ostream& os,
const Value& value, const Value& value,
const ExifData* metadata) const ExifData* metadata)
@ -1864,6 +1871,7 @@ namespace Exiv2 {
return os << td->label_; return os << td->label_;
} }
//! printCsLensByFocalLength to human readable string
std::ostream& printCsLensByFocalLength(std::ostream& os, std::ostream& printCsLensByFocalLength(std::ostream& os,
const Value& value, const Value& value,
const ExifData* metadata) const ExifData* metadata)
@ -1885,6 +1893,7 @@ namespace Exiv2 {
return os << td->label_; return os << td->label_;
} }
//! printCsLensByFocalLengthTC to human readable string
std::ostream& printCsLensByFocalLengthTC(std::ostream& os, std::ostream& printCsLensByFocalLengthTC(std::ostream& os,
const Value& value, const Value& value,
const ExifData* metadata) const ExifData* metadata)
@ -1911,6 +1920,7 @@ namespace Exiv2 {
return os << td->label_; return os << td->label_;
} }
//! printCsLensType by searching the config file if necessary
std::ostream& CanonMakerNote::printCsLensType(std::ostream& os, std::ostream& CanonMakerNote::printCsLensType(std::ostream& os,
const Value& value, const Value& value,
const ExifData* metadata) const ExifData* metadata)

@ -256,7 +256,7 @@ public:
Keys keys_; //!< List of keys to match from the metadata Keys keys_; //!< List of keys to match from the metadata
std::string charset_; //!< Charset to use for UNICODE Exif user comment std::string charset_; //!< Charset to use for UNICODE Exif user comment
Exiv2::DataBuf stdinBuf; //! < DataBuf with the binary bytes from stdin Exiv2::DataBuf stdinBuf; //!< DataBuf with the binary bytes from stdin
private: private:
//! Pointer to the global Params object. //! Pointer to the global Params object.

@ -58,8 +58,8 @@ extern int strerror_r(int errnum, char *buf, size_t n);
#endif #endif
namespace Exiv2 { namespace Exiv2 {
const char* ENVARDEF[] = {"/exiv2.php", "40"}; const char* ENVARDEF[] = {"/exiv2.php", "40"}; //!< @brief default URL for http exiv2 handler and time-out
const char* ENVARKEY[] = {"EXIV2_HTTP_POST", "EXIV2_TIMEOUT"}; const char* ENVARKEY[] = {"EXIV2_HTTP_POST", "EXIV2_TIMEOUT"}; //!< @brief request keys for http exiv2 handler and time-out
// ***************************************************************************** // *****************************************************************************
// free functions // free functions
std::string getEnv(EnVar var) { std::string getEnv(EnVar var) {

@ -14,7 +14,6 @@
namespace Exiv2 { namespace Exiv2 {
/* inih -- simple .INI file parser /* inih -- simple .INI file parser
inih is released under the New BSD license (see LICENSE.txt). Go to the project inih is released under the New BSD license (see LICENSE.txt). Go to the project
@ -32,15 +31,15 @@ https://github.com/benhoyt/inih
extern "C" { extern "C" {
#endif #endif
//! @brief typedef for prototype of handler function.
/* Typedef for prototype of handler function. */
typedef int (*ini_handler)(void* user, const char* section, typedef int (*ini_handler)(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); typedef char* (*ini_reader)(char* str, int num, void* stream);
/* 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
(whitespace stripped), and comments starting with ';' (semicolon). Section (whitespace stripped), and comments starting with ';' (semicolon). Section
is "" if name=value pair parsed before any section heading. name:value is "" if name=value pair parsed before any section heading. name:value
pairs are also supported as a concession to Python's configparser. pairs are also supported as a concession to Python's configparser.
@ -49,37 +48,58 @@ typedef char* (*ini_reader)(char* str, int num, void* stream);
pointer as well as section, name, and value (data only valid for duration pointer as well as section, name, and value (data only valid for duration
of handler call). Handler should return nonzero on success, zero on error. of handler call). Handler should return nonzero on success, zero on error.
Returns 0 on success, line number of first error on parse error (doesn't @param filename path to file
@param handler user defined handler
@param user void pointer passed to user handler
@return 0 on success, line number of first error on parse error (doesn't
stop on first error), -1 on file open error, or -2 on memory allocation stop on first error), -1 on file open error, or -2 on memory allocation
error (only when INI_USE_STACK is zero). error (only when INI_USE_STACK is zero).
@return 0 on success
*/ */
int ini_parse(const char* filename, ini_handler handler, void* user); int ini_parse(const char* filename, ini_handler handler, void* user);
/* Same as ini_parse(), but takes a FILE* instead of filename. This doesn't /*! @brief Same as ini_parse(), but takes a FILE* instead of filename. This doesn't
close the file when it's finished -- the caller must do that. */ close the file when it's finished -- the caller must do that.
@param file open "C" file
@param handler user defined handler
@param user void pointer passed to user handler
*/
int ini_parse_file(FILE* file, ini_handler handler, void* user); int ini_parse_file(FILE* file, ini_handler handler, void* user);
/* Same as ini_parse(), but takes an ini_reader function pointer instead of /*! @brief Same as ini_parse(), but takes an ini_reader function pointer instead of
filename. Used for implementing custom or string-based I/O. */ filename. Used for implementing custom or string-based I/O.
@param reader magic
@param stream more magic
@param handler user defined handler
@param user void pointer passed to user handler
@return 0 on success
*/
int ini_parse_stream(ini_reader reader, void* stream, ini_handler handler, int ini_parse_stream(ini_reader reader, void* stream, ini_handler handler,
void* user); void* user);
/* Nonzero to allow multi-line value parsing, in the style of Python's /*! @brief Nonzero to allow multi-line value parsing, in the style of Python's
configparser. If allowed, ini_parse() will call the handler with the same configparser. If allowed, ini_parse() will call the handler with the same
name for each subsequent line parsed. */ name for each subsequent line parsed.
*/
#ifndef INI_ALLOW_MULTILINE #ifndef INI_ALLOW_MULTILINE
#define INI_ALLOW_MULTILINE 1 #define INI_ALLOW_MULTILINE 1
#endif #endif
/* Nonzero to allow a UTF-8 BOM sequence (0xEF 0xBB 0xBF) at the start of /*! @brief Nonzero to allow a UTF-8 BOM sequence (0xEF 0xBB 0xBF) at the start of
the file. See http://code.google.com/p/inih/issues/detail?id=21 */ the file. See http://code.google.com/p/inih/issues/detail?id=21
*/
#ifndef INI_ALLOW_BOM #ifndef INI_ALLOW_BOM
#define INI_ALLOW_BOM 1 #define INI_ALLOW_BOM 1
#endif #endif
/* Nonzero to allow inline comments (with valid inline comment characters /*! @brief Nonzero to allow inline comments (with valid inline comment characters
specified by INI_INLINE_COMMENT_PREFIXES). Set to 0 to turn off and match specified by INI_INLINE_COMMENT_PREFIXES). Set to 0 to turn off and match
Python 3.2+ configparser behaviour. */ Python 3.2+ configparser behaviour.
*/
#ifndef INI_ALLOW_INLINE_COMMENTS #ifndef INI_ALLOW_INLINE_COMMENTS
#define INI_ALLOW_INLINE_COMMENTS 1 #define INI_ALLOW_INLINE_COMMENTS 1
#endif #endif
@ -87,17 +107,17 @@ int ini_parse_stream(ini_reader reader, void* stream, ini_handler handler,
#define INI_INLINE_COMMENT_PREFIXES ";" #define INI_INLINE_COMMENT_PREFIXES ";"
#endif #endif
/* Nonzero to use stack, zero to use heap (malloc/free). */ //! @brief Nonzero to use stack, zero to use heap (malloc/free).
#ifndef INI_USE_STACK #ifndef INI_USE_STACK
#define INI_USE_STACK 1 #define INI_USE_STACK 1
#endif #endif
/* Stop parsing on first error (default is to keep parsing). */ //! @brief Stop parsing on first error (default is to keep parsing).
#ifndef INI_STOP_ON_FIRST_ERROR #ifndef INI_STOP_ON_FIRST_ERROR
#define INI_STOP_ON_FIRST_ERROR 0 #define INI_STOP_ON_FIRST_ERROR 0
#endif #endif
/* Maximum line length for any line in INI file. */ //! @brief Maximum line length for any line in INI file.
#ifndef INI_MAX_LINE #ifndef INI_MAX_LINE
#define INI_MAX_LINE 200 #define INI_MAX_LINE 200
#endif #endif
@ -109,43 +129,74 @@ int ini_parse_stream(ini_reader reader, void* stream, ini_handler handler,
#endif /* __INI_H__ */ #endif /* __INI_H__ */
// Read an INI file into easy-to-access name/value pairs. (Note that I've gone /*! @brief Read an INI file into easy-to-access name/value pairs. (Note that I've gone
// for simplicity here rather than speed, but it should be pretty decent.) for simplicity here rather than speed, but it should be pretty decent.)
*/
class EXIV2API INIReader class EXIV2API INIReader
{ {
public: public:
// Construct INIReader and parse given filename. See ini.h for more info /*! @brief Construct INIReader and parse given filename. See ini.h for more info
// about the parsing. about the parsing.
*/
INIReader(std::string filename); INIReader(std::string filename);
// Return the result of ini_parse(), i.e., 0 on success, line number of /*! @brief Return the result of ini_parse(), i.e., 0 on success, line number of
// first error on parse error, or -1 on file open error. first error on parse error, or -1 on file open error.
*/
int ParseError(); int ParseError();
// Get a string value from INI file, returning default_value if not found. /*! @brief Get a string value from INI file, returning default_value if not found.
@param section name of section
@param name name of key
@param default_value default if not found
@return value
*/
std::string Get(std::string section, std::string name, std::string Get(std::string section, std::string name,
std::string default_value); std::string default_value);
// Get an integer (long) value from INI file, returning default_value if /*! @brief Get an integer (long) value from INI file, returning default_value if
// not found or not a valid integer (decimal "1234", "-1234", or hex "0x4d2"). not found or not a valid integer (decimal "1234", "-1234", or hex "0x4d2").
@param section name of section
@param name name of key
@param default_value default if not found
@return value
*/
long GetInteger(std::string section, std::string name, long default_value); long GetInteger(std::string section, std::string name, long default_value);
// Get a real (floating point double) value from INI file, returning /*! @brief Get a real (floating point double) value from INI file, returning
// default_value if not found or not a valid floating point value default_value if not found or not a valid floating point value
// according to strtod(). according to strtod().
@param section name of section
@param name name of key
@param default_value default if not found
@return value
*/
double GetReal(std::string section, std::string name, double default_value); double GetReal(std::string section, std::string name, double default_value);
// Get a boolean value from INI file, returning default_value if not found or if /*! @brief Get a boolean value from INI file, returning default_value if not found or if
// not a valid true/false value. Valid true values are "true", "yes", "on", "1", not a valid true/false value. Valid true values are "true", "yes", "on", "1",
// and valid false values are "false", "no", "off", "0" (not case sensitive). and valid false values are "false", "no", "off", "0" (not case sensitive).
@param section name of section
@param name name of key
@param default_value default if not found
@return value
*/
bool GetBoolean(std::string section, std::string name, bool default_value); bool GetBoolean(std::string section, std::string name, bool default_value);
private: private:
int _error; int _error; //!< status
std::map<std::string, std::string> _values; std::map<std::string, std::string> _values; //!< values from file
static std::string MakeKey(std::string section, std::string name); static std::string MakeKey(std::string section, std::string name); //!< return key encoded from section/name
static int ValueHandler(void* user, const char* section, const char* name, static int ValueHandler(void* user, const char* section, const char* name,
const char* value); const char* value); //!< value handler
}; };
} // namespace Exiv2 } // namespace Exiv2

@ -559,7 +559,7 @@ namespace Exiv2 {
} }
} // JpegBase::readMetadata } // JpegBase::readMetadata
bool isBlank(std::string& s) static bool isBlank(std::string& s) //!< predicate
{ {
for ( std::size_t i = 0 ; i < s.length() ; i++ ) for ( std::size_t i = 0 ; i < s.length() ; i++ )
if ( s[i] != ' ' ) if ( s[i] != ' ' )

@ -1994,28 +1994,29 @@ namespace Exiv2 {
return result; return result;
} }
// http://stackoverflow.com/questions/1798112/removing-leading-and-trailing-spaces-from-a-string /*! http://stackoverflow.com/questions/1798112/removing-leading-and-trailing-spaces-from-a-string
// trim from left trim from left
*/
inline std::string& ltrim(std::string& s, const char* t = " \t\n\r\f\v") inline std::string& ltrim(std::string& s, const char* t = " \t\n\r\f\v")
{ {
s.erase(0, s.find_first_not_of(t)); s.erase(0, s.find_first_not_of(t));
return s; return s;
} }
// trim from right //! trim from right
inline std::string& rtrim(std::string& s, const char* t = " \t\n\r\f\v") inline std::string& rtrim(std::string& s, const char* t = " \t\n\r\f\v")
{ {
s.erase(s.find_last_not_of(t) + 1); s.erase(s.find_last_not_of(t) + 1);
return s; return s;
} }
// trim from left & right //! trim from left & right
inline std::string& trim(std::string& s, const char* t = " \t\n\r\f\v") inline std::string& trim(std::string& s, const char* t = " \t\n\r\f\v")
{ {
return ltrim(rtrim(s, t), t); return ltrim(rtrim(s, t), t);
} }
// http://www.sbin.org/doc/HOWTO/C++Programming-HOWTO-7.html //! http://www.sbin.org/doc/HOWTO/C++Programming-HOWTO-7.html
static void tokenize(const std::string& str, static void tokenize(const std::string& str,
std::vector<std::string>& tokens, std::vector<std::string>& tokens,
const std::string& delimiters = " ") const std::string& delimiters = " ")

@ -1207,6 +1207,7 @@ namespace Exiv2 {
return result; return result;
} }
//! resolveLens0x32c print lens in human format
std::ostream& resolveLens0x32c(std::ostream& os, const Value& value, std::ostream& resolveLens0x32c(std::ostream& os, const Value& value,
const ExifData* metadata) const ExifData* metadata)
{ {
@ -1231,6 +1232,7 @@ namespace Exiv2 {
// #1144 end // #1144 end
// #816 begin // #816 begin
//! resolveLens0x3ff print lens in human format
std::ostream& resolveLens0x3ff(std::ostream& os, const Value& value, std::ostream& resolveLens0x3ff(std::ostream& os, const Value& value,
const ExifData* metadata) const ExifData* metadata)
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
@ -1290,6 +1292,7 @@ namespace Exiv2 {
} }
// #1155 // #1155
//! resolveLens0x8ff print lens in human format
std::ostream& resolveLens0x8ff(std::ostream& os, const Value& value, std::ostream& resolveLens0x8ff(std::ostream& os, const Value& value,
const ExifData* metadata) const ExifData* metadata)
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
@ -1317,6 +1320,7 @@ namespace Exiv2 {
} }
// #1155 // #1155
//! resolveLens0x319 print lens in human format
std::ostream& resolveLens0x319(std::ostream& os, const Value& value, std::ostream& resolveLens0x319(std::ostream& os, const Value& value,
const ExifData* metadata) const ExifData* metadata)
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
@ -1351,6 +1355,7 @@ namespace Exiv2 {
return EXV_PRINT_COMBITAG_MULTI(pentaxLensType, 2, 1, 2)(os, value, metadata); return EXV_PRINT_COMBITAG_MULTI(pentaxLensType, 2, 1, 2)(os, value, metadata);
} }
//! resolveLensType print lens in human format
std::ostream& resolveLensType(std::ostream& os, const Value& value, std::ostream& resolveLensType(std::ostream& os, const Value& value,
const ExifData* metadata) const ExifData* metadata)
{ {

@ -2697,9 +2697,7 @@ namespace Exiv2 {
return fct(os, value, 0); return fct(os, value, 0);
} }
//! @cond IGNORE //! @brief Internal Pimpl structure with private members and data of class XmpKey.
//! Internal Pimpl structure with private members and data of class XmpKey.
struct XmpKey::Impl { struct XmpKey::Impl {
Impl() {} //!< Default constructor Impl() {} //!< Default constructor
Impl(const std::string& prefix, const std::string& property); //!< Constructor Impl(const std::string& prefix, const std::string& property); //!< Constructor
@ -2711,7 +2709,7 @@ namespace Exiv2 {
@throw Error if the key cannot be decomposed. @throw Error if the key cannot be decomposed.
*/ */
void decomposeKey(const std::string& key); void decomposeKey(const std::string& key); //!< Misterious magic
// DATA // DATA
static const char* familyName_; //!< "Xmp" static const char* familyName_; //!< "Xmp"
@ -2719,8 +2717,8 @@ namespace Exiv2 {
std::string prefix_; //!< Prefix std::string prefix_; //!< Prefix
std::string property_; //!< Property name std::string property_; //!< Property name
}; };
//! @endcond
//! @brief Constructor for Internal Pimpl structure XmpKey::Impl::Impl
XmpKey::Impl::Impl(const std::string& prefix, const std::string& property) XmpKey::Impl::Impl(const std::string& prefix, const std::string& property)
{ {
// Validate prefix // Validate prefix
@ -2808,6 +2806,7 @@ namespace Exiv2 {
return XmpProperties::ns(p_->prefix_); return XmpProperties::ns(p_->prefix_);
} }
//! @cond IGNORE
void XmpKey::Impl::decomposeKey(const std::string& key) void XmpKey::Impl::decomposeKey(const std::string& key)
{ {
// Get the family name, prefix and property name parts of the key // Get the family name, prefix and property name parts of the key

@ -108,7 +108,7 @@ html: news
@bin/download.sh @bin/download.sh
@bin/gen.py master/*.in @bin/gen.py master/*.in
@echo "Moving files to html/ ..." @echo "Moving files to html/ ..."
-@mv -f master/*.html master/*.php html/ -@mv -f master/*.html html/
news: var/__whatsnew-latest__ var/__whatsnew-table__ html/rss.xml news: var/__whatsnew-latest__ var/__whatsnew-table__ html/rss.xml

@ -1487,13 +1487,13 @@ XML_OUTPUT = xml
# which can be used by a validating XML parser to check the # which can be used by a validating XML parser to check the
# syntax of the XML files. # syntax of the XML files.
XML_SCHEMA = # XML_SCHEMA =
# The XML_DTD tag can be used to specify an XML DTD, # The XML_DTD tag can be used to specify an XML DTD,
# which can be used by a validating XML parser to check the # which can be used by a validating XML parser to check the
# syntax of the XML files. # syntax of the XML files.
XML_DTD = # XML_DTD =
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will # If the XML_PROGRAMLISTING tag is set to YES Doxygen will
# dump the program listings (including syntax highlighting # dump the program listings (including syntax highlighting

Loading…
Cancel
Save