Dictionaries
With Rogue Wave® Server, you can declare object dictionaries. A dictionary stores smart pointers to objects and offers direct access to these objects by means of an identifier. A dictionary can contain all the instances of a class deriving from
IlsObject or
IlsEntity. Class typologies are defined in
“Relations”.. You can add new objects in an existing dictionary, retrieve objects using their identifier, and remove objects from the dictionary.
In Rogue Wave Server, a dictionary is an instance of the class template IlsDictionary. The argument passed to this class template is the type of the objects you want to put in the dictionary.
Example
class Network:
public IlsEntity
{
public:
Network(IlsIdentifier);
static NetworkP get(IlsIdentifier id){
return _dictionary[id];
}
private:
static IlsDictionary<Network> _dictionary;
};
Version 5.7
Copyright © 2013, Rogue Wave Software, Inc. All Rights Reserved.