@@ -22,11 +22,11 @@ class instMgrAdapter;
2222
2323class lazyInstMgr {
2424 protected:
25- /* * map from instance number to instances that it refers to
25+ /* * multimap from instance number to instances that it refers to
2626 * \sa instanceRefs_pair
2727 */
2828 instanceRefs_t _fwdInstanceRefs;
29- /* * map from instance number to instances that refer to it
29+ /* * multimap from instance number to instances that refer to it
3030 * \sa instanceRefs_pair
3131 */
3232 instanceRefs_t _revInstanceRefs;
@@ -39,6 +39,8 @@ class lazyInstMgr {
3939
4040 /* * map from instance number to instance pointer (loaded instances only)
4141 * \sa instancesLoaded_pair
42+ * TODO should be multimap to allow use of instances in multiple data sections?
43+ * a unique instance ID (containing sectionID and instanceID) would also work
4244 */
4345 instancesLoaded_t _instancesLoaded;
4446
@@ -65,7 +67,6 @@ class lazyInstMgr {
6567 public:
6668 lazyInstMgr ();
6769 ~lazyInstMgr ();
68- void addSchema ( void ( *initFn )() ); // ?
6970 void openFile ( std::string fname );
7071
7172 void addLazyInstance ( namedLazyInstance inst );
@@ -174,20 +175,25 @@ class lazyInstMgr {
174175 }
175176
176177 // TODO implement these
177- // list all instances that one instance depends on (recursive)
178- // std::vector<instanceID> instanceDependencies( instanceID id ); //set is faster?
179178
180- // TODO implement these
181- /* * the opposite of instanceDependencies() - all instances that are *not* dependencies of one particular instance
179+ // add another schema to registry
180+ // void addSchema( void ( *initFn )() );
181+
182+ // list all instances that one instance depends on (recursive)
183+ // std::vector<instanceID> instanceDependencies( instanceID id ); //set is faster?
184+
185+ /* * the opposite of instanceDependencies() - all instances that are *not* dependencies of one particular instance
182186 same as above, but with list of instances */
183- // std::vector<instanceID> notDependencies(...)
184-
185- // renumber instances so that they are numbered 1..N where N is the total number of instances
186- // void normalizeInstanceIds();
187- // find data that is repeated and eliminate, if possible
188- // void eliminateDuplicates();
189- // tell instMgr to use instances from this section
190- // void useDataSection( sectionID id );
187+ // std::vector<instanceID> notDependencies(...)
188+
189+ // renumber instances so that they are numbered 1..N where N is the total number of instances
190+ // void normalizeInstanceIds();
191+
192+ // find data that is repeated and eliminate, if possible
193+ // void eliminateDuplicates();
194+
195+ // tell instMgr to use instances from this section
196+ // void useDataSection( sectionID id );
191197
192198 // TODO support references from one file to another
193199};
0 commit comments