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

LayerManager.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   SpikeStream Application                                               *
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 LAYERMANAGER_H
00024 #define LAYERMANAGER_H
00025 
00026 //SpikeStream includes
00027 #include "ConnectionWidget.h"
00028 #include "DBInterface.h"
00029 #include "NeuronGroup.h"
00030 
00031 //Qt includes
00032 #include <qwidget.h>
00033 #include <qstring.h>
00034 #include <qprogressdialog.h>
00035 
00036 //Other includes
00037 #include <mysql++.h>
00038 #include <vector>
00039 using namespace std;
00040 
00041 
00042 //-------------------------- Layer Manager --------------------------------
00043 /*! Manages the creation and deletion of layers.*/
00044 //-------------------------------------------------------------------------
00045 
00046 class LayerManager {
00047 
00048         public:
00049                 LayerManager(DBInterface* netDBInter, DBInterface* devDBInter);
00050                 ~LayerManager();
00051                 int createLayer(const NeuronGroup &neuronGrp);
00052                 void deleteLayers(vector<unsigned int> layerID);
00053                 void setConnectionWidget(ConnectionWidget* connWidg);
00054                 void setNeuronGrpName(const unsigned int neuronGrpID, QString name);
00055                 bool setNeuronGrpSpacingPosition(const unsigned int neuronGrpID, const NeuronGroup&, const NeuronGroup&);
00056                 void setNeuronGrpType(const unsigned int neuronGrpID, unsigned short neuronType);
00057 
00058 
00059         private:
00060                 //========================== VARIABLES ===========================
00061                 //Reference to database interfaces
00062                 DBInterface *networkDBInterface;
00063                 DBInterface *deviceDBInterface;
00064 
00065                 /*! Reference to connection widget enables layer manager to instruct 
00066                         it to create connections when creating SIMNOS component layers.*/
00067                 ConnectionWidget* connectionWidget;
00068                 
00069                 /*! Progress dialog to display progress.*/
00070                 QProgressDialog *progressDialog;
00071 
00072 
00073                 //=========================== METHODS ============================
00074                 /*! Declare copy constructor private so it cannot be used inadvertently.*/
00075                 LayerManager (const LayerManager&);
00076 
00077                 /*! Declare assignment private so it cannot be used inadvertently.*/
00078                 LayerManager operator = (const LayerManager&);
00079 
00080                 int create2DRectangularLayer(const NeuronGroup &neuronGrp);
00081                 int create3DRectangularLayer(const NeuronGroup &neuronGrp);
00082                 int createSIMNOSComponentLayer(const NeuronGroup &neuronGrp);
00083                 bool evaluatePlaceNeuronProbability(double density);
00084 
00085 };
00086 
00087 
00088 #endif//LAYERMANAGER_H

Generated on Mon Sep 3 22:29:04 2007 for SpikeStream Application by  doxygen 1.4.4