Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

UpoRAVBO.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Trait_UpoRAVBO_h
00002 #define Impala_Core_Array_Trait_UpoRAVBO_h
00003 
00004 #include "Core/Array/Pattern/Categories.h"
00005 
00006 namespace Impala
00007 {
00008 namespace Core
00009 {
00010 namespace Array
00011 {
00012 namespace Trait
00013 {
00014 
00015 
00016 template<class DstArrayT, class SrcArrayT>
00017 class UpoRAVBO // replace all values but one
00018 {
00019 public:
00021     typedef Pattern::TagTransInVar TransVarianceCategory;
00022 
00024     typedef Pattern::TagCallValue CallCategory;
00025 
00026     typedef typename DstArrayT::ArithType DstArithT;
00027     typedef typename SrcArrayT::ArithType SrcArithT;
00028 
00029     UpoRAVBO(SrcArithT holdValue, SrcArithT newValue)
00030     {
00031         mHoldValue = holdValue;
00032         mNewValue = mNewValue;
00033     }
00034 
00035     DstArithT
00036     DoIt(const SrcArithT& x)
00037     {
00038         return x == mHoldValue ? x : mNewValue;
00039     }
00040 
00041 private:
00042     SrcArithT mHoldValue;
00043     SrcArithT mNewValue;
00044 };
00045 
00046 } // namespace Trait
00047 } // namespace Array
00048 } // namespace Core
00049 } // namespace Impala
00050 
00051 #endif

Generated on Fri Mar 19 09:31:02 2010 for ImpalaSrc by  doxygen 1.5.1