Added more documentation

v0.27.3
Andreas Huggel 22 years ago
parent 9a4213b28d
commit c2f61538d8

@ -20,14 +20,13 @@
*/ */
/*! /*!
@file rcsid.hpp @file rcsid.hpp
@brief Define an RCS id string in every file that includes rcsid.hpp. @brief Define an RCS id string in every object file compiled from a source
file that includes rcsid.hpp.
This hack has the following purposes: This is a simplified version of the ACE_RCSID macro that is used in the
1. To define the RCS id string variable in the local namespace, so <a href="http://www.cs.wustl.edu/~schmidt/ACE.html">ACE(TM)</a> distribution.
that there won't be any duplicate extern symbols at link time.
2. To avoid warnings of the type "variable declared and never used".
@version $Name: $ $Revision: 1.2 $ @version $Name: $ $Revision: 1.3 $
@author Andreas Huggel (ahu) @author Andreas Huggel (ahu)
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a> <a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
@date 02-Feb-04, ahu: created @date 02-Feb-04, ahu: created
@ -37,21 +36,25 @@
#if !defined (EXIV2_RCSID) #if !defined (EXIV2_RCSID)
/*! /*!
@brief Macro to store version information in each object file. @brief Macro to store version information in each object file.
Include the following two lines at the beginning of each *.cpp file.
See the ident(1) manual pages for more information. Use this macro by including the following two lines at the beginning of
each *.cpp file. See the ident(1) manual pages for more information.
@code @code
#include "rcsid.hpp" #include "rcsid.hpp"
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.2 $ $RCSfile: rcsid.hpp,v $") EXIV2_RCSID("@(#) $Name: $ $Revision: 1.3 $ $RCSfile: rcsid.hpp,v $")
@endcode @endcode
The macro hack itself has the following purposes:
-# To define the RCS id string variable in the local namespace, so
that there won't be any duplicate extern symbols at link time.
-# To avoid warnings of the type "variable declared and never used".
*/ */
#define EXIV2_RCSID(id) \ #define EXIV2_RCSID(id) \
namespace { \ namespace { \
inline const char* getRcsId(const char*) \ inline const char* getRcsId(const char*) { return id ; } \
{ \
return id ; \
} \
const char* rcsId = getRcsId(rcsId); \ const char* rcsId = getRcsId(rcsId); \
} }

Loading…
Cancel
Save