diff options
Diffstat (limited to 'src/programlink.cpp')
-rw-r--r-- | src/programlink.cpp | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/programlink.cpp b/src/programlink.cpp new file mode 100644 index 0000000..e5c624c --- /dev/null +++ b/src/programlink.cpp | |||
@@ -0,0 +1,56 @@ | |||
1 | #include "bu/programlink.h" | ||
2 | #include "bu/programchain.h" | ||
3 | |||
4 | using namespace Bu; | ||
5 | |||
6 | Bu::ProgramLink::ProgramLink() | ||
7 | { | ||
8 | } | ||
9 | |||
10 | Bu::ProgramLink::~ProgramLink() | ||
11 | { | ||
12 | } | ||
13 | |||
14 | LinkMessage *Bu::ProgramLink::sendIRM( LinkMessage *pMsgOut ) | ||
15 | { | ||
16 | return pChain->broadcastIRM( pMsgOut, this ); | ||
17 | } | ||
18 | |||
19 | void Bu::ProgramLink::setChain( ProgramChain *pNewChain ) | ||
20 | { | ||
21 | pChain = pNewChain; | ||
22 | } | ||
23 | |||
24 | /* | ||
25 | void ProgramLink::postMessage( LinkMessage *pMsg, int nLvl ) | ||
26 | { | ||
27 | if( nLvl == msgToChain ) | ||
28 | { | ||
29 | qMsgToChain.enqueue( pMsg ); | ||
30 | } | ||
31 | else if( nLvl == msgToLink ) | ||
32 | { | ||
33 | qMsgToLink.enqueue( pMsg ); | ||
34 | } | ||
35 | else | ||
36 | { | ||
37 | // ERROR! | ||
38 | } | ||
39 | } | ||
40 | |||
41 | LinkMessage *ProgramLink::getMessage( int nLvl ) | ||
42 | { | ||
43 | if( nLvl == msgToChain ) | ||
44 | { | ||
45 | return (LinkMessage *)qMsgToChain.dequeue(); | ||
46 | } | ||
47 | else if( nLvl == msgToLink ) | ||
48 | { | ||
49 | return (LinkMessage *)qMsgToLink.dequeue(); | ||
50 | } | ||
51 | else | ||
52 | { | ||
53 | // ERROR! | ||
54 | } | ||
55 | } | ||
56 | */ | ||