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

Last change on this file since 912 was 790, checked in by Maciej Komosinski, 7 years ago

Code formatting

  • Property svn:eol-style set to native
File size: 869 bytes
Line 
1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
2// Copyright (C) 1999-2015  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 <map>
10
11class NeuroImpl;
12
13class NeuroFactory
14{
15        std::map<NeuroClass*, NeuroImpl*> impl;
16public:
17        NeuroImpl* setImplementation(NeuroClass *nc, NeuroImpl *ni, bool deleteold = 1);
18        NeuroImpl* setImplementation(const SString& classname, NeuroImpl *ni, bool deleteold = 1);
19        NeuroImpl* getImplementation(NeuroClass *nc);
20        class NeuroImpl* createNeuroImpl(Neuro *n)
21        {
22                NeuroClass *nc = n->getClass(); if (!nc) return 0; return createNeuroImpl(nc);
23        }
24        class NeuroImpl* createNeuroImpl(NeuroClass *nc);
25
26        void setStandardImplementation();
27        void freeImplementation();
28        void removeUnimplemented();
29};
30
31#endif
Note: See TracBrowser for help on using the repository browser.