Commit 8da17f42 authored by Millian Poquet's avatar Millian Poquet
Browse files

[code] remove most copy constructors

parent 7eb8888a
......@@ -130,6 +130,12 @@ public:
*/
explicit PajeTracer(bool log_launchings = false);
/**
* @brief PajeTracer cannot be copied.
* @param[in] other Another instance
*/
PajeTracer(const PajeTracer & other) = delete;
/**
* @brief Sets the filename of a PajeTracer
* @param[in] filename The name of the output file
......@@ -268,6 +274,12 @@ public:
*/
PStateChangeTracer();
/**
* @brief PStateChangeTracer cannot be copied.
* @param[in] other Another instance
*/
PStateChangeTracer(const PStateChangeTracer & other) = delete;
/**
* @brief Destroys a PStateChangeTracer
* @details The output file is flushed and written
......@@ -313,6 +325,12 @@ public:
*/
EnergyConsumptionTracer();
/**
* @brief EnergyConsumptionTracer cannot be copied.
* @param[in] other Another instance
*/
EnergyConsumptionTracer(const EnergyConsumptionTracer & other) = delete;
/**
* @brief Destroys a EnergyConsumptionTracer
* @details The output file is flushed and written
......@@ -391,6 +409,12 @@ public:
*/
MachineStateTracer();
/**
* @brief MachineStateTracer cannot be copied.
* @param[in] other Another instance
*/
MachineStateTracer(const MachineStateTracer & other) = delete;
/**
* @brief Destroys a MachineStateTracer
*/
......
......@@ -104,6 +104,13 @@ public:
* @brief Constructs an empty Jobs
*/
Jobs();
/**
* @brief Jobs cannot be copied.
* @param[in] other Another instance
*/
Jobs(const Jobs & other) = delete;
/**
* @brief Destroys a Jobs
* @details All Job instances will be deleted
......
......@@ -117,6 +117,12 @@ public:
*/
Machines();
/**
* @brief Machines cannot be copied.
* @param[in] other Another instance
*/
Machines(const Machines & other) = delete;
/**
* @brief Destroys a Machines
*/
......
......@@ -135,6 +135,13 @@ public:
* @brief Creates an empty Profiles
*/
Profiles();
/**
* @brief Profiles cannot be copied.
* @param[in] other Another instance
*/
Profiles(const Profiles & other) = delete;
/**
* @brief Destroys a Profiles
* @details All Profile elements are removed from memory
......
......@@ -173,6 +173,12 @@ public:
*/
explicit JsonProtocolWriter(BatsimContext * context);
/**
* @brief JsonProtocolWriter cannot be copied.
* @param[in] other Another instance
*/
JsonProtocolWriter(const JsonProtocolWriter & other) = delete;
/**
* @brief Destroys a JsonProtocolWriter
*/
......@@ -312,6 +318,12 @@ public:
*/
explicit JsonProtocolReader(BatsimContext * context);
/**
* @brief JsonProtocolReader cannot be copied.
* @param[in] other Another instance
*/
JsonProtocolReader(const JsonProtocolReader & other) = delete;
/**
* @brief Destructor
*/
......
......@@ -53,6 +53,20 @@ public:
};
public:
/**
* @brief Default constructor
*/
CurrentSwitches()
{
}
/**
* @brief CurrentSwitches cannot be copied.
* @param[in] other Another instance
*/
CurrentSwitches(const CurrentSwitches & other) = delete;
/**
* @brief Adds a Switch into the CurrentSwitches
* @param[in] machines The machines associated with the power state switch
......
......@@ -25,6 +25,13 @@ public:
* @brief Builds a RedisStorage
*/
RedisStorage();
/**
* @brief RedisStorage cannot be copied.
* @param[in] other Another instance
*/
RedisStorage(const RedisStorage & other) = delete;
/**
* @brief Destroys a RedisStorage
*/
......
......@@ -193,7 +193,7 @@ int Workflow::get_maximum_depth()
Task::Task(const int num_procs, const double execution_time, const string &id) :
Task::Task(const int num_procs, const double execution_time, const std::string &id) :
num_procs(num_procs),
execution_time(execution_time),
id(id)
......
......@@ -30,6 +30,12 @@ public:
*/
explicit Workflow(const std::string & name);
/**
* @brief Workflow cannot be copied.
* @param[in] other Another instance
*/
Workflow(const Workflow & other) = delete;
/**
* @brief Destroys a Workflow
*/
......@@ -109,6 +115,12 @@ public:
*/
Task(const int num_procs, const double execution_time, const std::string & id);
/**
* @brief Task cannot be copied.
* @param[in] other Another instance
*/
Task(const Task & other) = delete;
/**
* @brief Destructor
*/
......@@ -144,6 +156,12 @@ public:
*/
Workflows();
/**
* @brief Workflows cannot be copied.
* @param[in] other Another instance
*/
Workflows(const Workflows & other) = delete;
/**
* @brief Destroys a Workflows
*/
......
......@@ -22,7 +22,7 @@ using namespace rapidjson;
XBT_LOG_NEW_DEFAULT_CATEGORY(workload, "workload"); //!< Logging
Workload::Workload(const string & workload_name)
Workload::Workload(const std::string & workload_name)
{
jobs = new Jobs;
profiles = new Profiles;
......
......@@ -26,6 +26,12 @@ public:
*/
explicit Workload(const std::string & workload_name);
/**
* @brief Workloads cannot be copied.
* @param[in] other Another instance
*/
Workload(const Workload & other) = delete;
/**
* @brief Destroys a Workload
*/
......@@ -67,6 +73,12 @@ public:
*/
Workloads();
/**
* @brief Workloads cannot be copied.
* @param[in] other Another instance
*/
Workloads(const Workloads & other) = delete;
/**
* @brief Destroys a Workloads
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment