PTdecode/CImg-1.3.0/examples/check_all_functions.cpp

Wed, 05 Aug 2009 17:10:56 +0100

author
Philip Pemberton <philpem@philpem.me.uk>
date
Wed, 05 Aug 2009 17:10:56 +0100
changeset 17
cf9d239ac1c9
parent 5
1204ebf9340d
permissions
-rwxr-xr-x

add README

philpem@5 1 /*
philpem@5 2 #
philpem@5 3 # File : check_all_functions.cpp
philpem@5 4 # ( C++ source file )
philpem@5 5 #
philpem@5 6 # Description : A simple source code that tries to instanciate all
philpem@5 7 # CImg functions for the most common template types.
philpem@5 8 # This is mainly for testing that CImg compiles correctly
philpem@5 9 # on various systems and with various compilers.
philpem@5 10 # This file is a part of the CImg Library project.
philpem@5 11 # ( http://cimg.sourceforge.net )
philpem@5 12 #
philpem@5 13 # Copyright : David Tschumperle
philpem@5 14 # ( http://www.greyc.ensicaen.fr/~dtschump/ )
philpem@5 15 #
philpem@5 16 # License : CeCILL v2.0
philpem@5 17 # ( http://www.cecill.info/licences/Licence_CeCILL_V2-en.html )
philpem@5 18 #
philpem@5 19 # This software is governed by the CeCILL license under French law and
philpem@5 20 # abiding by the rules of distribution of free software. You can use,
philpem@5 21 # modify and/ or redistribute the software under the terms of the CeCILL
philpem@5 22 # license as circulated by CEA, CNRS and INRIA at the following URL
philpem@5 23 # "http://www.cecill.info".
philpem@5 24 #
philpem@5 25 # As a counterpart to the access to the source code and rights to copy,
philpem@5 26 # modify and redistribute granted by the license, users are provided only
philpem@5 27 # with a limited warranty and the software's author, the holder of the
philpem@5 28 # economic rights, and the successive licensors have only limited
philpem@5 29 # liability.
philpem@5 30 #
philpem@5 31 # In this respect, the user's attention is drawn to the risks associated
philpem@5 32 # with loading, using, modifying and/or developing or reproducing the
philpem@5 33 # software by the user in light of its specific status of free software,
philpem@5 34 # that may mean that it is complicated to manipulate, and that also
philpem@5 35 # therefore means that it is reserved for developers and experienced
philpem@5 36 # professionals having in-depth computer knowledge. Users are therefore
philpem@5 37 # encouraged to load and test the software's suitability as regards their
philpem@5 38 # requirements in conditions enabling the security of their systems and/or
philpem@5 39 # data to be ensured and, more generally, to use and operate it in the
philpem@5 40 # same conditions as regards security.
philpem@5 41 #
philpem@5 42 # The fact that you are presently reading this means that you have had
philpem@5 43 # knowledge of the CeCILL license and that you accept its terms.
philpem@5 44 #
philpem@5 45 */
philpem@5 46 #ifdef cimg_plugin
philpem@5 47
philpem@5 48 // Load all existing CImg plugins
philpem@5 49 //---------------------------------
philpem@5 50 #include "../plugins/add_fileformat.h"
philpem@5 51 #include "../plugins/greycstoration.h"
philpem@5 52 #include "../plugins/integral_line.h"
philpem@5 53 #include "../plugins/jpeg_buffer.h"
philpem@5 54 #include "../plugins/loop_macros.h"
philpem@5 55 #include "../plugins/nlmeans.h"
philpem@5 56 #include "../plugins/noise_analysis.h"
philpem@5 57 #include "../plugins/skeleton.h"
philpem@5 58 #include "../plugins/draw_gradient.h"
philpem@5 59
philpem@5 60 #else
philpem@5 61 #include <cstdio>
philpem@5 62 #include <jpeglib.h>
philpem@5 63 #include <jerror.h>
philpem@5 64 #include <queue>
philpem@5 65 #define cimg_plugin "examples/check_all_functions.cpp"
philpem@5 66 #include "CImg.h"
philpem@5 67 using namespace cimg_library;
philpem@5 68
philpem@5 69 // Instanciate the CImg<T> class with the most common types.
philpem@5 70 //---------------------------------------------------------
philpem@5 71 template struct CImg<bool>;
philpem@5 72 template struct CImg<signed char>;
philpem@5 73 template struct CImg<unsigned char>;
philpem@5 74 template struct CImg<char>;
philpem@5 75 template struct CImg<unsigned short>;
philpem@5 76 template struct CImg<short>;
philpem@5 77 template struct CImg<unsigned int>;
philpem@5 78 template struct CImg<int>;
philpem@5 79 template struct CImg<unsigned long>;
philpem@5 80 template struct CImg<long>;
philpem@5 81 template struct CImg<float>;
philpem@5 82 template struct CImg<double>;
philpem@5 83
philpem@5 84 // Instanciate the CImgList<T> class with the most common types.
philpem@5 85 //--------------------------------------------------------------
philpem@5 86 template struct CImgList<bool>;
philpem@5 87 template struct CImgList<signed char>;
philpem@5 88 template struct CImgList<unsigned char>;
philpem@5 89 template struct CImgList<char>;
philpem@5 90 template struct CImgList<unsigned short>;
philpem@5 91 template struct CImgList<short>;
philpem@5 92 template struct CImgList<unsigned int>;
philpem@5 93 template struct CImgList<int>;
philpem@5 94 template struct CImgList<unsigned long>;
philpem@5 95 template struct CImgList<long>;
philpem@5 96 template struct CImgList<float>;
philpem@5 97 template struct CImgList<double>;
philpem@5 98
philpem@5 99 // Main procedure, does actually nothing...
philpem@5 100 //-----------------------------------------
philpem@5 101 int main() {
philpem@5 102 return 0;
philpem@5 103 }
philpem@5 104
philpem@5 105 #endif