17 #ifndef YAMICPP_VALUE_PUBLISHER_IMPL_H_INCLUDED 18 #define YAMICPP_VALUE_PUBLISHER_IMPL_H_INCLUDED 34 class incoming_message;
35 class outgoing_message;
37 class value_publisher;
42 class incoming_message_dispatcher_base;
43 class value_publisher_overflow_dispatcher_base;
45 class value_publisher_impl
50 incoming_message_dispatcher_base * imd,
51 std::size_t max_queue_length,
52 value_publisher_overflow_dispatcher_base * qod);
53 ~value_publisher_impl();
55 void register_at(agent & controlling_agent,
56 const std::string & object_name);
60 void operator()(incoming_message & message);
62 void subscribe(
const std::string & destination_target,
63 const std::string & destination_object);
65 void unsubscribe(
const std::string & destination_target);
67 void publish(
const serializable & value, std::size_t priority);
69 std::size_t get_number_of_subscribers()
const;
71 std::vector<std::pair<std::string, std::string> >
72 get_subscribers()
const;
76 value_publisher_impl(
const value_publisher_impl &);
77 void operator=(
const value_publisher_impl &);
79 std::size_t max_queue_length_;
83 typedef std::map<std::string,
84 std::pair<std::string,
85 std::deque<outgoing_message *> > >
86 subscriptions_map_type;
88 void do_unsubscribe(subscriptions_map_type::iterator it);
89 void release_last_messages(subscriptions_map_type::iterator it);
91 incoming_message_dispatcher_base * incoming_message_dispatcher_;
92 value_publisher_overflow_dispatcher_base * overflow_dispatcher_;
94 agent * controlling_agent_;
95 std::string object_name_;
97 subscriptions_map_type subscriptions_;
98 mutable details::mutex mtx_;
105 #endif // YAMICPP_VALUE_PUBLISHER_IMPL_H_INCLUDED Namespace devoted to everything related to YAMI4.
Definition: activity_statistics_monitor.cpp:27