source: cpp/frams/neuro/neurofactory.h @ 1252

Last change on this file since 1252 was 932, checked in by Maciej Komosinski, 5 years ago

Neuron classes now have a property (a bit field) that says whether each neuron class supports model shape BALL_AND_STICK, SOLIDS, or both

  • Property svn:eol-style set to native
File size: 970 bytes
RevLine 
[286]1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
[932]2// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
[286]3// See LICENSE.txt for details.
[109]4
5#ifndef _NEUROFACTORY_H_
6#define _NEUROFACTORY_H_
7
8#include <frams/model/modelparts.h>
[932]9#include <frams/model/model.h>
[109]10#include <map>
11
12class NeuroImpl;
13
14class NeuroFactory
15{
[790]16        std::map<NeuroClass*, NeuroImpl*> impl;
[109]17public:
[790]18        NeuroImpl* setImplementation(NeuroClass *nc, NeuroImpl *ni, bool deleteold = 1);
19        NeuroImpl* setImplementation(const SString& classname, NeuroImpl *ni, bool deleteold = 1);
20        NeuroImpl* getImplementation(NeuroClass *nc);
[932]21        class NeuroImpl* createNeuroImpl(Neuro *n, Model::ShapeType shape_type)
[790]22        {
[932]23                NeuroClass *nc = n->getClass(); if (!nc) return 0; return createNeuroImpl(nc, shape_type);
[790]24        }
[932]25        class NeuroImpl* createNeuroImpl(NeuroClass *nc, Model::ShapeType shape_type);
[109]26
[790]27        void setStandardImplementation();
28        void freeImplementation();
29        void removeUnimplemented();
[109]30};
31
32#endif
Note: See TracBrowser for help on using the repository browser.