OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::anonymous_namespace{NetworkAgent.cpp} Namespace Reference

Functions

template<typename Fn>
int invoke_on_all_cloud_agents (const std::map< std::string, std::shared_ptr< ICloudServiceAgent > > &cloud_agents, Fn &&fn)

Function Documentation

◆ invoke_on_all_cloud_agents()

template<typename Fn>
int Slic3r::anonymous_namespace{NetworkAgent.cpp}::invoke_on_all_cloud_agents ( const std::map< std::string, std::shared_ptr< ICloudServiceAgent > > & cloud_agents,
Fn && fn )
29{
30 if (cloud_agents.empty()) {
31 return -1;
32 }
33
34 int result = 0;
35 for (const auto& cloud_agent_pair : cloud_agents) {
36 const int ret = fn(*cloud_agent_pair.second);
37 if (result == 0 && ret != 0) {
38 result = ret;
39 }
40 }
41
42 return result;
43}

References invoke_on_all_cloud_agents().

Referenced by invoke_on_all_cloud_agents().

Here is the call graph for this function:
Here is the caller graph for this function: