Skip to content

Commit

Permalink
Re #6798 Fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
PranavBahuguna committed Aug 9, 2016
2 parents 4603636 + 825457a commit cdd9322
Show file tree
Hide file tree
Showing 961 changed files with 30,075 additions and 13,880 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ Desktop.ini
.tags
.tags_sorted_by_file

#Dynamically created files
Framework/Kernel/inc/MantidKernel/GitHubApiHelper.h
Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/LibHelper.h


Expand Down
26 changes: 7 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
###########################################################################
# CMake version check.
# Require >= 3.3 for Windows as previous versions contained a bug that
# prevented external data from working correctly. Other systems require
# 2.8.12 to avoid recompiling system packages
# Require CMake 3.5, required by ParaView 5.1.0
###########################################################################
if (CMAKE_HOST_WIN32)
cmake_minimum_required ( VERSION 3.3.0 )
else()
cmake_minimum_required ( VERSION 2.8.12 )
endif()

if(POLICY CMP0053)
#Simplify variable reference and escape sequence evaluation.
#Claims to dramatically improve CMake configure and generate time
#requires CMake 3.1 or later
cmake_policy(SET CMP0053 NEW)
endif()
cmake_minimum_required ( VERSION 3.5 )

# Define the project name.
project ( Mantid )
Expand Down Expand Up @@ -250,7 +237,7 @@ if ( ENABLE_CPACK )
message ( STATUS " CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}" )

# rhel requirements
set ( CPACK_RPM_PACKAGE_REQUIRES "qt4 >= 4.2,nexus >= 4.3.1,nexus-python >= 4.3.1,gsl,glibc,qwtplot3d-qt4,muParser,numpy,h5py >= 2.3.1,PyCifRW >= 4.2.1" )
set ( CPACK_RPM_PACKAGE_REQUIRES "qt4 >= 4.2,nexus >= 4.3.1,nexus-python >= 4.3.1,gsl,glibc,qwtplot3d-qt4,muParser,numpy,h5py >= 2.3.1,PyCifRW >= 4.2.1,tbb" )
# OCE
set( CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES},OCE-draw,OCE-foundation,OCE-modeling,OCE-ocaf,OCE-visualization")
set ( CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES},poco-crypto,poco-data,poco-mysql,poco-sqlite,poco-odbc,poco-util,poco-xml,poco-zip,poco-net,poco-netssl,poco-foundation,PyQt4,sip" )
Expand Down Expand Up @@ -303,12 +290,13 @@ if ( ENABLE_CPACK )
"ipython-notebook,"
"python-matplotlib,"
"python-scipy,"
"tbb,"
"libpocofoundation11,libpocoutil11,libpoconet11,libpoconetssl11,libpococrypto11,libpocoxml11,"
"python-pycifrw (>= 4.2.1)" )
set ( PERFTOOLS_DEB_PACKAGE "libgoogle-perftools4 (>= 1.7)" )
if( "${UNIX_CODENAME}" STREQUAL "wily" OR "${UNIX_CODENAME}" STREQUAL "xenial")
list ( APPEND DEPENDS_LIST ", libnexus0v5 (>= 4.3),libjsoncpp0v5 (>= 0.7.0),libqscintilla2-12v5, libmuparser2v5,libqwtplot3d-qt4-0v5")
list (REMOVE_ITEM DEPENDS_LIST "libjsoncpp0 (>=0.7.0)," "libqscintilla2-11," "libmuparser2," "libnexus0 (>= 4.3)," "libqwtplot3d-qt4-0,")
if( "${UNIX_CODENAME}" STREQUAL "xenial")
list ( APPEND DEPENDS_LIST ", libnexus0v5 (>= 4.3),libjsoncpp1,libqscintilla2-12v5, libmuparser2v5,libqwtplot3d-qt4-0v5,libgsl2,liboce-foundation10,liboce-modeling10")
list (REMOVE_ITEM DEPENDS_LIST "libjsoncpp0 (>=0.7.0)," "libqscintilla2-11," "libmuparser2," "libnexus0 (>= 4.3)," "libqwtplot3d-qt4-0," "libgsl0ldbl," "liboce-foundation8,liboce-modeling8,")
endif()
# parse list to string required for deb package
string ( REPLACE ";" "" CPACK_DEBIAN_PACKAGE_DEPENDS ${DEPENDS_LIST} )
Expand Down
18 changes: 8 additions & 10 deletions Framework/API/inc/MantidAPI/AlgorithmFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,7 @@ class MANTID_API_DLL AlgorithmFactoryImpl final
VersionMap m_vmap;
};

