summaryrefslogtreecommitdiffstats
path: root/doc/sources/c++/polygon.h
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-12-18 21:48:35 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-12-18 21:48:35 +0900
commitb0b9b9401cf06859e99ce20b911014404bc08faf (patch)
tree4e6d9c8c7ec17afd5acc6d8666c7b8c558304838 /doc/sources/c++/polygon.h
parent9301d49ef24a7e6b92da31c27a67f139c44b3015 (diff)
downloadlibksquirrel-b0b9b9401cf06859e99ce20b911014404bc08faf.tar.gz
libksquirrel-b0b9b9401cf06859e99ce20b911014404bc08faf.zip
Renaming of files in preparation for code style tools.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/sources/c++/polygon.h')
-rw-r--r--doc/sources/c++/polygon.h25
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