unique_id.h File Reference

Go to the source code of this file.

Defines

#define LIBTHROWABLE_CONCAT_3(x, y)   x ## y
#define LIBTHROWABLE_CONCAT_2(x, y)   LIBTHROWABLE_CONCAT_3(x, y)
#define LIBTHROWABLE_CONCAT_1(x, y)   LIBTHROWABLE_CONCAT_2(x, y)
#define LIBTHROWABLE_UNIQUE_ID   LIBTHROWABLE_CONCAT_1(libthrowableUniqueIdAtLine, __LINE__)
 File-unique identifier.


Define Documentation

#define LIBTHROWABLE_CONCAT_1 ( x,
 )     LIBTHROWABLE_CONCAT_2(x, y)

#define LIBTHROWABLE_CONCAT_2 ( x,
 )     LIBTHROWABLE_CONCAT_3(x, y)

#define LIBTHROWABLE_CONCAT_3 ( x,
 )     x ## y

#define LIBTHROWABLE_UNIQUE_ID   LIBTHROWABLE_CONCAT_1(libthrowableUniqueIdAtLine, __LINE__)

File-unique identifier.

This macro can be used as a file-unique identifier. A small example is shown below:

This will intialize an int called libthrowableUniqueIdAtLine<linenno> where linenno is the line at that point (i.e. if this were at line 40, the int would be called libthrowableUniqueIdAtLine40).

Warning:
This feature is used internally by libthrowable and is not intended for anything other than the LIBTHROWABLE_TRACE_* macros.
See also:
http://slack.net/~ant/cpp/unqiue_name.html
Since:
libthrowable-1.1.0


Generated on Wed Jan 9 18:07:17 2008 for libthrowable by  doxygen 1.5.4  Hosted on  SourceForge.net Logo