Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » why no virtual destructor for RegExp?
Re: why no virtual destructor for RegExp? [message #38889 is a reply to message #38888] Fri, 25 January 2013 16:04 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Navi


IMHO the pattern parameter should not be there, it is kind of confusing and against the whole idea that RegExp object represents the regexp pattern. If you want to have a chance to specify the replace pattern a separate global function might be better for this... It could use the RegExp object internaly, so it's not much work for you Smile

Quote:

	int  ReplaceGlobal(String& t, const String r, const String pattern=Null, bool backref=false); //DONE
	int  ReplaceGlobal(String& t, const String r, int offset, const String pattern=Null, bool backref=false); //DONE


Why not simply
	int  ReplaceGlobal(String& t, const String r, offset=0, bool backref=false);
... and similar for the vector and callback variant. It would make the interface simpler, without reducing its capabilities.

Note: The above is not any official requirement, just my ideas and opinions Wink

Honza

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Details when compiling in 64 bits
Next Topic: Wanted: OpenGL for gtk+ backend
Goto Forum:
  


Current Time: Mon Jun 09 11:52:11 CEST 2025

Total time taken to generate the page: 0.03733 seconds