Rev | Line | |
---|
[22] | 1 | #include "CheckCallIsInitialized.h"
|
---|
| 2 | #include <sstream>
|
---|
| 3 | #include <iostream>
|
---|
| 4 |
|
---|
| 5 | #include "Logger/Logger.h"
|
---|
| 6 |
|
---|
| 7 | using namespace std;
|
---|
| 8 | using namespace boost;
|
---|
| 9 |
|
---|
| 10 | namespace UpperTestAdapter {
|
---|
| 11 |
|
---|
| 12 | namespace Processors {
|
---|
| 13 |
|
---|
| 14 | namespace TriggerCommandsOffLine {
|
---|
| 15 |
|
---|
| 16 | string CheckCallIsInitialized::CheckCallIsInitializedId = "UE_CHECK_CALL_IS_INITIALIZED";
|
---|
| 17 |
|
---|
| 18 | CheckCallIsInitialized::CheckCallIsInitialized()
|
---|
| 19 | {
|
---|
| 20 | m_successor.reset();
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | CheckCallIsInitialized::CheckCallIsInitialized(boost::shared_ptr<EutIPInterface> eutIface)
|
---|
| 24 | {
|
---|
| 25 | CheckCallIsInitialized();
|
---|
| 26 | m_eutIface = eutIface;
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | CheckCallIsInitialized::~CheckCallIsInitialized()
|
---|
| 30 | {
|
---|
| 31 | Logger::Instance().LogInfo("CheckCallIsInitialized::~CheckCallIsInitialized");
|
---|
| 32 | m_successor.reset();
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | int CheckCallIsInitialized::Process(const string &trigger, const vector<string> ¶meterList)
|
---|
| 36 | {
|
---|
| 37 | stringstream ss;
|
---|
| 38 | // Process the command.
|
---|
| 39 | if (trigger == CheckCallIsInitialized::CheckCallIsInitializedId)
|
---|
| 40 | {
|
---|
| 41 | ss << "CheckCallIsInitialized::Process: " << trigger;
|
---|
| 42 | Logger::Instance().LogDebug(ss.str());
|
---|
| 43 |
|
---|
| 44 | return 0; // See TTCN-3 FncRetCode
|
---|
| 45 | }
|
---|
| 46 | else if (m_successor.get() != NULL)
|
---|
| 47 | {
|
---|
| 48 | ss << "CheckCallIsInitialized::Not supported command: " << trigger;
|
---|
| 49 | Logger::Instance().LogInfo(ss.str());
|
---|
| 50 | return m_successor.get()->Process(trigger, parameterList);
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | return 1; // See TTCN-3 FncRetCode
|
---|
| 54 | }
|
---|
| 55 |
|
---|
| 56 | void CheckCallIsInitialized::SetSuccessor(boost::shared_ptr<UpperTestAdapter::Processors::TriggerCommandsImpl> successor)
|
---|
| 57 | {
|
---|
| 58 | m_successor = successor;
|
---|
| 59 | };
|
---|
| 60 | } } } // namespaces
|
---|
| 61 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.