diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-12-18 21:48:35 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-12-18 21:58:37 +0900 |
| commit | d0febf3f55c1de0c7600236583576ad26c7bb703 (patch) | |
| tree | 08c823af853d31f2c58d0fb3b6b13ed22a67e576 /doc/sources/c++/polygon.h | |
| parent | 5753ce851f9fd44b8f82cd514fcda0b4c0bc652b (diff) | |
| download | libksquirrel-d0febf3f.tar.gz libksquirrel-d0febf3f.zip | |
Renaming of files in preparation for code style tools.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit b0b9b9401cf06859e99ce20b911014404bc08faf)
Diffstat (limited to 'doc/sources/c++/polygon.h')
| -rw-r--r-- | doc/sources/c++/polygon.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/sources/c++/polygon.h b/doc/sources/c++/polygon.h new file mode 100644 index 0000000..e3189bf --- /dev/null +++ b/doc/sources/c++/polygon.h @@ -0,0 +1,25 @@ +#ifndef POLYGON_HPP +#define POLYGON_HPP + +class polygon +{ + protected: + double side_length_; + + public: + polygon() : side_length_(0) + {} + + void set_side_length(double side_length) + { + side_length_ = side_length; + } + + virtual double area() const = 0; +}; + +// the types of the class factories +typedef polygon* create_t(); +typedef void destroy_t(polygon*); + +#endif |
