/** Create an actor using a callable thing and its arguments.
*
* Note that the arguments will be copied, so move-only parameters are forbidden */
+
template <class F, class... Args,
// This constructor is enabled only if the call code(args...) is valid:
- typename = typename std::result_of_t<F(Args...)>>
+#ifndef DOXYGEN /* breathe seem to choke on function signatures in template parameter, see breathe#611 */
+ typename = typename std::result_of_t<F(Args...)>
+#endif
+ >
static ActorPtr create(const std::string& name, s4u::Host* host, F code, Args... args)
{
return create(name, host, std::bind(std::move(code), std::move(args)...));
/** Returns the internal implementation of this actor */
kernel::actor::ActorImpl* get_impl() const { return pimpl_; }
- /** Retrieve the property value (or nullptr if not set) */
+ /** Retrieve the list of properties for that actor */
const std::unordered_map<std::string, std::string>*
get_properties() const; // FIXME: do not export the map, but only the keys or something
+
+ /** Retrieve the property value (or nullptr if not set) */
const char* get_property(const std::string& key) const;
+
+ /** Set a property (old values will be overwritten) */
void set_property(const std::string& key, const std::string& value);
};