/// Forward declaration of a specialisation of SingletonHolder for
/// AlgorithmFactoryImpl (needed for dllexport/dllimport) and a typedef for it.
#ifdef _WIN32
// this breaks new namespace declaraion rules; need to find a better fix
template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<AlgorithmFactoryImpl>;
#endif /* _WIN32 */

typedef MANTID_API_DLL Mantid::Kernel::SingletonHolder<AlgorithmFactoryImpl>
AlgorithmFactory;
typedef Mantid::Kernel::SingletonHolder<AlgorithmFactoryImpl> AlgorithmFactory;

/// Convenient typedef for an UpdateNotification
typedef Mantid::Kernel::DynamicFactory<Algorithm>::UpdateNotification
Expand All @@ -188,4 +179,11 @@ typedef const Poco::AutoPtr<Mantid::Kernel::DynamicFactory<
} // namespace API
} // namespace Mantid

namespace Mantid {
namespace Kernel {
EXTERN_MANTID_API template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<Mantid::API::AlgorithmFactoryImpl>;
}
}

#endif /*MANTID_API_ALGORITHMFACTORY_H_*/
14 changes: 7 additions & 7 deletions Framework/API/inc/MantidAPI/AlgorithmManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,16 @@ class MANTID_API_DLL AlgorithmManagerImpl {
mutable std::mutex m_managedMutex;
};

/// Forward declaration of a specialisation of SingletonHolder for
/// AlgorithmManagerImpl (needed for dllexport/dllimport) and a typedef for it.
#ifdef _WIN32
// this breaks new namespace declaraion rules; need to find a better fix
template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<AlgorithmManagerImpl>;
#endif /* _WIN32 */
typedef Mantid::Kernel::SingletonHolder<AlgorithmManagerImpl> AlgorithmManager;

} // namespace API
} // Namespace Mantid

namespace Mantid {
namespace Kernel {
EXTERN_MANTID_API template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<Mantid::API::AlgorithmManagerImpl>;
}
}

#endif /* MANTID_API_ALGORITHMMANAGER_H_ */
17 changes: 8 additions & 9 deletions Framework/API/inc/MantidAPI/AnalysisDataService.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,7 @@ class DLLExport AnalysisDataServiceImpl final
std::string m_illegalChars;
};

/// Forward declaration of a specialisation of SingletonHolder for
/// AnalysisDataServiceImpl (needed for dllexport/dllimport) and a typedef for
/// it.
#ifdef _WIN32
// this breaks new namespace declaration rules; need to find a better fix
template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<AnalysisDataServiceImpl>;
#endif /* _WIN32 */
typedef MANTID_API_DLL Mantid::Kernel::SingletonHolder<AnalysisDataServiceImpl>
typedef Mantid::Kernel::SingletonHolder<AnalysisDataServiceImpl>
AnalysisDataService;

typedef Mantid::Kernel::DataService<Mantid::API::Workspace>::AddNotification
Expand Down Expand Up @@ -249,4 +241,11 @@ typedef const Poco::AutoPtr<AnalysisDataServiceImpl::GroupUpdatedNotification> &
} // Namespace API
} // Namespace Mantid

namespace Mantid {
namespace Kernel {
EXTERN_MANTID_API template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<Mantid::API::AnalysisDataServiceImpl>;
}
}

#endif /*MANTID_KERNEL_ANALYSISDATASERVICE_H_*/
17 changes: 8 additions & 9 deletions Framework/API/inc/MantidAPI/ArchiveSearchFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,16 @@ class MANTID_API_DLL ArchiveSearchFactoryImpl
~ArchiveSearchFactoryImpl() override = default;
};

/// Forward declaration of a specialisation of SingletonHolder for
/// AlgorithmFactoryImpl (needed for dllexport/dllimport) and a typedef for it.
#ifdef _WIN32
// this breaks new namespace declaraion rules; need to find a better fix
template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<ArchiveSearchFactoryImpl>;
#endif /* _WIN32 */

typedef MANTID_API_DLL Mantid::Kernel::SingletonHolder<ArchiveSearchFactoryImpl>
typedef Mantid::Kernel::SingletonHolder<ArchiveSearchFactoryImpl>
ArchiveSearchFactory;
}
}

