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

VxGrBxUfo.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 VxGrBxUfo_h
00017 #define VxGrBxUfo_h
00018 
00019 #include "VxValue.h"
00020 #include "VxSegmentList.h"
00021 #include "HxString.h"
00022 #include "VxFrmFtorUfo.h"
00023 #include "VxGrBxBase.h"
00024 #include "VxFrmProcRep.h"
00025 
00026 class VxGrBxUfo : public VxGrBxBase {
00027 public:
00029                             VxGrBxUfo(const VxFrmFtorUfo* ftor, 
00030                                 VxGrBxBase* inputBox, HxString name, 
00031                                 VxSegmentList procList = VxSegmentList(), int sizeBuf = 1);
00032                     
00034                             VxGrBxUfo(const VxGrBxUfo& rhs);
00035 
00037                             ~VxGrBxUfo();
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     VxGrBxUfo&              operator=(const VxGrBxUfo& rhs); // inline
00049 
00050     
00051 private:
00052     struct VxGrBxUfoRep{
00054         VxFrmFtorUfo            *ftor;
00055         VxGrBxBase              *inputBox;
00056         
00057         int                     refCount;
00058         VxGrBxUfoRep()          { refCount = 1;}        
00059     };
00060 
00061     VxGrBxUfoRep*       _data;
00062 };
00063 
00064 inline VxGrBxUfo& 
00065 VxGrBxUfo::operator=(const VxGrBxUfo& rhs)
00066 {
00067     if (--_data->refCount<= 0 && _data != rhs._data)
00068     {
00069         std::cout << "Deleted graphbox" << std::endl;
00070         delete _data;
00071     }
00072     (_data=rhs._data)->refCount++; 
00073     return *this;
00074 }
00075 
00076 #endif

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