fork download
  1. bool CVDIProvider::CheckBrokers()
  2. {
  3. if (m_BrokerList.empty())
  4. return true;
  5.  
  6. trq << L"Broker validation has been started" << trq;
  7.  
  8. Concurrency::task_group tasks;
  9. FOREACH_STL(auto, it, m_BrokerList)
  10. {
  11. tasks.run([this, it, &tasks]()
  12. {
  13. CheckBroker(*it);
  14.  
  15. if (!tasks.is_canceling() && CVDI2Controller::GetController()->IsStopRequested())
  16. tasks.cancel();
  17. });
  18. }
  19.  
  20. bool bIsCompleted = (tasks.wait() == Concurrency::completed);
  21.  
  22. trq << L"Broker validation has been"
  23. << (bIsCompleted ? L"completed" : L"canceled")
  24. << trq;
  25.  
  26. return bIsCompleted;
  27. }
  28.  
  29. void CVDIProvider::CheckBroker(IBroker* pBroker)
  30. {
  31. pBroker->SetStatus(Broker::eUnknown);
  32.  
  33. if(std::wstring::npos != pBroker->GetBrokerURLString().find(L"fake"))
  34. {
  35. pBroker->SetStatus(IBroker::eFakeBroker);
  36. return;
  37. }
  38.  
  39. if (!pBroker->IsEnabled())
  40. return;
  41.  
  42. pBroker->CheckBrokerConnection(&m_UserInfo);
  43. }
  44.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:6: error: 'CVDIProvider' has not been declared
 bool CVDIProvider::CheckBrokers()
      ^
prog.cpp: In function 'bool CheckBrokers()':
prog.cpp:3:6: error: 'm_BrokerList' was not declared in this scope
  if (m_BrokerList.empty())
      ^
prog.cpp:6:2: error: 'trq' was not declared in this scope
  trq << L"Broker validation has been started" << trq;
  ^
prog.cpp:8:2: error: 'Concurrency' has not been declared
  Concurrency::task_group tasks;
  ^
prog.cpp:9:13: warning: C++11 auto only available with -std=c++11 or -std=gnu++11
  FOREACH_STL(auto, it, m_BrokerList)
             ^
prog.cpp:9:14: error: expected primary-expression before 'auto'
  FOREACH_STL(auto, it, m_BrokerList)
              ^
prog.cpp:9:20: error: 'it' was not declared in this scope
  FOREACH_STL(auto, it, m_BrokerList)
                    ^
prog.cpp:9:24: error: 'm_BrokerList' was not declared in this scope
  FOREACH_STL(auto, it, m_BrokerList)
                        ^
prog.cpp:9:36: error: 'FOREACH_STL' was not declared in this scope
  FOREACH_STL(auto, it, m_BrokerList)
                                    ^
prog.cpp:20:23: error: 'tasks' was not declared in this scope
  bool bIsCompleted = (tasks.wait() == Concurrency::completed);
                       ^
prog.cpp:20:39: error: 'Concurrency' has not been declared
  bool bIsCompleted = (tasks.wait() == Concurrency::completed);
                                       ^
prog.cpp: At global scope:
prog.cpp:29:6: error: 'CVDIProvider' has not been declared
 void CVDIProvider::CheckBroker(IBroker* pBroker)
      ^
prog.cpp:29:32: error: variable or field 'CheckBroker' declared void
 void CVDIProvider::CheckBroker(IBroker* pBroker)
                                ^
prog.cpp:29:32: error: 'IBroker' was not declared in this scope
prog.cpp:29:41: error: 'pBroker' was not declared in this scope
 void CVDIProvider::CheckBroker(IBroker* pBroker)
                                         ^
stdout
Standard output is empty