From 3005ed13f0fde6d61ab8a229c1490f9389cd75b5 Mon Sep 17 00:00:00 2001 From: mike Date: Sat, 16 Jul 2011 18:53:45 +0000 Subject: Everything is in place except for columns, networks, and a cute language for describing the networks. ...and tests, don't forget about tests. git-svn-id: http://svn.xagasoft.com/misc/libneural/trunk@470 d8baa203-390c-0410-a584-dba4c0749223 --- src/container.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/container.h (limited to 'src/container.h') diff --git a/src/container.h b/src/container.h new file mode 100644 index 0000000..d9eeffd --- /dev/null +++ b/src/container.h @@ -0,0 +1,46 @@ +#ifndef NEURAL_CONTAINER_H +#define NEURAL_CONTAINER_H + +#include "neural/node.h" +#include + +namespace Neural +{ + template + class Container : public Node + { + public: + typedef Bu::List *> NodeList; + + Container() + { + } + + virtual ~Container() + { + for( typename NodeList::iterator i = lNodes.begin(); i; i++ ) + delete *i; + } + + virtual void addNode( Node *pNode ) + { + lNodes.append( pNode ); + } + + virtual const NodeList &getNodeList() const + { + return lNodes; + } + + protected: + virtual NodeList &getNodeList() + { + return lNodes; + } + + private: + NodeList lNodes; + }; +}; + +#endif -- cgit v1.2.3