diff mk-opts.pl @ 4049:a35a3c5d4740

[project @ 2002-08-16 08:54:31 by jwe]
author jwe
date Fri, 16 Aug 2002 08:54:31 +0000
parents 7b0c139ac8af
children 6481f41a79f3
line wrap: on
line diff
--- a/mk-opts.pl	Fri Aug 16 02:43:14 2002 +0000
+++ b/mk-opts.pl	Fri Aug 16 08:54:31 2002 +0000
@@ -374,7 +374,8 @@
         }
     }
 
-  print "    }\n";
+  print "      reset = true;
+    }\n";
 
   print "\n  void copy (const ${class_name}& opt)\n    {\n";
 
@@ -383,7 +384,8 @@
       print "      $optvar[$i] = opt.$optvar[$i];\n";
     }
 
-  print "    }\n";
+  print "      reset = opt.reset;
+    }\n";
 
   print "\n  void set_default_options (void) { init (); }\n";
 
@@ -393,7 +395,7 @@
         {
           &emit_set_decl ($i);
 
-          print "\n    { $optvar[$i] = $set_expr[$i]; }\n";
+          print "\n    { $optvar[$i] = $set_expr[$i]; reset = true; }\n";
         }
       elsif ($set_body[$i])
         {
@@ -403,7 +405,7 @@
           chop ($s);
           $s =~ s/^/  /g;
           $s =~ s/\n/\n  /g;
-          print "\n    {\n$s\n    }\n";
+          print "\n    {\n$s\n      reset = true;\n    }\n";
         }
       elsif ($set_code[$i])
         {
@@ -427,7 +429,7 @@
       print "  $type[$i] $optvar[$i];\n";
     }
 
-  print "};\n\n#endif\n";
+  print "\nprotected:\n\n  bool reset;\n};\n\n#endif\n";
 }
 
 sub emit_set_decl