- Added move constructors and move assignment operators to Bureaucrat and Form classes. - Updated constructors and destructors to include logging for move operations. - Enhanced Bureaucrat class with an executeForm method to handle form execution. - Refactored color definitions in colors.h for better organization and clarity. - Removed redundant macro definitions and improved code readability. - Updated main functions to utilize new executeForm method for better exception handling. - Ensured proper handling of copy and move semantics across all relevant classes.
31 lines
711 B
C++
31 lines
711 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "AForm.hpp"
|
|
|
|
class Intern
|
|
{
|
|
public:
|
|
// Constructors
|
|
Intern();
|
|
|
|
// Copy constructor and copy assignment operator
|
|
Intern(const Intern &other);
|
|
Intern &operator=(const Intern &other);
|
|
|
|
// Move constructor and move assignment operator
|
|
Intern(Intern &&other) noexcept;
|
|
Intern &operator=(Intern &&other) noexcept;
|
|
|
|
// Destructor
|
|
~Intern();
|
|
|
|
AForm *makeForm(const std::string &formName, const std::string &target);
|
|
|
|
private:
|
|
static AForm *createShrubberyForm(const std::string &target);
|
|
static AForm *createRobotomyForm(const std::string &target);
|
|
static AForm *createPresidentialForm(const std::string &target);
|
|
};
|