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

Last change on this file since 1313 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
Line 
1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
2// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
3// See LICENSE.txt for details.
4
5#ifndef _NEUROFACTORY_H_
6#define _NEUROFACTORY_H_
7
8#include <frams/model/modelparts.h>
9#include <frams/model/model.h>
10#include <map>
11
12class NeuroImpl;
13
14class NeuroFactory
15{
16        std::map<NeuroClass*, NeuroImpl*> impl;
17public:
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);
21        class NeuroImpl* createNeuroImpl(Neuro *n, Model::ShapeType shape_type)
22        {
23                NeuroClass *nc = n->getClass(); if (!nc) return 0; return createNeuroImpl(nc, shape_type);
24        }
25        class NeuroImpl* createNeuroImpl(NeuroClass *nc, Model::ShapeType shape_type);
26
27        void setStandardImplementation();
28        void freeImplementation();
29        void removeUnimplemented();
30};
31
32#endif
Note: See TracBrowser for help on using the repository browser.