diff options
author | Joe Zhao <ztuowen@gmail.com> | 2014-10-06 21:54:53 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2014-10-06 21:54:53 +0800 |
commit | 5bca76a9e78e7e77779398501b4d233a2b58d26b (patch) | |
tree | 3888fa2313df97eff353403dcfa44cb933069dc3 /src | |
parent | c72ec6f83db58a8c02a7c9554c9760fcd6c20aef (diff) | |
download | tnet-5bca76a9e78e7e77779398501b4d233a2b58d26b.tar.gz tnet-5bca76a9e78e7e77779398501b4d233a2b58d26b.tar.bz2 tnet-5bca76a9e78e7e77779398501b4d233a2b58d26b.zip |
Virtual 9++++++
Diffstat (limited to 'src')
-rw-r--r-- | src/CuTNetLib/cuComponent.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/CuTNetLib/cuComponent.h b/src/CuTNetLib/cuComponent.h index a43680e..19908de 100644 --- a/src/CuTNetLib/cuComponent.h +++ b/src/CuTNetLib/cuComponent.h @@ -45,7 +45,11 @@ namespace TNet { */ class CuComponent { + private: + static int UID_CNT=0; public: + /// Unique id of this component + int UID; /// Types of the net components typedef enum { UPDATABLE_COMPONENT = 0x0100, @@ -281,7 +285,9 @@ namespace TNet { : mNInputs(nInputs), mNOutputs(nOutputs), mpInput(NULL), mpErrorInput(NULL), mOutput(), mErrorOutput(),preComp(pPred) - { + { + UID=++UID_CNT; + /* DOUBLE LINK the Components */ if (pPred != NULL) { SetPrevious(pPred); |