Cgicc::operator[]

Bérci Norbert <[email protected]> Mon, 20 Jun 2005 14:41:17 +0200
Newsgroups gmane.comp.gcc.cgicc.general
Message-ID <[email protected]>
Hi!

In the C++ standard, a sequence container (and a map also) has 
operator[], but it returns a _reference_ to the found object, _not an 
iterator_ to it. I think Cgicc should behave the same way (especially 
because it internally stores the entries in a C++ standard vector), so I 
would be able to access the FormEntry object as (cgi is a Cgicc object)
cgi["identifier"]
instead of
*cgi["identifier"]

The difference becomes more ugly, if I want to call a function of the 
object. I must write
(*cgi["identifier"]).length()
instead of
cgi["identifier"].length()

The getXXX functions return iterators, so changing operator[] 's return 
type does not narrow the usage of class Cgicc. Of course this is a minor 
thing, but would be a nice feature. Or did I missed something?

Please reply to my address, because I'm not on the list!

Thanks!

--
Norbert Bérci