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 » U++ Library support » U++ Core » GetIndex on Array
Re: GetIndex on Array [message #11731 is a reply to message #11729] Sun, 23 September 2007 23:32 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
mdelfede wrote on Sun, 23 September 2007 17:03

luzr wrote on Sun, 23 September 2007 20:00



Well, so what we need is a key that invokes help, fills in the current ID and performs the search, right?

That should be trivial... sorry that it is not already there Smile




Ehehehehehe.... maybe it's not so trivial, if you want to manage multiple (external) help files and index all of them in a smart way.... But context help is a must, I think.



Actually, this part is already done Smile

You can search the files now. Invoke help, enter the symbols you want to search and hit a button... (That is why I was wondering why you miss existing feature... Smile

Quote:


Nor is trivial the html widget you'd need in order to make all that stuff.
Even worse, if you want to directly support chm files.... too many help files are in that format.



Ahh, sorry, I thought we are speaking about U++ Topic++ help files... Yes, this would be a bit more complex issue Smile (but not that complex if somebody would write html and chm RichText parsers)

Quote:


Back to container classes, another thing that I miss is some sort of 'uniform behaviour' between various containers. I know that Index is the best for fast searches and Array is better for insertions/deletions, but having for them the same set of member functions would make life easier. Why a Find() member on Index and not on Array ? Ok, on Index is faster, but what if I need a sortable container (like Array) and I need also to search inside it ? Yes, there's the FindIndex algorithm, but it's another function usage to remember.



Actually, I stand behind the design here. In fact, you can use FindIndex for Index too (with the same performance implications).

FindIndex is universal code that works with any U++ container. Why should you repeat it in each one of them?

Also, if you decide that FindIndex is so important that it grants it a method status, what else is important? We do not want to end with hundreds of methods per class, do we?

IMO it is a good practice to limit methods to things that cannot be implemented using container's interface (and, ok, maybe break this rule for convenice in case of very often or very typical methods). But FindIndex is far from frequently used or typical...

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 2 small Bugs [bug]
Next Topic: Transfer Semantics - Initializer list and copy constructors
Goto Forum:
  


Current Time: Mon May 06 11:21:29 CEST 2024

Total time taken to generate the page: 0.03296 seconds