-/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2018. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/s4u/Comm.hpp"
#include "simgrid/s4u/Mailbox.hpp"
-#include "src/msg/msg_private.h"
+#include "src/msg/msg_private.hpp"
#include "src/simix/ActorImpl.hpp"
-#include "src/simix/smx_network_private.h"
+#include "src/simix/smx_network_private.hpp"
#include "xbt/log.h"
XBT_LOG_EXTERNAL_CATEGORY(s4u);
namespace simgrid {
namespace s4u {
-const char* Mailbox::getName()
+const simgrid::xbt::string& Mailbox::get_name() const
{
- return pimpl_->name_;
+ return pimpl_->get_name();
+}
+
+const char* Mailbox::get_cname() const
+{
+ return pimpl_->get_cname();
}
MailboxPtr Mailbox::byName(const char*name)
s4u::CommPtr Mailbox::put_init(void* data, uint64_t simulatedSize)
{
s4u::CommPtr res = put_init();
- res->setRemains(simulatedSize);
+ res->set_remaining(simulatedSize);
res->srcBuff_ = data;
res->srcBuffSize_ = sizeof(void*);
return res;
xbt_assert(payload != nullptr, "You cannot send nullptr");
CommPtr c = put_init();
- c->setRemains(simulatedSize);
+ c->set_remaining(simulatedSize);
c->setSrcData(payload);
c->wait();
}
xbt_assert(payload != nullptr, "You cannot send nullptr");
CommPtr c = put_init();
- c->setRemains(simulatedSize);
+ c->set_remaining(simulatedSize);
c->setSrcData(payload);
// c->start() is optional.
c->wait(timeout);