VR-Forces 4.0.4 Class Documentation
include/vrvUtil/DtSignalConnectionManager.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtSignalHolderBase.h,v $ $Revision: 1.11 $ $State: Exp $
00007 ******************************************************************************/
00008 
00012 
00013 #pragma once
00014 
00015 #include <vrvUtil/vrvUtil.h>
00016 #include <vrvUtil/signalslib.h>
00017 #include <boost/signals/connection.hpp>
00018 #include <vector>
00019 
00020 namespace makVrv
00021 {
00026    class DT_DLL_VRVUTIL DtSignalConnectionManager
00027    {
00028    public:
00029 
00031       DtSignalConnectionManager();
00032 
00034       virtual ~DtSignalConnectionManager();
00035 
00037       void manageConnection(const boost::signalslib::connection& conn);
00038 
00040       inline DtSignalConnectionManager& operator+=(
00041          const boost::signalslib::connection& conn)
00042       {
00043          myConnections.push_back(conn);
00044          return *this;
00045       }
00046 
00048       int numberOfConnections() const;
00049 
00051       void disconnectSignals();
00052 
00055       bool blockConnections(bool blocked);
00056 
00060       bool blockConnection(int index, bool blocked );
00061 
00063       bool connectionsBlocked() const;
00064 
00066       bool connectionBlocked(int index) const;
00067 
00068    protected:
00070       typedef std::vector<boost::signalslib::connection> Connections;
00071 
00073       Connections myConnections;
00074 
00075       bool myConnectionsBlocked;
00076       bool myIndiviualConnectionedBlocked;
00077 
00078    private:
00079 
00081       DtSignalConnectionManager& operator=(DtSignalConnectionManager asn);
00082 
00084       DtSignalConnectionManager(const DtSignalConnectionManager & copy);
00085    };
00086 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)