23 #ifndef NEURONINTERFACES_H
24 #define NEURONINTERFACES_H
27 #include "resourcesuser.h"
28 #include "parametersettable.h"
29 #include "baseexception.h"
38 #pragma warning(disable:4996)
68 virtual bool setCurrentBlock( QString blockName ) = 0;
74 virtual bool nextNeuron() = 0;
76 virtual void setInput(
double value ) = 0;
78 virtual double getOutput() = 0;
85 virtual void setGraphicProperties( QString label,
double minValue,
double maxValue, QColor color ) = 0;
112 static void describe( QString type );
118 void setName( QString name );
120 virtual void update() = 0;
126 virtual int size() = 0;
131 void checkAllNeededResourcesExist();
135 void resetNeededResourcesCheck();
138 bool allNeededResourcesExist;
167 static void describe( QString type );
173 void setName( QString name );
175 virtual void update() = 0;
181 virtual int size() = 0;
186 void checkAllNeededResourcesExist();
190 void resetNeededResourcesCheck();
193 bool allNeededResourcesExist;
214 void setEvonet(
Evonet* evonet );
216 typedef enum { InputLayer, HiddenLayer, OutputLayer } layer_t;
224 void defineBlock( QString name, layer_t layer,
int startIndex,
int size );
235 bool setCurrentBlock( QString blockName );
243 void setInput(
double value );
252 void setGraphicProperties( QString label,
double minValue,
double maxValue, QColor color );
259 void checkCurrentStatus(
const QString& funcName = QString() )
const;
268 QMap<QString, BlockInfo> blocks;
302 strncpy(m_function,
function, 256);
303 m_function[255] =
'\0';
304 strncpy(m_reason, reason, 256);
305 m_reason[255] =
'\0';
306 sprintf(m_errorMessage,
"Invalid status for EvonetItarator in function \"%s\", reason: %s", m_function, m_reason);
307 m_errorMessage[1023] =
'\0';
318 strncpy(m_function, other.m_function, 256);
319 m_function[255] =
'\0';
320 strncpy(m_reason, other.m_reason, 256);
321 m_reason[255] =
'\0';
322 strncpy(m_errorMessage, other.m_errorMessage, 1024);
323 m_errorMessage[1023] =
'\0';
333 if (&other ==
this) {
337 BaseException::operator=(other);
338 strncpy(m_function, other.m_function, 256);
339 m_function[255] =
'\0';
340 strncpy(m_reason, other.m_reason, 256);
341 m_reason[255] =
'\0';
342 strncpy(m_errorMessage, other.m_errorMessage, 1024);
343 m_errorMessage[1023] =
'\0';
360 virtual const char *what()
const throw()
362 return m_errorMessage;
370 const char *
function()
const throw()
381 const char *reason()
const throw()
396 char m_function[256];
406 char m_errorMessage[1024];
412 #if defined(_MSC_VER)