Main Page | Namespace List | Alphabetical List | Class List | Directories | File List | Class Members | File Members

NeuronTaskHolder.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   SpikeStream Simulation                                                *
00003  *   Copyright (C) 2007 by David Gamez                                     *
00004  *   david@davidgamez.eu                                                   *
00005  *   Version 0.1                                                           *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00015  *   GNU General Public License for more details.                          *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU General Public License     *
00018  *   along with this program; if not, write to the                         *
00019  *   Free Software Foundation, Inc.,                                       *
00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00021  ***************************************************************************/
00022 
00023 #ifndef NEURONTASKHOLDER_H
00024 #define NEURONTASKHOLDER_H
00025 
00026 //Other includes
00027 #include <vector>
00028 using namespace std;
00029 
00030 
00031 //-------------------------- Neuron Task Holder ---------------------------
00032 /*! Stores the current firing pattern of the neuron group and sends it to 
00033         any tasks that want to monitor the firing neurons rather than the 
00034         spikes. */
00035 //-------------------------------------------------------------------------
00036 
00037 class NeuronTaskHolder {
00038 
00039         public:
00040                 NeuronTaskHolder(int thisTaskID, unsigned int maxNumberOfNeurons);
00041                 ~NeuronTaskHolder();
00042                 void addReceivingTask(int);
00043                 void removeReceivingTask(int);
00044                 bool sendFiringNeuronMessages();
00045 
00046 
00047                 //======================== VARIABLES ==================================
00048                 /*! Keep a record of this task here for error messages.*/
00049                 int thisTaskID;
00050                 
00051                 /*! Vector holding the list of currently firing neurons.*/
00052                 vector<unsigned int> firingNeuronVector;
00053 
00054 
00055         private:
00056                 //========================= VARIABLES ================================
00057                 /*! Task IDs of the tasks that will be sent the firing neuron lists held in 
00058                         this task holder. Stored as an integer array to make it simpler to send using 
00059                         pvm_mcast. A vector of task ids would have to be converted.*/
00060                 int  *destinationTaskIDs;
00061 
00062                 /*! Size of the destinationTaskIDs array.*/
00063                 int numberOfTasks;
00064 
00065 
00066                 //=========================== METHODS ================================
00067                 /*! Declare copy constructor private so it cannot be used inadvertently.*/
00068                 NeuronTaskHolder (const NeuronTaskHolder&);
00069 
00070                 /*! Declare assignment private so it cannot be used.*/
00071                 NeuronTaskHolder operator = (const NeuronTaskHolder&);
00072 
00073 };
00074 
00075 
00076 #endif //NEURONTASKHOLDER_H

Generated on Mon Sep 3 22:24:34 2007 for SpikeStream Simulation by  doxygen 1.4.4