Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

version.h

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil c-basic-offset: 3 -*- */
00002 // vim:cindent:ts=3:sw=3:et:tw=80:sta:
00003 /*************************************************************** cppdom-cpr beg
00004  * 
00005  * cppdom was forked from the original xmlpp version 0.6 under the LGPL. This
00006  * new, branched xmlpp is under the same LGPL (of course) and is being
00007  * maintained by:
00008  *      Kevin Meinert   <subatomic@users.sourceforge.net>
00009  *      Allen Bierbaum  <allenb@users.sourceforge.net>
00010  *      Ben Scott       <nonchocoboy@users.sourceforge.net>
00011  *
00012  * -----------------------------------------------------------------
00013  *
00014  * xmlpp - an xml parser and validator written in C++
00015  * copyright (c) 2000-2001 Michael Fink
00016  *
00017  * This library is free software; you can redistribute it and/or
00018  * modify it under the terms of the GNU Library General Public
00019  * License as published by the Free Software Foundation; either
00020  * version 2 of the License, or (at your option) any later version.
00021  *
00022  * This library is distributed in the hope that it will be useful,
00023  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00024  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00025  * Library General Public License for more details.
00026  *
00027  * You should have received a copy of the GNU Library General Public
00028  * License along with this library; if not, write to the
00029  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00030  * Boston, MA 02111-1307, USA.
00031  *
00032  * -----------------------------------------------------------------
00033  * File:          $RCSfile: version.h,v $
00034  * Date modified: $Date: 2003/01/03 03:14:37 $
00035  * Version:       $Revision: 1.4 $
00036  * -----------------------------------------------------------------
00037  *
00038  ************************************************************ cppdom-cpr-end */
00039 #ifndef CPPDOM_VERSION_H
00040 #define CPPDOM_VERSION_H
00041 
00055 // The major/minor/patch version (up to 3 digits each).
00056 #define CPPDOM_VERSION_MAJOR     0
00057 #define CPPDOM_VERSION_MINOR     1
00058 #define CPPDOM_VERSION_PATCH     0
00059 
00060 //--------------------------------------------------------------------------
00061 //--------------------------------------------------------------------------
00062 // To update the version number, do not modify anything below this line!!!!
00063 //--------------------------------------------------------------------------
00064 //--------------------------------------------------------------------------
00065 
00066 
00067 //--------------------------------------------------------------------------
00068 // Define the helper macros
00069 //--------------------------------------------------------------------------
00070 
00071 // These helper macros are used build up the CPPDOM_VERSION macro
00072 #define CPPDOM_GLUE(a,b)         a ## b
00073 #define CPPDOM_XGLUE(a,b)        CPPDOM_GLUE(a,b)
00074 
00075 // These helpr macros are used to facilitate a zero left fill
00076 #define CPPDOM_ZEROFILL(a)       0 ## a
00077 #define CPPDOM_XZEROFILL(a)      CPPDOM_ZEROFILL(a)
00078 
00079 // Fix up the major version by doing a zero left fill
00080 #if CPPDOM_VERSION_MAJOR < 10
00081 #  define CPPDOM_VERSION_MAJOR_FILLED \
00082                CPPDOM_XZEROFILL(CPPDOM_XZEROFILL(CPPDOM_VERSION_MAJOR))
00083 #elif CPPDOM_VERSION_MAJOR < 100
00084 #  define CPPDOM_VERSION_MAJOR_FILLED CPPDOM_XZEROFILL(CPPDOM_VERSION_MAJOR)
00085 #else
00086 #  define CPPDOM_VERSION_MAJOR_FILLED CPPDOM_VERSION_MAJOR
00087 #endif
00088 
00089 // Fix up the minor version by doing a zero left fill
00090 #if CPPDOM_VERSION_MINOR < 10
00091 #  define CPPDOM_VERSION_MINOR_FILLED \
00092                CPPDOM_XZEROFILL(CPPDOM_XZEROFILL(CPPDOM_VERSION_MINOR))
00093 #elif CPPDOM_VERSION_MINOR < 100
00094 #  define CPPDOM_VERSION_MINOR_FILLED CPPDOM_XZEROFILL(CPPDOM_VERSION_MINOR)
00095 #else
00096 #  define CPPDOM_VERSION_MINOR_FILLED CPPDOM_VERSION_MINOR
00097 #endif
00098 
00099 // Fix up the patch version by doing a zero left fill
00100 #if CPPDOM_VERSION_PATCH < 10
00101 #  define CPPDOM_VERSION_PATCH_FILLED \
00102                CPPDOM_XZEROFILL(CPPDOM_XZEROFILL(CPPDOM_VERSION_PATCH))
00103 #elif CPPDOM_VERSION_PATCH < 100
00104 #  define CPPDOM_VERSION_PATCH_FILLED CPPDOM_XZEROFILL(CPPDOM_VERSION_PATCH)
00105 #else
00106 #  define CPPDOM_VERSION_PATCH_FILLED CPPDOM_VERSION_PATCH
00107 #endif
00108 
00109 //--------------------------------------------------------------------------
00110 // Define the CPPDOM_VERSION macro
00111 //--------------------------------------------------------------------------
00112 
00113 // Build up the CPPDOM_VERSION macro by pasting the individual parts together
00118 #define CPPDOM_VERSION \
00119    CPPDOM_XGLUE( \
00120       CPPDOM_XGLUE(CPPDOM_VERSION_MAJOR_FILLED, CPPDOM_VERSION_MINOR_FILLED), \
00121       CPPDOM_VERSION_PATCH_FILLED \
00122    )
00123 
00124 //--------------------------------------------------------------------------
00125 // Declare a version string constant that can be used at runtime.
00126 //--------------------------------------------------------------------------
00127 namespace cppdom
00128 {
00129    extern const char* version;
00130 }
00131 
00132 //--------------------------------------------------------------------------
00133 // Cleanup after ourselves and undef all internal macros.
00134 //--------------------------------------------------------------------------
00135 
00136 // Undef the all helper macros
00137 #undef CPPDOM_XGLUE
00138 #undef CPPDOM_GLUE
00139 #undef CPPDOM_ZEROFILL
00140 #undef CPPDOM_XZEROFILL
00141 
00142 // Undef the XXX_FILLED temporary macros
00143 #undef CPPDOM_VERSION_MAJOR_FILLED
00144 #undef CPPDOM_VERSION_MINOR_FILLED
00145 #undef CPPDOM_VERSION_PATCH_FILLED
00146 
00147 #endif

Generated on Thu Jan 2 21:29:17 2003 for cppdom by doxygen1.2.15