lab 5 part 1 done
This commit is contained in:
16
Lab5/shape.h
16
Lab5/shape.h
@@ -1,5 +1,15 @@
|
||||
#ifndef shape_h
|
||||
#define shape_h
|
||||
/**
|
||||
* @file shape.h
|
||||
* @author Trevor Barnes (barnestr@msoe.edu)
|
||||
* @brief
|
||||
* @version 1.0
|
||||
* @date 2022-04-12
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
#include <iostream>
|
||||
#include "x11context.h"
|
||||
#include "matrix.h"
|
||||
@@ -15,9 +25,9 @@ class Shape{
|
||||
// Destructor
|
||||
virtual ~Shape();
|
||||
// Draw shape
|
||||
virtual void draw(GraphicsContext *gc);
|
||||
virtual void draw(GraphicsContext *gc) = 0;
|
||||
// Print to output stream
|
||||
virtual void out(std::ostream& os, const Shape& rhs);
|
||||
virtual void out(std::ostream& os)const = 0;
|
||||
// Virtual Constructor
|
||||
virtual Shape* clone() = 0; // Pure virtual "=0"
|
||||
protected:
|
||||
@@ -26,7 +36,7 @@ class Shape{
|
||||
// RGB color
|
||||
uint32_t color;
|
||||
// Assignment Operator
|
||||
Shape& operator=(const Shape& rhs);
|
||||
virtual Shape& operator=(const Shape& rhs);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user