# gdcmConstCharWrapper.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program: GDCM (Grassroots DICOM). A DICOM library
    00004   Module:  $URL$
    00005
    00006   Copyright (c) 2006-2010 Mathieu Malaterre
    00007   All rights reserved.
    00008   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
    00009
    00010      This software is distributed WITHOUT ANY WARRANTY; without even
    00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00012      PURPOSE.  See the above copyright notice for more information.
    00013
    00014 =========================================================================*/
    00015 #ifndef GDCMCONSTCHARWRAPPER_H
    00016 #define GDCMCONSTCHARWRAPPER_H
    00017
    00018 namespace gdcm
    00019 {
    00020
    00021 #error
    00022
    00023 /*
    00024  * This class is a pure hack. Its only goal is to work around a bad bug in :
    00025  *  $ swig -version
    00026  *  SWIG Version 1.3.31
    00027  *
    00028  *  See
    00029  * - http://sourceforge.net/mailarchive/forum.php?thread_name=bf0c3b3f0802290552y5163989t76572b80a044ce28%40mail.gmail.com&forum_name=swig-user
    00030  *
    00031  *  As a side note there is also a problem with const reference to enum type:
    00032  * - http://sourceforge.net/mailarchive/forum.php?thread_name=bf0c3b3f0802290552y5163989t76572b80a044ce28%40mail.gmail.com&forum_name=swig-user
    00033  *
    00034  *   And to keep a track of isse with swig here is the last one:
    00035  *
    00036  * -  http://sourceforge.net/mailarchive/forum.php?thread_name=bf0c3b3f0802290552y5163989t76572b80a044ce28%40mail.gmail.com&forum_name=swig-user
    00037  */
    00038
    00039
    00043 class ConstCharWrapper
    00044 {
    00045 public:
    00046   ConstCharWrapper(const char *i=0):Internal(i) {}
    00047   operator const char * () const { return Internal; }
    00048 private:
    00049   const char *Internal;
    00050 };
    00051
    00052 } // end namespace gdcm
    00053
    00054 #endif //GDCMCONSTCHARWRAPPER_H