protected:
Activity();
virtual ~Activity();
-
-private:
- simgrid::simix::Synchro *pimpl_ = NULL;
-private:
- e_s4u_activity_state_t state_ = inited;
public:
/** Starts a previously created activity.
*
/** Retrieve the current state of the activity */
e_s4u_activity_state_t getState() {return state_;}
-private:
- double remains_ = 0;
-public:
/** Get the remaining amount of work that this Activity entails. When it's 0, it's done. */
double getRemains();
/** Set the [remaining] amount of work that this Activity will entail
* It is forbidden to change the amount of work once the Activity is started */
void setRemains(double remains);
-private:
- void *userData_ = NULL;
-public:
/** Put some user data onto the Activity */
void setUserData(void *data) {userData_=data;}
/** Retrieve the user data of the Activity */
void *getUserData() { return userData_; }
+
+private:
+ simgrid::simix::Synchro *pimpl_ = nullptr;
+ e_s4u_activity_state_t state_ = inited;
+ double remains_ = 0;
+ void *userData_ = nullptr;
}; // class
}}; // Namespace simgrid::s4u
void wait() override;
void wait(double timeout) override;
-private:
- double rate_=-1;
-public:
/** Sets the maximal communication rate (in byte/sec). Must be done before start */
void setRate(double rate);
-private:
- void *dstBuff_ = NULL;
- size_t dstBuffSize_ = 0;
- void *srcBuff_ = NULL;
- size_t srcBuffSize_ = sizeof(void*);
-public:
/** Specify the data to send */
void setSrcData(void * buff);
/** Specify the size of the data to send */
size_t getDstDataSize();
-private: /* FIXME: expose these elements in the API */
+private:
+ double rate_ = -1;
+ void *dstBuff_ = nullptr;
+ size_t dstBuffSize_ = 0;
+ void *srcBuff_ = nullptr;
+ size_t srcBuffSize_ = sizeof(void*);
+
+ /* FIXME: expose these elements in the API */
int detached_ = 0;
- int (*matchFunction_)(void *, void *, smx_synchro_t) = NULL;
- void (*cleanFunction_)(void *) = NULL;
- void (*copyDataFunction_)(smx_synchro_t, void*, size_t) = NULL;
+ int (*matchFunction_)(void *, void *, smx_synchro_t) = nullptr;
+ void (*cleanFunction_)(void *) = nullptr;
+ void (*copyDataFunction_)(smx_synchro_t, void*, size_t) = nullptr;
-private:
- smx_process_t sender_ = NULL;
- smx_process_t receiver_ = NULL;
- Mailbox *mailbox_ = NULL;
+ smx_process_t sender_ = nullptr;
+ smx_process_t receiver_ = nullptr;
+ Mailbox *mailbox_ = nullptr;
};
}} // namespace simgrid::s4u
/** @brief Retrieve the engine singleton */
static s4u::Engine *instance();
-private:
- static s4u::Engine *instance_;
-public:
/** @brief Retrieve the root AS, containing all others */
simgrid::s4u::As *rootAs();
/** @brief Retrieve the AS of the given name (or nullptr if not found) */
simgrid::s4u::As *asByNameOrNull(const char *name);
+
+private:
+ static s4u::Engine *instance_ = nullptr;
};
}} // namespace simgrid::s4u
public:
File(const char *fullpath, void* userdata);
~File();
-private:
- smx_file_t pimpl_;
- const char *path_;
-public:
/** Retrieves the path to the file */
const char *path() { return path_;}
-public:
+
/** Simulates a read action. Returns the size of data actually read
*
* FIXME: reading from a remotely mounted disk is not implemented yet.
void setUserdata(void *data) {userdata_ = data;}
/** Retrieves the previously stored data */
void* userdata() {return userdata_;}
-private:
- void *userdata_=NULL;
-public:
/** Retrieve the datasize */
sg_size_t size();
XBT_PUBLIC(msg_error_t) MSG_file_rmove(msg_file_t fd, msg_host_t host, const char* fullpath);
*/
+private:
+ smx_file_t pimpl_ = nullptr;
+ const char *path_ = nullptr;
+ void *userdata_ = nullptr;
};
}} // namespace simgrid::s4u
namespace s4u {
XBT_PUBLIC_CLASS Storage {
+ friend s4u::Engine;
+
private:
Storage(std::string name, smx_storage_t inferior);
virtual ~Storage();
+
public:
/** Retrieve a Storage by its name. It must exist in the platform file */
static Storage &byName(const char* name);
*/
protected:
smx_storage_t inferior();
-private:
- friend s4u::Engine;
-
- static boost::unordered_map<std::string, Storage *> *storages_;
- std::string name_;
- smx_storage_t pimpl_;
-
public:
void setUserdata(void *data) {userdata_ = data;}
void *userdata() {return userdata_;}
+
private:
- void *userdata_ = NULL;
+ static boost::unordered_map<std::string, Storage *> *storages_;
+ std::string name_;
+ smx_storage_t pimpl_ = nullptr;
+ void *userdata_ = nullptr;
};
} /* namespace s4u */