Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members

mxcpcValueRange.cpp

00001 //           ///          //
00002 //          /////        ////
00003 //         /// XXX     XXX ///
00004 //        ///    XXX XXX    ///     $RCSfile: mxcpcValueRange.cpp,v $  
00005 //       ///       XXX       ///     $Revision: 1.2 $
00006 //      ///      XXX XXX      ///     $Date: 2005/08/09 13:57:26 $
00007 //     ////    XXX     XXX    ////     $Author: cvs-steve $
00008 //    ////                     ////
00009 //   ////  M  O  B  O  T  I  X  ////////////////////////////////////////////////
00010 //  //// Security Vision Systems ///////////////////////////////////////////////
00011 
00012 // Copyright (c) 2005, MOBOTIX AG.
00013 // This software is made available under the BSD licence. Please refer 
00014 // to the file LICENCE.TXT contained in this distribution for details.
00015 
00016 
00017 #include <mxcpcValueRange.h>
00018 
00019 #include <cstdio>
00020 
00021 
00022 
00023 mxcpcValueRange::mxcpcValueRange() {
00024 
00025   Min = Max = 0;
00026   
00027   IsFresh = true;
00028 }
00029 
00030 
00031 
00032 void mxcpcValueRange::feedValue(int value) {
00033 
00034   if(IsFresh) {
00035   
00036     Min = Max = value;
00037     IsFresh = false;
00038   }
00039   else {
00040     
00041     if(value < Min) Min = value;
00042     if(value > Max) Max = value;
00043   }
00044 }
00045 
00046 
00047 void mxcpcValueRange::dumpRange(void) {
00048 
00049   std::printf("[ %7d , %7d ]", Min, Max);
00050 }

Generated on Mon Aug 15 03:39:31 2005 for mxcpc by  doxygen 1.4.2-20050421