#ifndef TECHREPORT_H #define TECHREPORT_H /****************************************************************************** * * File: TechReport.h * Project: CMSC 202 Project 5, Fall 2014 * Author: ??? (from a skeleton by John Park) * Date: ??/??/2014 * Section: ???? * E-mail: ???@umbc.edu * * This file contains the definition of the TechReport class, which * is derived from the Report class. It inherits many data and function * members from Report. * ******************************************************************************/ #include #include #include "Report.h" #include "BadResponseException.h" // Following tells compiler that this class exists, and that we will // define it fully later. This allows us to refer to Comment in definition // of TechReport class class Comment; #define DOC_TYPE_TECHREPORT 4 class TechReport : public Report { public: TechReport(int aID, std::string author, std::string title, std::string textBody); private: std::vector m_comments; }; //----------------------------------------------------------------------------- // The simple helper class Comment, used by the TechReport class to store // comments in the report. (This is a really quick-and-dirty implementation; // it violates some of our own guidelines, but we wanted to keep it simple. // --jyp //----------------------------------------------------------------------------- class Comment { public: std::string m_author; std::string m_textBody; //------------------------------------------------------------------------- // Name: Comment (constructor) // PreCondition: None. // PostCondition: Initializes the author and textBody fields //------------------------------------------------------------------------- Comment(std::string author = "", std::string textBody = "") : m_author(author), m_textBody(textBody) {} }; #endif