| 71 | } |
| 72 | |
| 73 | int Variant::thrd_initialize() { |
| 74 | if (_stub_map.size() <= 0) { |
| 75 | return _default_stub->thrd_initialize(); |
| 76 | } |
| 77 | |
| 78 | std::map<std::string, Stub*>::iterator iter; |
| 79 | for (iter = _stub_map.begin(); iter != _stub_map.end(); ++iter) { |
| 80 | Stub* stub = iter->second; |
| 81 | if (!stub || stub->thrd_initialize() != 0) { |
| 82 | LOG(ERROR) << "Failed thrd initialize stub: " << iter->first; |
| 83 | return -1; |
| 84 | } |
| 85 | VLOG(2) << "Succ thrd initialize stub:" << iter->first; |
| 86 | } |
| 87 | |
| 88 | VLOG(2) << "Succ thrd initialize all stubs"; |
| 89 | return 0; |
| 90 | } |
| 91 | |
| 92 | int Variant::thrd_clear() { |
| 93 | if (_stub_map.size() <= 0) { |
no test coverage detected