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

VxGrBxNgb.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 VxGrBxNgb_h
00017 #define VxGrBxNgb_h
00018 
00019 #include "VxFrmFtorNgb.h"
00020 #include "HxString.h"
00021 #include "VxSegmentList.h"
00022 #include "VxValue.h"
00023 #include "VxGrBxBase.h"
00024 #include "VxFrmProcRep.h"
00025 
00026 class VxGrBxNgb : public VxGrBxBase {
00027 public:
00029                             VxGrBxNgb(const VxFrmFtorNgb* ftor, 
00030                                 VxGrBxBase* inputBox, 
00031                                 HxString name,
00032                                 VxSegmentList procList = VxSegmentList(), int sizeBuf=1);
00033                     
00035                             VxGrBxNgb(const VxGrBxNgb& rhs);
00036 
00038                             ~VxGrBxNgb();
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     VxGrBxNgb&              operator=(const VxGrBxNgb& rhs); // inline
00050 
00051     
00052 private:
00053     struct VxGrBxNgbRep{
00055         VxFrmFtorNgb            *ftor;
00056         VxGrBxBase              *inputBox;
00057             
00058         int                     refCount;
00059         VxGrBxNgbRep()          { refCount = 1;}        
00060     };
00061 
00062     VxGrBxNgbRep*       _data;
00063 };
00064 
00065 inline VxGrBxNgb& 
00066 VxGrBxNgb::operator=(const VxGrBxNgb& 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