5 my $filename = $ARGV [ 0 ];
9 die "File `$filename' exists.\n";
12 open ( OUT, ">$filename" );
14 my $defines_file_name_macro;
16 $defines_file_name_macro = "DEFINES_ISLIB_$filename";
17 $defines_file_name_macro =~ tr/[a-z]/[A-Z]/;
18 $defines_file_name_macro =~ s/\./_/g;
20 $filename =~ /([a-zA-Z0-9_]+)\..pp/;
24 if ( $filename =~ /[a-zA-Z0-9_]+\.hpp/ )
27 #ifndef $defines_file_name_macro
29 #define $defines_file_name_macro
32 // Inclusion of standard header file
36 // Inclusion of system header file
40 // Inclusion of library header file
44 // Inclusion of local header file
50 // Declaration of class
54 // Definition of class
59 // Declaration of friend
66 typedef $class_name this_type;
69 // Declaration of constructor
71 $class_name ( /* TODO: */ );
74 // Declaration of destructor
76 ~$class_name () throw ();
79 // Declaration of operator
81 this_type &operator = ( this_type const & );
84 // Declaration of method
86 /* TODO: */ get_/* TODO: */ () const;
87 bool is_null () const;
88 void set_/* TODO: */ ( /* TODO: */ );
89 void swap ( this_type & ) throw ();
92 // Declaration of static method
97 // Declaration of constructor
102 // Declaration of member function
106 // Declaration of static member function
111 // Declaration of data member
115 // Declaration of member function
119 // Declaration of static member function
125 #endif // $defines_file_name_macro
133 elsif ( $filename =~ /[a-zA-Z0-9_]+\.cpp/ )
137 // Inclusion of standard header file
141 // Inclusion of system header file
145 // Inclusion of library header file
149 // Inclusion of local header file
151 #include "$class_name.hpp"
156 // Declaration of class
160 // Definition of constructor
162 $class_name\:\:$class_name
170 // Definition of constructor
172 $class_name\:\:$class_name
185 /* TODO: */ ( /* TODO: */ )
187 throw_if ( std\:\:invalid_argument ( "islib\:\:$class_name\:\:$class_name: TODO: " ), /* TODO: */ );
202 a_local ( /* TODO: */ );
206 // Definition of constructor
208 $class_name\:\:$class_name
210 this_type const &the_other
217 // Definition of destructor
219 $class_name\:\:~$class_name
229 // Definition of operator
231 $class_name\:\:this_type &
232 $class_name\:\:operator =
234 this_type const &right_value
237 this_type temporary ( right_value );
239 this->swap ( temporary );
245 // Definition of method
247 $class_name\:\:/* TODO: */
248 $class_name\:\:get_/* TODO: */
253 /* TODO: */ /* TODO: */;
260 /* TODO: */ const &/* TODO: */
262 /* TODO: */ ( /* TODO: */ )
273 assert_ ( /* TODO: */, "islib\:\:$class_name\:\:get_TODO: : `TODO: ' has failed." );
277 /* TODO: */ const &/* TODO: */;
279 a_local ( /* TODO: */ );
287 // Definition of method
290 $class_name\:\:is_null
301 // Definition of method
304 $class_name\:\:set_/* TODO: */
306 /* TODO: */ /* TODO: */
314 /* TODO: */ /* TODO: */
316 /* TODO: */ ( /* TODO: */ )
318 throw_if ( std\:\:invalid_argument ( "islib\:\:$class_name\:\:set_TODO: : TODO: " ), /* TODO: */ );
331 /* TODO: */ /* TODO: */;
333 a_local ( /* TODO: */ );
339 // Definition of method