No backward compat necessary as all subclasses are in the kernel (and
not exposed publicly yet)
std::map<std::string, std::string>* Actor::get_properties()
{
std::map<std::string, std::string>* Actor::get_properties()
{
- return simgrid::simix::simcall([this] { return this->pimpl_->getProperties(); });
+ return simgrid::simix::simcall([this] { return this->pimpl_->get_properties(); });
}
/** Retrieve the property value (or nullptr if not set) */
const char* Actor::get_property(const char* key)
{
}
/** Retrieve the property value (or nullptr if not set) */
const char* Actor::get_property(const char* key)
{
- return simgrid::simix::simcall([this, key] { return pimpl_->getProperty(key); });
+ return simgrid::simix::simcall([this, key] { return pimpl_->get_property(key); });
}
void Actor::set_property(const char* key, const char* value)
{
}
void Actor::set_property(const char* key, const char* value)
{
- simgrid::simix::simcall([this, key, value] { pimpl_->setProperty(key, value); });
+ simgrid::simix::simcall([this, key, value] { pimpl_->set_property(key, value); });
}
Actor* Actor::restart()
}
Actor* Actor::restart()
/** Get the properties assigned to a host */
std::map<std::string, std::string>* Host::getProperties()
{
/** Get the properties assigned to a host */
std::map<std::string, std::string>* Host::getProperties()
{
- return simgrid::simix::simcall([this] { return this->pimpl_->getProperties(); });
+ return simgrid::simix::simcall([this] { return this->pimpl_->get_properties(); });
}
/** Retrieve the property value (or nullptr if not set) */
const char* Host::get_property(const char* key)
{
}
/** Retrieve the property value (or nullptr if not set) */
const char* Host::get_property(const char* key)
{
- return this->pimpl_->getProperty(key);
+ return this->pimpl_->get_property(key);
}
void Host::set_property(std::string key, std::string value)
{
}
void Host::set_property(std::string key, std::string value)
{
- simgrid::simix::simcall([this, key, value] { this->pimpl_->setProperty(key, value); });
+ simgrid::simix::simcall([this, key, value] { this->pimpl_->set_property(key, value); });
}
/** @brief Get the peak processor speed (in flops/s), at the specified pstate */
}
/** @brief Get the peak processor speed (in flops/s), at the specified pstate */
const char* Link::get_property(const char* key)
{
const char* Link::get_property(const char* key)
{
- return this->pimpl_->getProperty(key);
+ return this->pimpl_->get_property(key);
}
void Link::set_property(std::string key, std::string value)
{
}
void Link::set_property(std::string key, std::string value)
{
- simgrid::simix::simcall([this, key, value] { this->pimpl_->setProperty(key, value); });
+ simgrid::simix::simcall([this, key, value] { this->pimpl_->set_property(key, value); });
}
} // namespace s4u
} // namespace simgrid
}
} // namespace s4u
} // namespace simgrid
std::map<std::string, std::string>* Storage::getProperties()
{
std::map<std::string, std::string>* Storage::getProperties()
{
- return simgrid::simix::simcall([this] { return pimpl_->getProperties(); });
+ return simgrid::simix::simcall([this] { return pimpl_->get_properties(); });
}
const char* Storage::getProperty(std::string key)
{
}
const char* Storage::getProperty(std::string key)
{
- return this->pimpl_->getProperty(key);
+ return this->pimpl_->get_property(key);
}
void Storage::setProperty(std::string key, std::string value)
{
}
void Storage::setProperty(std::string key, std::string value)
{
- simgrid::simix::simcall([this, key, value] { this->pimpl_->setProperty(key, value); });
+ simgrid::simix::simcall([this, key, value] { this->pimpl_->set_property(key, value); });
}
sg_size_t Storage::read(sg_size_t size)
}
sg_size_t Storage::read(sg_size_t size)
/* Add properties */
if (properties != nullptr)
for (auto const& kv : *properties)
/* Add properties */
if (properties != nullptr)
for (auto const& kv : *properties)
- process->setProperty(kv.first, kv.second);
+ process->set_property(kv.first, kv.second);
/* Make sure that the process is initialized for simix, in case we are called from the Host::onCreation signal */
if (host->extension<simgrid::simix::Host>() == nullptr)
/* Make sure that the process is initialized for simix, in case we are called from the Host::onCreation signal */
if (host->extension<simgrid::simix::Host>() == nullptr)
/* Add properties */
if (properties != nullptr)
for (auto const& kv : *properties)
/* Add properties */
if (properties != nullptr)
for (auto const& kv : *properties)
- process->setProperty(kv.first, kv.second);
+ process->set_property(kv.first, kv.second);
/* Add the process to it's host process list */
host->extension<simgrid::simix::Host>()->process_list.push_back(*process);
/* Add the process to it's host process list */
host->extension<simgrid::simix::Host>()->process_list.push_back(*process);
/* Add the process to the list of process to restart, only if the host is down */
if (self->auto_restart && self->host->is_off()) {
SIMIX_host_add_auto_restart_process(self->host, self->get_cname(), self->code, self->getUserData(),
/* Add the process to the list of process to restart, only if the host is down */
if (self->auto_restart && self->host->is_off()) {
SIMIX_host_add_auto_restart_process(self->host, self->get_cname(), self->code, self->getUserData(),
- SIMIX_timer_get_date(self->kill_timer), self->getProperties(),
+ SIMIX_timer_get_date(self->kill_timer), self->get_properties(),
self->auto_restart);
}
XBT_DEBUG("Process %s@%s is dead", self->get_cname(), self->host->get_cname());
self->auto_restart);
}
XBT_DEBUG("Process %s@%s is dead", self->get_cname(), self->host->get_cname());
}
/** @brief Return the property associated to the provided key (or nullptr if not existing) */
}
/** @brief Return the property associated to the provided key (or nullptr if not existing) */
-const char* PropertyHolder::getProperty(std::string key)
+const char* PropertyHolder::get_property(std::string key)
{
if (properties_ == nullptr)
return nullptr;
{
if (properties_ == nullptr)
return nullptr;
}
/** @brief Change the value of a given key in the property set */
}
/** @brief Change the value of a given key in the property set */
-void PropertyHolder::setProperty(std::string key, std::string value)
+void PropertyHolder::set_property(std::string key, std::string value)
{
if (not properties_)
properties_ = new std::map<std::string, std::string>;
{
if (not properties_)
properties_ = new std::map<std::string, std::string>;
}
/** @brief Return the whole set of properties. Don't mess with it, dude! */
}
/** @brief Return the whole set of properties. Don't mess with it, dude! */
-std::map<std::string, std::string>* PropertyHolder::getProperties()
+std::map<std::string, std::string>* PropertyHolder::get_properties()
{
if (not properties_)
properties_ = new std::map<std::string, std::string>;
{
if (not properties_)
properties_ = new std::map<std::string, std::string>;
PropertyHolder() = default;
~PropertyHolder();
PropertyHolder() = default;
~PropertyHolder();
- const char* getProperty(std::string key);
- void setProperty(std::string id, std::string value);
+ const char* get_property(std::string key);
+ void set_property(std::string id, std::string value);
/* FIXME: This should not be exposed, as users may do bad things with the dict they got (it's not a copy).
* But some user API expose this call so removing it is not so easy.
*/
/* FIXME: This should not be exposed, as users may do bad things with the dict they got (it's not a copy).
* But some user API expose this call so removing it is not so easy.
*/
- std::map<std::string, std::string>* getProperties();
+ std::map<std::string, std::string>* get_properties();
private:
std::map<std::string, std::string>* properties_ = nullptr;
private:
std::map<std::string, std::string>* properties_ = nullptr;
if (link->properties) {
for (auto const& elm : *link->properties)
if (link->properties) {
for (auto const& elm : *link->properties)
- l->setProperty(elm.first, elm.second);
+ l->set_property(elm.first, elm.second);
}
if (link->latency_trace)
}
if (link->latency_trace)
if (storage->properties) {
for (auto const& elm : *storage->properties)
if (storage->properties) {
for (auto const& elm : *storage->properties)
- s->setProperty(elm.first, elm.second);
+ s->set_property(elm.first, elm.second);
delete storage->properties;
}
}
delete storage->properties;
}
}