|Traversing a loaded dictionary
|Page 1 of 1|
|Author:||enpingado [ Thu Apr 21, 2011 2:48 pm ]|
|Post subject:||Traversing a loaded dictionary|
What is a good method to get a list of the loaded classes, types, ULs from multiple calls to LoadDictionary?
I am loading the dict.xml plus my own dictionary.
I would like to be able to search through the ULs and classes to extract/search the names, lengths, etc....
I dont beleive using LoadDictionary() returns any pointers to a list.
I would prefer to not read in and parse the xml files. Im hoping this is done by mxflib
|Author:||Matt Beard [ Thu Apr 28, 2011 1:53 pm ]|
There is a list inside MDOType of all the defined classes and properties, called AllTypes, but this is a protected member. There is also map indexing them all by UL called ULLookup (also protected).
Datatypes (i.e. MDType objects) are stored in protected list Types and map ULLookup of MDType.
The best way to locate loaded classes and types is probably to go via the SymbolSpace. Each SymbolSpace is a sub-class of std::map<std::string, ULPtr> giving a conversion from string name to UL. The UL can then be looked up using MDType::Find() and MDOType::Find(). Unless a SymbolSpace is specified in the XML file or the LoadDictionary() call, all types and classes will be added to the default globally defined SymbolSpace called MXFLibSymbols.
There is not currently a way to list the namespaces in use - perhaps that should be added.
|Page 1 of 1||All times are UTC|
|Powered by phpBB® Forum Software © phpBB Group