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 » Community » Newbie corner » What collection to use to achieve this?
What collection to use to achieve this? [message #55303] Wed, 28 October 2020 08:53 Go to next message
sinpeople is currently offline  sinpeople
Messages: 29
Registered: October 2020
Location: Singapore
Promising Member

Hi folks,

I have a collection of objects in the system. Each object has a name, which is a string. I'd like to have a collection of associations, which maps a string to an object. From the UDP or TCP socket, program will receive a string which contains the object name, I will then use the object name to index the object without long switch/if statement, and pass the rest of the input string as function call arguments?

I am a newbie. In this case, what kind of collections of associations to be used?

Thank you!


Best Regards
David
Re: What collection to use to achieve this? [message #55312 is a reply to message #55303] Wed, 28 October 2020 21:02 Go to previous message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello David,

Did you try to find something for your needs in Core tutorial. I think this is the best place to start learning about various U++ containers.

From what you had written it seems reasonable to look at VectorMap.

Klugier


U++ - one framework to rule them all.
Previous Topic: RegisterSystemHotKey not work here
Next Topic: How to access base class function in this case?
Goto Forum:
  


Current Time: Tue Apr 23 16:15:20 CEST 2024

Total time taken to generate the page: 0.02302 seconds