DefragPolicySelector.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef __DEFRAGPOLICYSELECTOR_H_113525CAC772E0__
00042 #define __DEFRAGPOLICYSELECTOR_H_113525CAC772E0__
00043
00044
00045 #include "mw/afp/CommonPolicySelector.h"
00046 #include "mw/afp/EmptyType.h"
00047
00048
00049
00050 #include "mw/afp/defrag/EventSeqHeaderSupport.h"
00051 #include "mw/afp/defrag/NoEventSeqHeaderSupport.h"
00052
00053 #include "mw/afp/defrag/NoFECHeaderSupport.h"
00054 #include "mw/afp/defrag/FECHeaderSupport.h"
00055
00056 #include "mw/afp/defrag/EventSeqDemux.h"
00057 #include "mw/afp/defrag/SingleEventDemux.h"
00058 #include "mw/afp/defrag/MultiSourceDemux.h"
00059
00060 #include "mw/afp/defrag/InOrderEventDataReconstructor.h"
00061 #include "mw/afp/defrag/OutOfOrderEventDataReconstructor.h"
00062 #include "mw/afp/defrag/FECEventDataReconstructor.h"
00063
00064 #include "mw/afp/defrag/NoDuplicateChecker.h"
00065 #include "mw/afp/defrag/DuplicateChecker.h"
00066
00067 #include "mw/afp/defrag/Statistics.h"
00068
00069
00070 namespace famouso {
00071 namespace mw {
00072 namespace afp {
00073
00081 typedef defrag::Statistics<EmptyType> DefragmentationStatistics;
00082
00083 IF_CONTAINS_SELECT_TYPE_(SubjectType);
00084 IF_CONTAINS_SELECT_TYPE_(DefragStatistics);
00085
00086
00087
00088
00089 template <typename Config>
00090 struct DefragPolicySelector {
00091 typedef DefragPolicySelector ThisType;
00092 typedef CommonPolicySelector<Config> Common;
00093
00095 typedef typename if_select_type<
00096 !Config::event_seq,
00097 typename if_select_type<
00098 Config::multiple_subjects,
00099 defrag::MultiSourceDemux<ThisType>,
00100 defrag::SingleEventDemux<ThisType>
00101 >::type,
00102 defrag::EventSeqDemux<ThisType>
00103 >::type DemuxPolicy;
00104
00106 typedef typename if_select_type<
00107 Config::duplicates,
00108 defrag::DuplicateChecker<ThisType>,
00109 defrag::NoDuplicateChecker<ThisType>
00110 >::type DuplicateCheckingPolicy;
00111
00113 typedef typename if_select_type<
00114 Config::FEC,
00115 defrag::FECEventDataReconstructor<ThisType>,
00116 typename if_select_type<
00117 Config::reordering,
00118 defrag::OutOfOrderEventDataReconstructor<ThisType>,
00119 defrag::InOrderEventDataReconstructor<ThisType>
00120 >::type
00121 >::type EventDataReconstructionPolicy;
00122
00124 typedef typename if_contains_select_type_SubjectType<
00125 Config,
00126 EmptyType
00127 >::type SubjectType;
00128
00130 typedef typename if_select_type<
00131 !Config::event_seq,
00132 typename if_select_type<
00133 Config::multiple_subjects,
00134 defrag::SubjectDemuxKey<ThisType, SubjectType>,
00135 defrag::EmptyDemuxKey<ThisType, SubjectType>
00136 >::type,
00137 typename if_select_type<
00138 Config::multiple_subjects,
00139 defrag::EseqSubjectDemuxKey<ThisType, SubjectType>,
00140 defrag::EseqDemuxKey<ThisType, SubjectType>
00141 >::type
00142 >::type EventDemuxKey;
00143
00144
00146 typedef typename if_select_type<
00147 Config::defrag_statistics,
00148 typename if_contains_select_type_DefragStatistics<
00149 Config,
00150 DefragmentationStatistics
00151 >::type,
00152 defrag::NoStatistics
00153 >::type DefragStatistics;
00154
00156 typedef typename Common::OverflowErrorChecking OverflowErrorChecking;
00157
00159 typedef typename Common::Allocator Allocator;
00160
00162 typedef typename Common::SizeProp SizeProp;
00163
00164 enum {
00166 concurrent_events = Config::concurrent_events,
00167
00169 old_event_ids = Config::old_event_ids,
00170
00172 max_fragments = Config::max_fragments
00173 };
00174 };
00175
00176 }
00177 }
00178 }
00179
00180
00181 #endif // __DEFRAGPOLICYSELECTOR_H_113525CAC772E0__
00182