summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1999-02-17 16:24:45 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1999-02-17 16:24:45 +0000
commit334494d06876cdd2c5658fc40d8f1332e076f8aa (patch)
tree2b28e0e6579f3cd92ae07d51f1acaac5483c327f
parentbf870685d4fd3b9ce470064e6d35f87126689e2a (diff)
Patch from Bill that adds virtual method support.
git-svn-id: file:///fltk/svn/fltk/trunk@280 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--fluid/Fl_Function_Type.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx
index 023dc03ff..fef8a2d11 100644
--- a/fluid/Fl_Function_Type.cxx
+++ b/fluid/Fl_Function_Type.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Function_Type.cxx,v 1.12 1999/01/13 15:45:48 mike Exp $"
+// "$Id: Fl_Function_Type.cxx,v 1.13 1999/02/17 16:24:45 mike Exp $"
//
// C function type code for the Fast Light Tool Kit (FLTK).
//
@@ -196,9 +196,12 @@ void Fl_Function_Type::write_code1() {
// from matt: let the user type "static " at the start of type
// in order to declare a static method;
int is_static = 0;
+ int is_virtual = 0;
if (t) {
if (!strcmp(t,"static")) {is_static = 1; t = 0;}
else if (!strncmp(t,"static ",7)) {is_static = 1; t += 7;}
+ if (!strcmp(t,"virtual")) {is_virtual = 1; t = 0;}
+ else if (!strncmp(t,"virtual ",8)) {is_virtual = 1; t += 8;}
}
if (!t) {
if (havewidgets) t = "Fl_Window*";
@@ -217,7 +220,8 @@ void Fl_Function_Type::write_code1() {
write_h(" ");
if (!constructor) {
if (is_static) write_h("static ");
- write_h("%s ", t);
+ if (is_virtual) write_h("virtual ");
+ write_h("%s ", t);
write_c("%s ", t);
}
write_h("%s;\n", name());
@@ -697,5 +701,5 @@ void Fl_Class_Type::write_code2() {
}
//
-// End of "$Id: Fl_Function_Type.cxx,v 1.12 1999/01/13 15:45:48 mike Exp $".
+// End of "$Id: Fl_Function_Type.cxx,v 1.13 1999/02/17 16:24:45 mike Exp $".
//