OK, here's my latest thinking on accessing Entity data:
1. Generic Entity Functions
a). Function to return total number of Entities
b). Function to return the number of data items for a given Entity Number
c). Function to return a vector<string>* containing all of the data for a given Entity Number
The vector<string> object returned for the given Entity Number would consist of a set format. For example:
Entry Number . Content
-------------------------------
0 ..................... Entity ClassName
1 ..................... x Position
2 ..................... y Position
3 ..................... z Position
4 ..................... Key1 Name
5 ..................... Key1 Value
6 ..................... Key2 Name
7 ..................... Key2 Value
.....
.....
n ..................... Keyn Name
n+1 ................. Keyn Value
2. Specific Entity Functions
a). Function to return total number of Entities matching a given Entity Classname
b). Function to return a vector<int>* of Entity Numbers for a given Entity ClassName
c). Function to return total number of Entities matching a given Entity Classname and KeyName Value
d). Function to return a vector<int>* of Entity Numbers for a given Entity ClassName and KeyName Value
The function 1c could then be used to return the targeted Entity data.
I think this would give a good degree of flexability whilst keeping everything reasonably simple.
The vectors cound be accessed using standard index notation making it easy to extract the required data without more complicated string type extraction routines as I was advocating earlier.
I have most of the code written to do this so I'll play around a bit tonight and see if it looks practical.
No matter how good your code is, someone will improve on it