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

LayerManager Class Reference

#include <LayerManager.h>

List of all members.

Public Member Functions

int createLayer (const NeuronGroup &neuronGrp)
void deleteLayers (vector< unsigned int > layerID)
 LayerManager (DBInterface *netDBInter, DBInterface *devDBInter)
void setConnectionWidget (ConnectionWidget *connWidg)
void setNeuronGrpName (const unsigned int neuronGrpID, QString name)
bool setNeuronGrpSpacingPosition (const unsigned int neuronGrpID, const NeuronGroup &, const NeuronGroup &)
void setNeuronGrpType (const unsigned int neuronGrpID, unsigned short neuronType)
 ~LayerManager ()

Private Member Functions

int create2DRectangularLayer (const NeuronGroup &neuronGrp)
int create3DRectangularLayer (const NeuronGroup &neuronGrp)
int createSIMNOSComponentLayer (const NeuronGroup &neuronGrp)
bool evaluatePlaceNeuronProbability (double density)
 LayerManager (const LayerManager &)
LayerManager operator= (const LayerManager &)

Private Attributes

ConnectionWidgetconnectionWidget
DBInterface * deviceDBInterface
DBInterface * networkDBInterface
QProgressDialog * progressDialog


Detailed Description

Manages the creation and deletion of layers.

Definition at line 46 of file LayerManager.h.


Constructor & Destructor Documentation

LayerManager::LayerManager DBInterface *  netDBInter,
DBInterface *  devDBInter
 

Constructor.

Definition at line 47 of file LayerManager.cpp.

References deviceDBInterface, networkDBInterface, and progressDialog.

LayerManager::~LayerManager  ) 
 

Destructor.

Definition at line 61 of file LayerManager.cpp.

References progressDialog.

LayerManager::LayerManager const LayerManager  )  [private]
 

Declare copy constructor private so it cannot be used inadvertently.


Member Function Documentation

int LayerManager::create2DRectangularLayer const NeuronGroup neuronGrp  )  [private]
 

Creates a 2D rectangular layer.

Definition at line 271 of file LayerManager.cpp.

References NeuronGroup::length, NeuronGroup::name, networkDBInterface, NeuronGroup::neuronGrpType, NeuronGroup::neuronType, progressDialog, NeuronGroup::spacing, NeuronGroup::width, NeuronGroup::xPos, NeuronGroup::yPos, and NeuronGroup::zPos.

Referenced by createLayer(), and createSIMNOSComponentLayer().

int LayerManager::create3DRectangularLayer const NeuronGroup neuronGrp  )  [private]
 

Create a 3D rectangular layer.

Definition at line 351 of file LayerManager.cpp.

References evaluatePlaceNeuronProbability(), NeuronGroup::length, NeuronGroup::name, networkDBInterface, NeuronGroup::neuronGrpType, NeuronGroup::neuronType, progressDialog, NeuronGroup::spacing, NeuronGroup::width, NeuronGroup::xPos, NeuronGroup::yPos, and NeuronGroup::zPos.

Referenced by createLayer().

int LayerManager::createLayer const NeuronGroup neuronGrp  ) 
 

This method creates layers in the database Initially only handle rectangular layers. Other shapes could be added later if necessary. Progress dialog is used to keep track of progress with large layers, which can take some time.

Definition at line 77 of file LayerManager.cpp.

References create2DRectangularLayer(), create3DRectangularLayer(), createSIMNOSComponentLayer(), and NeuronGroup::neuronGrpType.

Referenced by LayerWidget::newLayer().

int LayerManager::createSIMNOSComponentLayer const NeuronGroup neuronGrp  )  [private]
 

Creates a layer for a component of SIMNOS with appropriate connections to the device input layer.

Definition at line 439 of file LayerManager.cpp.

References NeuronGroup::componentID, connectionWidget, create2DRectangularLayer(), ConnectionWidget::createConnections(), deviceDBInterface, and NeuronGroup::deviceNeuronGrpID.

Referenced by createLayer().

void LayerManager::deleteLayers vector< unsigned int >  layerIDs  ) 
 

Deletes layer from the database.

Definition at line 95 of file LayerManager.cpp.

References networkDBInterface.

Referenced by LayerWidget::deleteLayer().

bool LayerManager::evaluatePlaceNeuronProbability double  density  )  [private]
 

Used to create layers that are not completely dense - especially the 3D layer. Decides whether neuron should be added at a particular point or not.

Definition at line 494 of file LayerManager.cpp.

Referenced by create3DRectangularLayer().

LayerManager LayerManager::operator= const LayerManager  )  [private]
 

Declare assignment private so it cannot be used inadvertently.

void LayerManager::setConnectionWidget ConnectionWidget connWidg  ) 
 

Passes a reference to connection widget that is used when creating SIMNOS component layers.

Definition at line 133 of file LayerManager.cpp.

References connectionWidget.

Referenced by LayerWidget::setConnectionWidget().

void LayerManager::setNeuronGrpName const unsigned int  neuronGrpID,
QString  name
 

Sets the name of a layer. Called during layer editing mode Name does not conflict with anything else so no checks need to be run.

Definition at line 140 of file LayerManager.cpp.

References networkDBInterface.

Referenced by LayerWidget::editLayerProperties().

bool LayerManager::setNeuronGrpSpacingPosition const unsigned int  neuronGrpID,
const NeuronGroup oldNeurGrp,
const NeuronGroup newNeurGrp
 

Alters the spacing between neurons and the position of a neuron group This could potentially expand the layer to conflict with other layers, so need to check first False is returned if there is a conflict.

Definition at line 151 of file LayerManager.cpp.

References editNeuronGroupException, NeuronGroup::length, networkDBInterface, progressDialog, NeuronGroup::spacing, NeuronGroup::width, NeuronGroup::xPos, NeuronGroup::yPos, and NeuronGroup::zPos.

Referenced by LayerWidget::editLayerProperties().

void LayerManager::setNeuronGrpType const unsigned int  neuronGrpID,
unsigned short  neuronType
 

Sets the type of neuron in a layer. Neuron type does not conflict with anything else, so no checks need to be run.

Definition at line 229 of file LayerManager.cpp.

References networkDBInterface.

Referenced by LayerWidget::editLayerProperties().


Member Data Documentation

ConnectionWidget* LayerManager::connectionWidget [private]
 

Reference to connection widget enables layer manager to instruct it to create connections when creating SIMNOS component layers.

Definition at line 67 of file LayerManager.h.

Referenced by createSIMNOSComponentLayer(), and setConnectionWidget().

DBInterface* LayerManager::deviceDBInterface [private]
 

Definition at line 63 of file LayerManager.h.

Referenced by createSIMNOSComponentLayer(), and LayerManager().

DBInterface* LayerManager::networkDBInterface [private]
 

Definition at line 62 of file LayerManager.h.

Referenced by create2DRectangularLayer(), create3DRectangularLayer(), deleteLayers(), LayerManager(), setNeuronGrpName(), setNeuronGrpSpacingPosition(), and setNeuronGrpType().

QProgressDialog* LayerManager::progressDialog [private]
 

Progress dialog to display progress.

Definition at line 70 of file LayerManager.h.

Referenced by create2DRectangularLayer(), create3DRectangularLayer(), LayerManager(), setNeuronGrpSpacingPosition(), and ~LayerManager().


The documentation for this class was generated from the following files:
Generated on Mon Sep 3 22:29:05 2007 for SpikeStream Application by  doxygen 1.4.4