Program Listing for File logical_task.hpp

Return to documentation for file (cosm/ta/logical_task.hpp)

#pragma once

/*******************************************************************************
 * Includes
 ******************************************************************************/
#include <string>
#include <utility>

#include "cosm/ta/time_estimate.hpp"

/*******************************************************************************
 * Namespaces/Decls
 ******************************************************************************/
namespace cosm::ta {

/*******************************************************************************
 * Class Definitions
 ******************************************************************************/
class logical_task {
 public:
  explicit logical_task(std::string name) : m_name(std::move(name)) {}

  virtual ~logical_task(void);

  logical_task(const logical_task& other) = default;

  const std::string& name(void) const { return m_name; }

  logical_task& operator=(const logical_task&) = delete;
  bool operator==(const logical_task& other) const {
    return this->m_name == other.name();
  }

 private:
  std::string m_name;
};

} /* namespace cosm::ta */