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

VxGrBxDfo.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 VxGrBxDfo_h
00017 #define VxGrBxDfo_h
00018 
00019 #include "VxFrmFtorDfo.h"
00020 #include "HxString.h"
00021 #include "VxSegmentList.h"
00022 #include "VxValue.h"
00023 #include "VxGrBxBase.h"
00024 #include "VxFrmProcRep.h"
00025 
00026 class VxGrBxDfo : public VxGrBxBase {
00027 public:
00029                             VxGrBxDfo(const VxFrmFtorDfo* ftor, 
00030                                 VxGrBxBase* inputBox, int deltaFr, HxString name, 
00031                                 VxSegmentList procList = VxSegmentList(), int sizeBuf=1);
00032                     
00034                             VxGrBxDfo(const VxGrBxDfo& rhs);
00035 
00037                             ~VxGrBxDfo();
00038 
00039     virtual VxValue         getOutput(int framenr);
00040     
00041     virtual HxString        outputClassName();
00042 
00043     virtual VxGrBxBase*     clone();
00044 
00045     virtual ostream&        put(ostream& os);
00046 
00048     VxGrBxDfo&              operator=(const VxGrBxDfo& rhs); // inline
00049 
00050     
00051 private:
00052     struct VxGrBxDfoRep{
00054         VxFrmFtorDfo            *ftor;
00055         VxGrBxBase              *inputBox;
00056         int                     deltaFr;
00057         
00058         int                     refCount;
00059         VxGrBxDfoRep()          { refCount = 1;}        
00060     };
00061 
00062     VxGrBxDfoRep*       _data;
00063 };
00064 
00065 inline VxGrBxDfo& 
00066 VxGrBxDfo::operator=(const VxGrBxDfo& rhs)
00067 {
00068     if (--_data->refCount<= 0 && _data != rhs._data)
00069     {
00070         std::cout << "Deleted graphbox" << std::endl;
00071         delete _data;
00072     }
00073     (_data=rhs._data)->refCount++; 
00074     return *this;
00075 }
00076 
00077 #endif

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