/** Retrieve the current state of the activity */
Activity::State get_state() const { return state_; }
/** Return a string representation of the activity's state (one of INITED, STARTING, STARTED, CANCELED, FINISHED) */
- const char* get_state_str();
+ const char* get_state_str() const;
void set_state(Activity::State state) { state_ = state; }
/** Tests whether the given activity is terminated yet. */
virtual bool test();
return surf_action_ ? surf_action_->get_remains() : 0;
}
-const char* ActivityImpl::get_state_str()
+const char* ActivityImpl::get_state_str() const
{
switch (state_) {
case State::WAITING:
virtual void register_simcall(smx_simcall_t simcall);
void clean_action();
virtual double get_remaining() const;
- const char* get_state_str();
+ const char* get_state_str() const;
// Support for the boost::intrusive_ptr<ActivityImpl> datatype
friend XBT_PUBLIC void intrusive_ptr_add_ref(ActivityImpl* activity);
friend XBT_PUBLIC void intrusive_ptr_release(ActivityImpl* activity);
return this;
}
-const char* Activity::get_state_str()
+const char* Activity::get_state_str() const
{
switch (state_) {
case State::INITED: