xref: /llvm-project/clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Shape.h (revision 70ec8419dd722abeddf09e11f01500ae62334394)
1 #pragma once
2 
3 /**
4  * @brief Abstract base class for shapes.
5  *
6  * Provides a common interface for different types of shapes.
7  */
8 class Shape {
9 public:
10     /**
11      * @brief Virtual destructor.
12      */
~Shape()13     virtual ~Shape() {}
14 
15     /**
16      * @brief Calculates the area of the shape.
17      *
18      * @return double The area of the shape.
19      */
20     virtual double area() const = 0;
21 
22     /**
23      * @brief Calculates the perimeter of the shape.
24      *
25      * @return double The perimeter of the shape.
26      */
27     virtual double perimeter() const = 0;
28 };
29 
30 
31