namespace Mantid {
namespace Kernel {
EXTERN_MANTID_API template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<Mantid::API::ArchiveSearchFactoryImpl>;
}
}

#endif // MANTID_API_ARCHIVESEARCHFACTORY_H_
17 changes: 8 additions & 9 deletions Framework/API/inc/MantidAPI/CatalogFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,18 @@ class MANTID_API_DLL CatalogFactoryImpl
mutable std::map<std::string, boost::shared_ptr<ICatalog>> m_createdCatalogs;
};

/// Forward declaration of a specialisation of SingletonHolder for
/// CatalogFactoryImpl (needed for dllexport/dllimport) .
#ifdef _WIN32
// this breaks new namespace declaraion rules; need to find a better fix
template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<CatalogFactoryImpl>;
#endif /* _WIN32 */
/// The specialisation of the SingletonHolder class that holds the
/// CatalogFactory
typedef MANTID_API_DLL Mantid::Kernel::SingletonHolder<CatalogFactoryImpl>
CatalogFactory;
typedef Mantid::Kernel::SingletonHolder<CatalogFactoryImpl> CatalogFactory;

} // namespace API
} // namespace Mantid

namespace Mantid {
namespace Kernel {
EXTERN_MANTID_API template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<Mantid::API::CatalogFactoryImpl>;
}
}

#endif /*MANTID_API_CATALOGFACTORYIMPL_H_*/
13 changes: 8 additions & 5 deletions Framework/API/inc/MantidAPI/CatalogManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,14 @@ class MANTID_API_DLL CatalogManagerImpl {
std::map<CatalogSession_sptr, ICatalog_sptr> m_activeCatalogs;
};

#ifdef _WIN32
template class MANTID_API_DLL Kernel::SingletonHolder<CatalogManagerImpl>;
#endif
typedef MANTID_API_DLL Kernel::SingletonHolder<CatalogManagerImpl>
CatalogManager;
typedef Kernel::SingletonHolder<CatalogManagerImpl> CatalogManager;
}
}

namespace Mantid {
namespace Kernel {
EXTERN_MANTID_API template class MANTID_API_DLL
Kernel::SingletonHolder<Mantid::API::CatalogManagerImpl>;
}
}
#endif /* MANTID_ICAT_CATALOGMANAGERIMPL_H_ */
9 changes: 6 additions & 3 deletions Framework/API/inc/MantidAPI/Column.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,16 @@ class MANTID_API_DLL Column {

/**
* Fills a std vector with values from the column if the types are compatible.
* @param vec :: The vector to fill in.
* @param maxSize :: Set size to less than the full column.
*/
template <class T> void numeric_fill(std::vector<T> &vec) const {
vec.resize(size());
template <class T = double>
std::vector<T>
numeric_fill(size_t maxSize = std::numeric_limits<size_t>::max()) const {
std::vector<T> vec(std::min(size(), maxSize));
for (size_t i = 0; i < vec.size(); ++i) {
vec[i] = static_cast<T>(toDouble(i));
}
return vec;
}

protected:
Expand Down
17 changes: 8 additions & 9 deletions Framework/API/inc/MantidAPI/ColumnFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,16 @@ class MANTID_API_DLL ColumnFactoryImpl : public Kernel::DynamicFactory<Column> {
~ColumnFactoryImpl() override = default;
};

/// Forward declaration of a specialisation of SingletonHolder for
/// AlgorithmFactoryImpl (needed for dllexport/dllimport) and a typedef for it.
#ifdef _WIN32
// this breaks new namespace declaraion rules; need to find a better fix
template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<ColumnFactoryImpl>;
#endif /* _WIN32 */
typedef MANTID_API_DLL Mantid::Kernel::SingletonHolder<ColumnFactoryImpl>
ColumnFactory;
typedef Mantid::Kernel::SingletonHolder<ColumnFactoryImpl> ColumnFactory;

} // namespace API
} // namespace Mantid

namespace Mantid {
namespace Kernel {
EXTERN_MANTID_API template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<Mantid::API::ColumnFactoryImpl>;
}
}

#endif /*MANTID_API_COLUMNFACTORY_H_*/
16 changes: 8 additions & 8 deletions Framework/API/inc/MantidAPI/ConstraintFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,19 @@ class MANTID_API_DLL ConstraintFactoryImpl final
~ConstraintFactoryImpl() override = default;
};

