bool is_on() const;
void turn_off();
- void* get_data(); /** Should be used only from the C interface. Prefer extensions in C++ */
- void set_data(void* d);
-
#ifndef DOXYGEN
XBT_ATTRIB_DEPRECATED_v325("Please use Link::set_state_profile()") void set_state_trace(
kernel::profile::Profile* profile)
return this->pimpl_->is_on();
}
-void* Link::get_data()
-{
- return this->pimpl_->get_data();
-}
-void Link::set_data(void* d)
-{
- simgrid::kernel::actor::simcall([this, d]() { this->pimpl_->set_data(d); });
-}
-
void Link::set_state_profile(kernel::profile::Profile* profile)
{
simgrid::kernel::actor::simcall([this, profile]() { this->pimpl_->set_state_profile(profile); });
*/
class LinkImpl : public Resource, public surf::PropertyHolder {
bool currently_destroying_ = false;
- void* userdata_ = nullptr;
protected:
LinkImpl(NetworkModel* model, const std::string& name, lmm::Constraint* constraint);
public:
void destroy(); // Must be called instead of the destructor
- void* get_data() { return userdata_; }
- void set_data(void* d) { userdata_ = d; }
/** @brief Public interface */
s4u::Link piface_;