Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

VxGrBxBfo.h

00001 /*
00002  *
00003  *  Copyright (c) 2001, TNO TPD, The Netherlands.
00004  *  All rights reserved. No part of this software may be handed to or used by persons 
00005  *  or organisation outside Kenniscentrum Watergraafsmeer (UvA-ISIS, TNO TPD) without 
00006  *  the written permission of TNO TPD.
00007  *
00008  *  Author(s):
00009  *      Jan Baan (baan@tpd.tno.nl)
00010  *      Jeroen Vendrig
00011  *
00012  *
00013  * JV, 25Jun01: removed const from constructor, added =operator (CHECK!) to make push_back in VxPattern possible
00014  */
00015 
00016 #ifndef VxGrBxBfo_h
00017 #define VxGrBxBfo_h
00018 
00019 #include "VxFrmFtorBfo.h"
00020 #include "HxString.h"
00021 #include "VxSegmentList.h"
00022 #include "VxValue.h"
00023 #include "VxGrBxBase.h"
00024 #include "VxFrmProcRep.h"
00025 
00026 class VxGrBxBfo : public VxGrBxBase {
00027 public:
00029                             VxGrBxBfo(const VxFrmFtorBfo* ftor, 
00030                                 VxGrBxBase* inputBox1, VxGrBxBase* inputBox2, 
00031                                 HxString name, 
00032                                 VxSegmentList procList = VxSegmentList(), int sizeBuf=1);
00033                     
00035                             VxGrBxBfo(const VxGrBxBfo& rhs);
00036 
00038                             ~VxGrBxBfo();
00039 
00040     virtual VxValue         getOutput(int framenr);
00041     
00042     virtual HxString        outputClassName();
00043 
00044     virtual VxGrBxBase*     clone();
00045 
00046     virtual ostream&        put(ostream& os);
00047 
00049     VxGrBxBfo&              operator=(const VxGrBxBfo& rhs); // inline
00050 
00051     
00052 private:
00053     struct VxGrBxBfoRep{
00055         VxFrmFtorBfo            *ftor;
00056         VxGrBxBase              *inputBox1;
00057         VxGrBxBase              *inputBox2;
00058         int                     deltaFr;
00059         
00060         int                     refCount;
00061         VxGrBxBfoRep()          { refCount = 1;}        
00062     };
00063 
00064     VxGrBxBfoRep*       _data;
00065 };
00066 
00067 inline VxGrBxBfo& 
00068 VxGrBxBfo::operator=(const VxGrBxBfo& rhs)
00069 {
00070     if (--_data->refCount<= 0 && _data != rhs._data)
00071     {
00072         std::cout << "Deleted graphbox" << std::endl;
00073         delete _data;
00074     }
00075     (_data=rhs._data)->refCount++; 
00076     return *this;
00077 }
00078 
00079 #endif

Generated on Tue Feb 3 14:18:45 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001