Lines Matching full:shape
33 class Shape {
35 Shape() {}
39 class Square : public Shape {
46 class Circle : public Shape {
56 #. In the header where you declare ``Shape``, you will want to ``#include
72 class Shape {
84 Shape() {}
99 ``Shape``. The reason for this is that since ``Shape`` is abstract
116 class Shape {
128 - Shape() {}
129 + Shape(ShapeKind K) : Kind(K) {}
133 class Square : public Shape {
137 + Square(double S) : Shape(SK_Square), SideLength(S) {}
141 class Circle : public Shape {
145 + Circle(double R) : Shape(SK_Circle), Radius(R) {}
158 class Shape {
170 Shape(ShapeKind K) : Kind(K) {}
174 class Square : public Shape {
177 Square(double S) : Shape(SK_Square), SideLength(S) {}
180 + static bool classof(const Shape *S) {
185 class Circle : public Shape {
188 Circle(double R) : Shape(SK_Circle), Radius(R) {}
191 + static bool classof(const Shape *S) {
205 Shape *S = ...;
233 ``classof`` into ``Shape``: all relevant classes derive from ``Shape``,
234 and ``Shape`` itself is abstract (has no entry in the ``Kind`` enum),
273 - static bool classof(const Shape *S) {
276 + static bool classof(const Shape *S) {
292 | Shape
323 static bool classof(const Shape *S) {
347 - static bool classof(const Shape *S) {
350 + static bool classof(const Shape *S) {