Hi Ashley, yes. Using TMap is more effective than TList for "large" collections ( thousands objects). Since POST,GET,COOKIES are "not numerous" ( no more than hundred ), using TList is quite effective. Regards. Valeriy Ashley Cambrell wrote: > > Hi Carroters, > > Would there be any objects if I converted the TList's for environment, > get, post, cookie, file (and session) to TMap's? It seems to make more > sense as you don't have to interate through to get the value. > > TMap *postData = ap.GetVars("POST"); > > cout << "Hello " << ((TObjStirng > *)postData->GetValue("username"))->String() << endl; > > Or better yet > > class THTTPData : public TMap > { > TString operator[](const char* key); > } > > THTTPData *postData = ap.GetVars("POST"); > cout << "Hello " << postData["username"] << endl; > > As all GET, POST, COOKIE data are strings, this would work. For FILES > and SESSION it wouldn't as you'd want to be able to store any TObject in > a session (and files already have there own data-type). > > Objections? > > Ashley Cambrell > > BTW, should there be a Carrot list? or is there so little Carrot traffic > it doesn't matter? We decided do not create separate list for Carrot because it's quite new project and "for advetising it inside ROOT world" :-) Thanks. Regards. Valeriy
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:51 MET