[PERCEPS] Removing message and interface maps

Barry Hoggard hoggardb@panix.com
Tue, 10 Aug 1999 11:59:53 -0400


Here's a filter I use to get rid of most MFC stuff.  You could
probably adapt it to catch the COM stuff.  And no laughing at my regex
skills!


# input filter to remove MFC and ClassWizard comments
# author: Barry Hoggard <hoggardb@panix.com>
#
sub filter {
	local $_ = shift;
	s#//\s*{{.+?$##mg;
	s#//\s*}}.+?$##mg;
	s#//\s*Field/Param Data.*?$##mg;
	s#//\s*Attributes.*?$##mg;
	s#//\s*Operations.*?$##mg;
	s#//\s*Implementation.*?$##mg;
	s#//\s*Overrides.*?$##mg;
	s#//\s*Form Data.*?$##mg;
	s#//\s*No message handlers.*?$##mg;
	s#//\s*create from serialization only.*?$##mg;
	s#//\s*control bar embedded members.*?$##mg;
	s#^\s*DECLARE_.+?$##mg;
	s#//\s*ClassWizard generated virtual function overrides.*?$##mg;
	s#//\s*Generated message map functions.*?$##mg;
	s#//\s*NOTE - .+?$##mg;
	s#//\s*DO NOT EDIT.+?$##mg;
	return $_;
}



-- 
Barry Hoggard
------------------------------------------------------
Torus Software -- http://www.torus-software.com/
personal page  -- http://www.panix.com/~hoggardb/