Commit 510c6541 authored by Rashad Kanavath's avatar Rashad Kanavath

COMP: dynamic cast for mingw compilation windows 7

parent 9b7fa6b0
......@@ -156,7 +156,8 @@ private:
if( rescaleType == "none" )
{
castIm = this->GetParameterImage<TImageType>("in");
// castIm = this->GetParameterImage<TImageType>("in");
castIm = dynamic_cast<TImageType*>(this->GetParameterImage("in"));
}
else
{
......
# This file contains the common build definitions and flags used by default when building all targets
if(WIN32)
if(MSVC)
# do not build shared lib under windows
set(BUILD_SHARED_LIBS OFF)
message(STATUS "Disabling build shared lib option on windows like OS.")
......
......@@ -69,7 +69,7 @@ set(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${JPEG_INCLUDE_DIRS}
${OGR_INCLUDE_DIRS})
if(WIN32)
if(MSVC)
set(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${OTB_SOURCE_DIR}/Utilities/otbmsinttypes )
endif()
......
......@@ -2,7 +2,7 @@
# Sources of non-templated classes.
file(GLOB OTBApplicationEngine_SRCS "*.cxx" )
if(WIN32)
if(MSVC)
set(CMAKE_C_FLAGS "/bigobj ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "/bigobj ${CMAKE_CXX_FLAGS}")
endif()
......
......@@ -31,7 +31,7 @@ namespace Wrapper
* itk::ProcessObject and a string describing the process.
*
*/
class ITK_EXPORT AddProcessToWatchEvent: public itk::EventObject
class ITK_ABI_EXPORT AddProcessToWatchEvent: public itk::EventObject
{
public:
......
......@@ -45,7 +45,7 @@ namespace Wrapper
* TODO
*
*/
class ITK_EXPORT Application: public itk::Object
class ITK_ABI_EXPORT Application: public itk::Object
{
public:
/** Standard class typedefs. */
......
......@@ -27,7 +27,7 @@ namespace Wrapper
{
template < class TApplication >
class ApplicationFactory : public itk::ObjectFactoryBase
class ITK_ABI_EXPORT ApplicationFactory : public itk::ObjectFactoryBase
{
public:
/** Standard class typedefs. */
......
......@@ -29,7 +29,7 @@ namespace Wrapper
* class doc attributes.
*/
class ITK_EXPORT ApplicationHtmlDocGenerator
class ITK_ABI_EXPORT ApplicationHtmlDocGenerator
{
public:
/** Standard class typedef */
......
......@@ -35,7 +35,7 @@ namespace Wrapper
* TODO
*
*/
class ITK_EXPORT ApplicationRegistry : public itk::Object
class ITK_ABI_EXPORT ApplicationRegistry : public itk::Object
{
public:
/** Standard class typedefs. */
......
......@@ -32,7 +32,7 @@ namespace Wrapper
* Represents an enumerated parameter.
* The different values of the enumeration can be associated with a parameter
*/
class ChoiceParameter
class ITK_ABI_EXPORT ChoiceParameter
: public Parameter
{
public:
......
......@@ -30,7 +30,7 @@ namespace Wrapper
* \brief This class represents a ComplexInputImage parameter
*/
class ITK_EXPORT ComplexInputImageParameter : public Parameter
class ITK_ABI_EXPORT ComplexInputImageParameter : public Parameter
{
public:
/** Standard class typedef */
......
......@@ -30,7 +30,7 @@ namespace Wrapper
* \brief This class represents a ComplexOutputImage parameter
*/
class ITK_EXPORT ComplexOutputImageParameter : public Parameter
class ITK_ABI_EXPORT ComplexOutputImageParameter : public Parameter
{
public:
/** Standard class typedef */
......
......@@ -31,7 +31,7 @@ namespace Wrapper
/** \class DirectoryParameter
* \brief This class represent a string parameter for the wrapper framework
*/
class DirectoryParameter
class ITK_ABI_EXPORT DirectoryParameter
: public Parameter
{
public:
......
......@@ -41,7 +41,7 @@ namespace Wrapper
* User has to set the application name, the binary path and a list of
* key/value couple.
*/
class DocExampleStructure :
class ITK_ABI_EXPORT DocExampleStructure :
public itk::Object
{
public:
......
......@@ -38,7 +38,7 @@ namespace Wrapper
*
*/
class ElevationParametersHandler
class ITK_ABI_EXPORT ElevationParametersHandler
{
public:
/**
......
......@@ -28,7 +28,7 @@ namespace Wrapper
/** \class EmptyParameter
* \brief This class represent an empty parameter for the wrapper framework (boolean value)
*/
class EmptyParameter
class ITK_ABI_EXPORT EmptyParameter
: public Parameter
{
public:
......
......@@ -32,7 +32,7 @@ namespace Wrapper
* \brief This class represents a list of InputFilename parameter
*/
class ITK_EXPORT InputFilenameListParameter : public Parameter
class ITK_ABI_EXPORT InputFilenameListParameter : public Parameter
{
public:
/** Standard class typedef */
......
......@@ -29,7 +29,7 @@ namespace Wrapper
/** \class InputFilenameParameter
* \brief This class represent a string parameter for the wrapper framework
*/
class InputFilenameParameter
class ITK_ABI_EXPORT InputFilenameParameter
: public Parameter
{
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
* \brief This class represents a list of InputImage parameter
*/
class ITK_EXPORT InputImageListParameter : public Parameter
class ITK_ABI_EXPORT InputImageListParameter : public Parameter
{
public:
/** Standard class typedef */
......
......@@ -30,7 +30,7 @@ namespace Wrapper
* \brief This class represents a InputImage parameter
*/
class ITK_EXPORT InputImageParameter : public Parameter
class ITK_ABI_EXPORT InputImageParameter : public Parameter
{
public:
/** Standard class typedef */
......
......@@ -12,7 +12,7 @@ namespace Wrapper
/** \class InputProcessXMLParameter
* \brief This class represent a xml filename parameter for the wrapper framework to load otb application.
*/
class InputProcessXMLParameter
class ITK_ABI_EXPORT InputProcessXMLParameter
: public Parameter
{
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
* \brief This class represents a list of VectorData parameter
*/
class ITK_EXPORT InputVectorDataListParameter : public Parameter
class ITK_ABI_EXPORT InputVectorDataListParameter : public Parameter
{
public:
/** Standard class typedef */
......
......@@ -29,7 +29,7 @@ namespace Wrapper
* \brief This class represents a InputVectorData parameter
*/
class ITK_EXPORT InputVectorDataParameter : public Parameter
class ITK_ABI_EXPORT InputVectorDataParameter : public Parameter
{
public:
/** Standard class typedef */
......
......@@ -33,7 +33,7 @@ namespace Wrapper
* method GetSelectedItems() allow the user to access to this method.
*
*/
class ListViewParameter
class ITK_ABI_EXPORT ListViewParameter
: public Parameter
{
public:
......
......@@ -43,7 +43,7 @@ enum
* This class allow creating a Group with several mapProjection
* parameters
*/
class MapProjectionParametersHandler
class ITK_ABI_EXPORT MapProjectionParametersHandler
{
public:
/**
......
......@@ -30,7 +30,7 @@ namespace Wrapper
* \brief This class represents a numerical parameter
*/
template <class T>
class ITK_EXPORT NumericalParameter : public Parameter
class ITK_ABI_EXPORT NumericalParameter : public Parameter
{
public:
/** Standard class typedef */
......
......@@ -29,7 +29,7 @@ namespace Wrapper
/** \class OutputFilenameParameter
* \brief This class represent a string parameter for the wrapper framework
*/
class OutputFilenameParameter
class ITK_ABI_EXPORT OutputFilenameParameter
: public Parameter
{
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
* \brief This class represents a OutputImage parameter
*/
class ITK_EXPORT OutputImageParameter : public Parameter
class ITK_ABI_EXPORT OutputImageParameter : public Parameter
{
public:
/** Standard class typedef */
......
......@@ -11,7 +11,7 @@ namespace Wrapper
/** \class OutputProcessXMLParameter
* \brief This class represent a xml filename parameter for the wrapper framework to save otb application.
*/
class OutputProcessXMLParameter
class ITK_ABI_EXPORT OutputProcessXMLParameter
: public Parameter
{
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
* \brief This class represents a OutputVectorData parameter
*/
class ITK_EXPORT OutputVectorDataParameter : public Parameter
class ITK_ABI_EXPORT OutputVectorDataParameter : public Parameter
{
public:
/** Standard class typedef */
......
......@@ -55,7 +55,7 @@ enum DefaultValueMode
* wrapper framework. It should be subclassed to represent different
* kinds of parameters
*/
class Parameter
class ITK_ABI_EXPORT Parameter
: public itk::Object
{
public:
......
......@@ -30,7 +30,7 @@ namespace Wrapper
/**
* \class Group
*/
class ITK_EXPORT ParameterGroup
class ITK_ABI_EXPORT ParameterGroup
: public Parameter
{
public:
......
......@@ -34,7 +34,7 @@ namespace Wrapper
* The constructor accepts a string key constructed as follow : parent.me.child.
* It implements some key manipulation as described in the code.
*/
class ITK_EXPORT ParameterKey
class ITK_ABI_EXPORT ParameterKey
{
public:
......
......@@ -28,7 +28,7 @@ namespace Wrapper
/** \class RAMParameter
* \brief This class represent a RAM parameter for the wrapper framework
*/
class RAMParameter : public Parameter
class ITK_ABI_EXPORT RAMParameter : public Parameter
{
public:
/** Standard class typedef */
......
......@@ -28,7 +28,7 @@ namespace Wrapper
/** \class StringParameter
* \brief This class represent a radius parameter for the wrapper framework
*/
class RadiusParameter
class ITK_ABI_EXPORT RadiusParameter
: public IntParameter
{
public:
......
......@@ -29,7 +29,7 @@ namespace Wrapper
/** \class StringListParameter
* \brief This class represent a list of string parameter for the wrapper framework
*/
class StringListParameter
class ITK_ABI_EXPORT StringListParameter
: public Parameter
{
public:
......
......@@ -29,7 +29,7 @@ namespace Wrapper
/** \class StringParameter
* \brief This class represent a string parameter for the wrapper framework
*/
class StringParameter
class ITK_ABI_EXPORT StringParameter
: public Parameter
{
public:
......
......@@ -15,7 +15,7 @@ endif()
if(OTB_USE_JPEG2000)
if(WIN32)
if(OTB_BUILD_SHARED_LIBS)
if(BUILD_SHARED_LIBS)
add_definitions(-DOPJ_EXPORTS)
else()
add_definitions(-DOPJ_STATIC)
......
......@@ -29,7 +29,7 @@ namespace otb
* This class is available only for testing purposes
*
*/
class ITK_EXPORT CurlHelperStub : public CurlHelperInterface
class ITK_ABI_EXPORT CurlHelperStub : public CurlHelperInterface
{
public:
/** Standard class typedefs. */
......
......@@ -39,7 +39,7 @@ namespace otb
* \class TestHelper
* \brief Helper class to perform the baseline comparisons during the tests
*/
class /*ITK_EXPORT*/ TestHelper : public itk::Object
class ITK_ABI_EXPORT TestHelper : public itk::Object
{
public:
......
......@@ -49,7 +49,7 @@ namespace Wrapper
* interpreted as a list.
*/
class ITK_EXPORT CommandLineLauncher : public itk::Object
class ITK_ABI_EXPORT CommandLineLauncher : public itk::Object
{
public:
/** Standard class typedefs. */
......
......@@ -36,7 +36,7 @@ namespace Wrapper
* After the attribut key, if the user give several values (expression without \"--\" separated by space), it will automacally be interpreted as a list.
*/
class ITK_EXPORT CommandLineParser : public itk::Object
class ITK_ABI_EXPORT CommandLineParser : public itk::Object
{
public:
/** Standard class typedefs. */
......
......@@ -22,7 +22,7 @@
namespace itk {
class QtProgressBar : public ::QProgressBar
class ITK_ABI_EXPORT QtProgressBar : public ::QProgressBar
{
Q_OBJECT
public:
......
......@@ -21,11 +21,12 @@
#include <QtGui>
#include <QString>
#include "itkMacro.h"
namespace otb
{
namespace Wrapper
{
class QtApplication : public QApplication
class ITK_ABI_EXPORT QtApplication : public QApplication
{
Q_OBJECT
......
......@@ -32,7 +32,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtFileSelectionWidget : public QWidget
class ITK_ABI_EXPORT QtFileSelectionWidget : public QWidget
{
Q_OBJECT
public:
......
......@@ -32,7 +32,7 @@ namespace otb
*
*/
class ITK_EXPORT QtLogOutput : public QObject, public itk::LogOutput
class ITK_ABI_EXPORT QtLogOutput : public QObject, public itk::LogOutput
{
Q_OBJECT
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtStringSelectionWidget : public QWidget
class ITK_ABI_EXPORT QtStringSelectionWidget : public QWidget
{
Q_OBJECT
......
......@@ -31,7 +31,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtWidgetChoiceParameter : public QtWidgetParameterBase
class ITK_ABI_EXPORT QtWidgetChoiceParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtWidgetComplexInputImageParameter : public QtWidgetParameterBase
class ITK_ABI_EXPORT QtWidgetComplexInputImageParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtWidgetComplexOutputImageParameter : public QtWidgetParameterBase
class ITK_ABI_EXPORT QtWidgetComplexOutputImageParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtWidgetDirectoryParameter : public QtWidgetParameterBase
class ITK_ABI_EXPORT QtWidgetDirectoryParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
......
......@@ -30,7 +30,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtWidgetEmptyParameter : public QtWidgetParameterBase
class ITK_ABI_EXPORT QtWidgetEmptyParameter : public QtWidgetParameterBase
{
Q_OBJECT
......
......@@ -30,7 +30,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtWidgetFloatParameter : public QtWidgetParameterBase
class ITK_ABI_EXPORT QtWidgetFloatParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtWidgetInputFilenameListParameter : public QtWidgetParameterBase
class ITK_ABI_EXPORT QtWidgetInputFilenameListParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtWidgetInputFilenameParameter : public QtWidgetParameterBase
class ITK_ABI_EXPORT QtWidgetInputFilenameParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtWidgetInputImageListParameter : public QtWidgetParameterBase
class ITK_ABI_EXPORT QtWidgetInputImageListParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtWidgetInputImageParameter : public QtWidgetParameterBase
class ITK_ABI_EXPORT QtWidgetInputImageParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtWidgetInputProcessXMLParameter : public QtWidgetParameterBase
class ITK_ABI_EXPORT QtWidgetInputProcessXMLParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtWidgetInputVectorDataListParameter : public QtWidgetParameterBase
class ITK_ABI_EXPORT QtWidgetInputVectorDataListParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtWidgetInputVectorDataParameter : public QtWidgetParameterBase
class ITK_ABI_EXPORT QtWidgetInputVectorDataParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtWidgetIntParameter : public QtWidgetParameterBase
class ITK_ABI_EXPORT QtWidgetIntParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
......
......@@ -31,7 +31,7 @@ namespace Wrapper
/** \class
* \brief
*/
class QtWidgetListViewParameter : public QtWidgetParameterBase
class ITK_ABI_EXPORT QtWidgetListViewParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
......
......@@ -28,7 +28,7 @@ namespace otb
namespace Wrapper
{
class AppliThread : public QThread