/// Forward declaration of a specialisation of SingletonHolder for
/// AlgorithmFactoryImpl (needed for dllexport/dllimport) and a typedef for it.
#ifdef _WIN32
// this breaks new namespace declaraion rules; need to find a better fix
template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<ConstraintFactoryImpl>;
#endif /* _WIN32 */
typedef MANTID_API_DLL Mantid::Kernel::SingletonHolder<ConstraintFactoryImpl>
typedef Mantid::Kernel::SingletonHolder<ConstraintFactoryImpl>
ConstraintFactory;

} // namespace API
} // namespace Mantid

namespace Mantid {
namespace Kernel {
EXTERN_MANTID_API template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<Mantid::API::ConstraintFactoryImpl>;
}
}

/**
* Macro for declaring a new type of function to be used with the
* FunctionFactory
Expand Down
16 changes: 8 additions & 8 deletions Framework/API/inc/MantidAPI/CostFunctionFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ class MANTID_API_DLL CostFunctionFactoryImpl
CostFunctionFactoryImpl();
};

/// Forward declaration of a specialisation of SingletonHolder for
/// AlgorithmFactoryImpl (needed for dllexport/dllimport) and a typedef for it.
#ifdef _WIN32
// this breaks new namespace declaraion rules; need to find a better fix
template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<CostFunctionFactoryImpl>;
#endif /* _WIN32 */
typedef MANTID_API_DLL Mantid::Kernel::SingletonHolder<CostFunctionFactoryImpl>
typedef Mantid::Kernel::SingletonHolder<CostFunctionFactoryImpl>
CostFunctionFactory;

} // namespace API
} // namespace Mantid

namespace Mantid {
namespace Kernel {
EXTERN_MANTID_API template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<Mantid::API::CostFunctionFactoryImpl>;
}
}

#endif /*MANTID_API_COSTFUNCTIONFACTORY_H_*/
2 changes: 2 additions & 0 deletions Framework/API/inc/MantidAPI/DllConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@

#ifdef IN_MANTID_API
#define MANTID_API_DLL DLLExport
#define EXTERN_MANTID_API
#else
#define MANTID_API_DLL DLLImport
#define EXTERN_MANTID_API EXTERN_IMPORT
#endif /* IN_MANTID_API*/

#endif // MANTID_API_DLLCONFIG_H_
17 changes: 8 additions & 9 deletions Framework/API/inc/MantidAPI/DomainCreatorFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,17 @@ class MANTID_API_DLL DomainCreatorFactoryImpl
using Kernel::DynamicFactory<IDomainCreator>::createUnwrapped;
};

/// Forward declaration of a specialisation of SingletonHolder for
/// DomainCreatorFactoryImpl (needed for dllexport/dllimport) and a typedef for
/// it.
#ifdef _WIN32
// this breaks new namespace declaraion rules; need to find a better fix
template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<DomainCreatorFactoryImpl>;
#endif /* _WIN32 */
typedef MANTID_API_DLL Mantid::Kernel::SingletonHolder<DomainCreatorFactoryImpl>
typedef Mantid::Kernel::SingletonHolder<DomainCreatorFactoryImpl>
DomainCreatorFactory;

} // namespace API
} // namespace Mantid

namespace Mantid {
namespace Kernel {
EXTERN_MANTID_API template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<Mantid::API::DomainCreatorFactoryImpl>;
}
}

#endif /* MANTID_API_DOMAINCREATORFACTORY_H_ */
17 changes: 8 additions & 9 deletions Framework/API/inc/MantidAPI/FileFinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,14 @@ class MANTID_API_DLL FileFinderImpl {
int m_globOption;
};

/// Forward declaration of a specialisation of SingletonHolder for
/// AlgorithmFactoryImpl (needed for dllexport/dllimport) and a typedef for it.
#ifdef _WIN32
// this breaks new namespace declaraion rules; need to find a better fix
template class MANTID_API_DLL Mantid::Kernel::SingletonHolder<FileFinderImpl>;
#endif /* _WIN32 */

typedef MANTID_API_DLL Mantid::Kernel::SingletonHolder<FileFinderImpl>
FileFinder;
typedef Mantid::Kernel::SingletonHolder<FileFinderImpl> FileFinder;
}
}

namespace Mantid {
namespace Kernel {
EXTERN_MANTID_API template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<Mantid::API::FileFinderImpl>;
}
}

Expand Down

0 comments on commit cdd9322

Please sign in to comment.