16 #ifndef __IPSDKBASEPROCESSING_STATICRESULTSPLIT_H__ 17 #define __IPSDKBASEPROCESSING_STATICRESULTSPLIT_H__ 19 #include <IPSDKBaseProcessing/DataSplit/Static/BaseStaticSplit.h> 20 #include <boost/utility/enable_if.hpp> 21 #include <boost/type_traits/is_same.hpp> 22 #include <boost/make_shared.hpp> 31 template <
typename TProcessor,
typename TAttribute>
43 typedef typename boost::enable_if_c<boost::is_same<
typename TAttribute::StorageType,
44 boost::shared_ptr<typename TAttribute::ValueType> >::value,
98 template <
typename TProcessor,
typename TAttribute>
104 template <
typename TProcessor,
typename TAttribute>
105 StaticResultSplit<TProcessor, TAttribute>::~StaticResultSplit()
110 template <
typename TProcessor,
typename TAttribute>
117 template <
typename TProcessor,
typename TAttribute>
118 inline const std::string&
121 return TAttribute::getObjectNameStr();
124 template <
typename TProcessor,
typename TAttribute>
125 inline const std::string&
128 return TAttribute::getToolTipStr();
131 template <
typename TProcessor,
typename TAttribute>
137 if (pParameterColl.get() == 0 || pDefaultValue.get() == 0)
138 throwNullInputSharedPtr();
143 this->initBaseUnSplitted(elementsLocationInfo);
146 _pParameterColl = pParameterColl;
147 _pParameterColl->clear();
150 _pDefaultValue = pDefaultValue;
153 template <
typename TProcessor,
typename TAttribute>
159 "This attribute is not part of processor class");
161 return dynamic_cast<const TProcessor*
>(&processor) != 0;
164 template <
typename TProcessor,
typename TAttribute>
171 TProcessor& tProcessor =
static_cast<TProcessor&
>(processor);
174 ParameterType pCurResult(boost::make_shared<typename TAttribute::ValueType>(*_pDefaultValue));
177 (*_pParameterColl)[elementIdx] = pCurResult;
180 tProcessor.TProcessor::template set<TAttribute>(pCurResult);
191 #endif // __IPSDKBASEPROCESSING_STATICRESULTSPLIT_H__ Template class for results splitted data used for static data dispatch.
Definition: StaticResultSplit.h:32
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
eSplitStaticType getSplitStaticType() const
retrieve static split operation type
Definition: StaticResultSplit.h:112
ipUInt64 insertNonLocalized(const ElementsRange &elementsRange, const ipUInt64 dataMemorySize)
insertion of a new non localized information into collection
Static split operation type for results elements.
Definition: StaticSplitTypes.h:36
std::map< ipUInt32, ParameterType > ParameterColl
collection of elements associated to static split indexed by starting offset
Definition: StaticResultSplit.h:48
ParameterCollPtr _pParameterColl
collection of elements associated to static split
Definition: StaticResultSplit.h:89
void init(const ParameterCollPtr &pParameterColl, const ParameterType &pDefaultValue)
object initialization method
Definition: StaticResultSplit.h:133
const std::string & getAttributeToolTip() const
retrieve attribute tooltip associated to split operation
Definition: StaticResultSplit.h:126
Base class for processor class.
Definition: BaseProcessor.h:43
structure allowing to check whether a given attribute exists in attribute collection information ...
Definition: AttributeCollInfoCheckMacros.h:131
BoolResult processAttribute(BaseProcessor &processor, const ipUInt32 elementIdx, const core::BaseRequestOrigin &requestOrigin)
initialize processor attribute associate to split operation for a given element index ...
Definition: StaticResultSplit.h:166
eSplitStaticType
Enumerate describing static split operation type.
Definition: StaticSplitTypes.h:32
const std::string & getAttributeName() const
retrieve attribute name associated to split operation
Definition: StaticResultSplit.h:119
boost::enable_if_c< boost::is_same< typename TAttribute::StorageType, boost::shared_ptr< typename TAttribute::ValueType > >::value, typename TAttribute::StorageType >::type ParameterType
parameter type associated to object
Definition: StaticResultSplit.h:45
Base class for data static split objets used for data dispatch.
Definition: BaseStaticSplit.h:34
TProcessor ProcessorType
processor type associated to object
Definition: StaticResultSplit.h:37
Class allowing to store information about elements range (start offset and number of elements) ...
Definition: ElementsRange.h:27
Base class for request origin description.
Definition: BaseRequestOrigin.h:28
boost::shared_ptr< ParameterColl > ParameterCollPtr
shared pointer to collection of elements associated to static split
Definition: StaticResultSplit.h:51
bool checkProcessorType(const BaseProcessor &processor)
check processor type in derived class
Definition: StaticResultSplit.h:155
ParameterType _pDefaultValue
default value for split operation
Definition: StaticResultSplit.h:92
Class allowing to store elements location informations.
Definition: ElementsLocationInfo.h:32
TAttribute AttributeType
attribute type associated to object
Definition: StaticResultSplit.h:40
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53