Turi Create  4.0
object_factory_proxy.hpp
1 /* Copyright © 2017 Apple Inc. All rights reserved.
2  *
3  * Use of this source code is governed by a BSD-3-clause license that can
4  * be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
5  */
6 #ifndef CPPIPC_COMMON_OBJECT_FACTORY_PROXY_HPP
7 #define CPPIPC_COMMON_OBJECT_FACTORY_PROXY_HPP
8 #include <map>
9 #include <string>
10 #include <functional>
11 #include <core/system/cppipc/client/object_proxy.hpp>
12 #include <core/system/cppipc/common/object_factory_base.hpp>
13 namespace cppipc {
14 
15 /**
16  * \internal
17  * \ingroup cppipc
18  */
20  public:
22  object_factory_proxy(comm_client& comm):clt(comm, false, 0) {
23  //the factory object 0 is special and the proxy always has it
24  }
25 
26  inline size_t make_object(std::string objectname) {
27  return clt.call(&object_factory_base::make_object, objectname);
28  }
29 
30  inline std::string ping(std::string pingval) {
31  return clt.call(&object_factory_base::ping, pingval);
32  }
33 
34  inline void delete_object(size_t object_id) {
36  }
37 
38  inline std::string get_status_publish_address() {
40  }
41 
42  inline std::string get_control_address() {
44  }
45 
46  inline void sync_objects(std::vector<size_t> object_ids, bool input_sorted) {
47  clt.call(&object_factory_base::sync_objects, object_ids, input_sorted);
48  }
49 
50 };
51 
52 
53 
54 
55 } // cppipc
56 #endif
virtual void delete_object(size_t object_id)=0
void sync_objects(std::vector< size_t > object_ids, bool input_sorted)
std::string ping(std::string pingval)
virtual std::string get_status_publish_address()=0
void delete_object(size_t object_id)
size_t make_object(std::string objectname)
virtual std::string get_control_address()=0
virtual size_t make_object(std::string objectname)=0
virtual std::string ping(std::string pingval)=0
virtual void sync_objects(std::vector< size_t > object_ids, bool active_list)=0
detail::member_function_return_type< MemFn >::type call(MemFn f, const Args &... args)