Check if all templates instances link correctly such that the bias_Config.h settings match those instances in BIASImageBase lib.
- Author
- woetzel
#include <Base/Image/Image.hh>
#include <typeinfo>
#include <string>
using namespace BIAS;
using namespace std;
#if defined(WIN32) && defined(_CPPRTTI) // real time type information available?
# define HAVE_TYPEID
#elif !defined(WIN32)
# define HAVE_TYPEID
#endif
template<class T>
void check(const string & s=string("") )
{
cout<<"Creating Image< ";
#ifdef HAVE_TYPEID
cout<<"rtti="<<typeid(T).name()<<" ";
#endif
cout<<" -- "<<s<<" >"<<endl;
}
int main(int argc, char *argv[])
{
cout<<"Checking available instances according to bias_config.h defines."<<endl;
#ifdef BUILD_IMAGE_UCHAR
check<unsigned char>("unsigned char");
#endif
#ifdef BUILD_IMAGE_FLOAT
check<float>("float");
#endif
#ifdef BUILD_IMAGE_INT
check<int>("int");
#endif
#ifdef BUILD_IMAGE_CHAR
check<char>("char");
#endif
#ifdef BUILD_IMAGE_SHORT
check<short>("short");
#endif
#ifdef BUILD_IMAGE_USHORT
check<unsigned short>("unsigned short");
#endif
#ifdef BUILD_IMAGE_UINT
check<unsigned int>("unsigned int");
#endif
#ifdef BUILD_IMAGE_DOUBLE
check<double>("double");
#endif
return 0;
}