Last change
on this file since 1060 was
1056,
checked in by yushan, 7 years ago
|
one file mode OK. Tested with test_client
|
File size:
810 bytes
|
Line | |
---|
1 | #include "output_pin.hpp" |
---|
2 | #include "exception.hpp" |
---|
3 | |
---|
4 | namespace xios |
---|
5 | { |
---|
6 | void COutputPin::connectOutput(boost::shared_ptr<CInputPin> inputPin, size_t inputSlot) |
---|
7 | { |
---|
8 | if (!inputPin) |
---|
9 | ERROR("void COutputPin::connectOutput(CInputPin* inputPin, size_t inputSlot)", |
---|
10 | "The input pin cannot be null."); |
---|
11 | |
---|
12 | outputs.push_back(std::make_pair(inputPin, inputSlot)); |
---|
13 | } |
---|
14 | |
---|
15 | void COutputPin::deliverOuput(CDataPacketPtr packet) |
---|
16 | { |
---|
17 | if (!packet) |
---|
18 | ERROR("void COutputPin::deliverOuput(CDataPacketPtr packet)", |
---|
19 | "The packet cannot be null."); |
---|
20 | |
---|
21 | std::vector<std::pair<boost::shared_ptr<CInputPin>, size_t> >::iterator it, itEnd; |
---|
22 | for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it) |
---|
23 | { |
---|
24 | it->first->setInput(it->second, packet); |
---|
25 | } |
---|
26 | } |
---|
27 | } // namespace xios |
---|
Note: See
TracBrowser
for help on using the repository browser.