OSDN Git Service

[dennco] integrated engine related changes from denncoCreator
[dennco/dennco.git] / Source / TKAxon.h
1 //  Copyright (c) 2012 Dennco Project
2 //
3 // This program is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
16 //
17 //  Created by tkawata on 12/11/2011.
18 //
19
20 #ifndef __INCLUDE_TKAXON__
21 #define __INCLUDE_TKAXON__
22
23 #include <string>
24 #include <vector>
25
26 #include "TKLock.h"
27
28 class TKCell;
29 class TKAxonTerminal;
30
31 class TKAxon
32 {
33 public:
34         TKAxon(TKCell *theOwner);
35     virtual ~TKAxon();
36         TKAxonTerminal* addTerminal();
37     TKCell*         getOwner() const { return mOwner; }
38     float           getValue() const;
39     void            setValue(float value);
40
41 protected:
42     std::vector<TKAxonTerminal*> mTerminals;
43
44 private:
45     float  mValue;
46     TKCell *mOwner;
47     mutable TKLock mLock;
48 };
49
50 #endif