From 8de844c3521d9ee54087927923b932e1016c5b90 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 16 Feb 2017 14:47:07 +0100 Subject: Remove using namespace astra; from headers --- include/astra/AlgorithmTypelist.h | 8 ++- include/astra/AstraObjectFactory.h | 4 +- include/astra/FanFlatBeamLineKernelProjector2D.inl | 2 - .../astra/FanFlatBeamStripKernelProjector2D.inl | 2 - include/astra/ProjectorTypelist.h | 25 +++---- include/astra/TypeList.h | 82 +++++++++++----------- 6 files changed, 57 insertions(+), 66 deletions(-) (limited to 'include') diff --git a/include/astra/AlgorithmTypelist.h b/include/astra/AlgorithmTypelist.h index 7779eaa..e37d242 100644 --- a/include/astra/AlgorithmTypelist.h +++ b/include/astra/AlgorithmTypelist.h @@ -55,13 +55,12 @@ along with the ASTRA Toolbox. If not, see . #include "CudaDartSmoothingAlgorithm3D.h" #include "CudaDataOperationAlgorithm.h" #include "CudaRoiSelectAlgorithm.h" +#include "CudaFilteredBackProjectionAlgorithm.h" -using namespace astra; +namespace astra { #ifdef ASTRA_CUDA -#include "CudaFilteredBackProjectionAlgorithm.h" - typedef TYPELIST_25( CArtAlgorithm, CSartAlgorithm, @@ -90,6 +89,7 @@ typedef TYPELIST_25( CCudaBackProjectionAlgorithm3D ) AlgorithmTypeList; + #else typedef TYPELIST_7( @@ -104,4 +104,6 @@ typedef TYPELIST_7( #endif +} + #endif diff --git a/include/astra/AstraObjectFactory.h b/include/astra/AstraObjectFactory.h index eb22862..746e27a 100644 --- a/include/astra/AstraObjectFactory.h +++ b/include/astra/AstraObjectFactory.h @@ -117,9 +117,9 @@ T* CAstraObjectFactory::findPlugin(std::string _sType) template T* CAstraObjectFactory::create(std::string _sType) { - functor_find finder = functor_find(); + typelist::functor_find finder = typelist::functor_find(); finder.tofind = _sType; - CreateObject::find(finder); + typelist::CreateObject::find(finder); if (finder.res == NULL) { finder.res = findPlugin(_sType); } diff --git a/include/astra/FanFlatBeamLineKernelProjector2D.inl b/include/astra/FanFlatBeamLineKernelProjector2D.inl index b95f030..d967844 100644 --- a/include/astra/FanFlatBeamLineKernelProjector2D.inl +++ b/include/astra/FanFlatBeamLineKernelProjector2D.inl @@ -26,8 +26,6 @@ along with the ASTRA Toolbox. If not, see . */ -using namespace astra; - template void CFanFlatBeamLineKernelProjector2D::project(Policy& p) { diff --git a/include/astra/FanFlatBeamStripKernelProjector2D.inl b/include/astra/FanFlatBeamStripKernelProjector2D.inl index eaf50e6..743b7c5 100644 --- a/include/astra/FanFlatBeamStripKernelProjector2D.inl +++ b/include/astra/FanFlatBeamStripKernelProjector2D.inl @@ -26,8 +26,6 @@ along with the ASTRA Toolbox. If not, see . */ -using namespace astra; - template void CFanFlatBeamStripKernelProjector2D::project(Policy& p) { diff --git a/include/astra/ProjectorTypelist.h b/include/astra/ProjectorTypelist.h index 2c6eaa2..ea6a568 100644 --- a/include/astra/ProjectorTypelist.h +++ b/include/astra/ProjectorTypelist.h @@ -31,9 +31,6 @@ along with the ASTRA Toolbox. If not, see . #include "Projector2D.h" #include "TypeList.h" -using namespace astra; -using namespace astra::typelist; - // Projector2D #include "Projector2D.h" #include "ParallelBeamLineKernelProjector2D.h" @@ -43,11 +40,12 @@ using namespace astra::typelist; #include "SparseMatrixProjector2D.h" #include "FanFlatBeamLineKernelProjector2D.h" #include "FanFlatBeamStripKernelProjector2D.h" - -#ifdef ASTRA_CUDA #include "CudaProjector2D.h" + namespace astra{ +#ifdef ASTRA_CUDA + typedef TYPELIST_8( CFanFlatBeamLineKernelProjector2D, CFanFlatBeamStripKernelProjector2D, @@ -58,13 +56,9 @@ namespace astra{ CSparseMatrixProjector2D, CCudaProjector2D) Projector2DTypeList; -} - - #else -namespace astra{ typedef TYPELIST_7( CFanFlatBeamLineKernelProjector2D, CFanFlatBeamStripKernelProjector2D, @@ -74,30 +68,29 @@ namespace astra{ CParallelBeamStripKernelProjector2D, CSparseMatrixProjector2D) Projector2DTypeList; -} #endif +} + // Projector3D #include "Projector3D.h" +#include "CudaProjector3D.h" + +namespace astra { #ifdef ASTRA_CUDA -#include "CudaProjector3D.h" -namespace astra { typedef TYPELIST_1( CCudaProjector3D ) Projector3DTypeList; -} - #else -namespace astra { typedef TYPELIST_0 Projector3DTypeList; -} #endif +} #endif diff --git a/include/astra/TypeList.h b/include/astra/TypeList.h index e7d7137..57f072b 100644 --- a/include/astra/TypeList.h +++ b/include/astra/TypeList.h @@ -59,95 +59,95 @@ namespace typelist { //----------------------------------------------------------------------------------------- // linearize typelist - #define TYPELIST_0 NullType - #define TYPELIST_1(T1) TypeList - #define TYPELIST_2(T1,T2) TypeList - #define TYPELIST_3(T1,T2,T3) TypeList - #define TYPELIST_4(T1,T2,T3,T4) TypeList - #define TYPELIST_5(T1,T2,T3,T4,T5) TypeList - #define TYPELIST_6(T1,T2,T3,T4,T5,T6) TypeList - #define TYPELIST_7(T1,T2,T3,T4,T5,T6,T7) TypeList - #define TYPELIST_8(T1,T2,T3,T4,T5,T6,T7,T8) TypeList - #define TYPELIST_9(T1,T2,T3,T4,T5,T6,T7,T8,T9) TypeList + #define TYPELIST_0 typelist::NullType + #define TYPELIST_1(T1) typelist::TypeList + #define TYPELIST_2(T1,T2) typelist::TypeList + #define TYPELIST_3(T1,T2,T3) typelist::TypeList + #define TYPELIST_4(T1,T2,T3,T4) typelist::TypeList + #define TYPELIST_5(T1,T2,T3,T4,T5) typelist::TypeList + #define TYPELIST_6(T1,T2,T3,T4,T5,T6) typelist::TypeList + #define TYPELIST_7(T1,T2,T3,T4,T5,T6,T7) typelist::TypeList + #define TYPELIST_8(T1,T2,T3,T4,T5,T6,T7,T8) typelist::TypeList + #define TYPELIST_9(T1,T2,T3,T4,T5,T6,T7,T8,T9) typelist::TypeList #define TYPELIST_10(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10) \ - TypeList + typelist::TypeList #define TYPELIST_11(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11) \ - TypeList + typelist::TypeList #define TYPELIST_12(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12) \ - TypeList + typelist::TypeList #define TYPELIST_13(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13) \ - TypeList + typelist::TypeList #define TYPELIST_14(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14) \ - TypeList + typelist::TypeList #define TYPELIST_15(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15) \ - TypeList + typelist::TypeList #define TYPELIST_16(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16) \ - TypeList + typelist::TypeList #define TYPELIST_17(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17) \ - TypeList + typelist::TypeList #define TYPELIST_18(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18) \ - TypeList + typelist::TypeList #define TYPELIST_19(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19) \ - TypeList + typelist::TypeList #define TYPELIST_20(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20) \ - TypeList + typelist::TypeList #define TYPELIST_21(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21) \ - TypeList + typelist::TypeList #define TYPELIST_22(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22) \ - TypeList + typelist::TypeList #define TYPELIST_23(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23) \ - TypeList + typelist::TypeList #define TYPELIST_24(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24) \ - TypeList + typelist::TypeList #define TYPELIST_25(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25) \ - TypeList + typelist::TypeList #define TYPELIST_26(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26) \ - TypeList + typelist::TypeList #define TYPELIST_27(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27) \ - TypeList + typelist::TypeList #define TYPELIST_28(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28) \ - TypeList + typelist::TypeList #define TYPELIST_29(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29) \ - TypeList + typelist::TypeList #define TYPELIST_30(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30) \ - TypeList + typelist::TypeList #define TYPELIST_31(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31) \ - TypeList + typelist::TypeList #define TYPELIST_32(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32) \ - TypeList + typelist::TypeList #define TYPELIST_33(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33) \ - TypeList + typelist::TypeList #define TYPELIST_34(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34) \ - TypeList + typelist::TypeList #define TYPELIST_35(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35) \ - TypeList + typelist::TypeList #define TYPELIST_36(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36) \ - TypeList + typelist::TypeList #define TYPELIST_37(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37) \ - TypeList + typelist::TypeList #define TYPELIST_38(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38) \ - TypeList + typelist::TypeList #define TYPELIST_39(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39) \ - TypeList + typelist::TypeList #define TYPELIST_40(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40) \ - TypeList + typelist::TypeList //----------------------------------------------------------------------------------------- -- cgit v1.2.3