- Timestamp:
- Aug 9, 2010 12:33:59 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/settings.h
r31464 r31481 99 99 }; 100 100 101 typedef std::map<com::Utf8Str, com::Utf8Str> PropertiesMap;101 typedef std::map<com::Utf8Str, com::Utf8Str> StringsMap; 102 102 103 103 // ExtraDataItem (used by both VirtualBox.xml and machines XML) 104 typedef std::map<com::Utf8Str, com::Utf8Str> ExtraDataItemsMap;105 104 struct USBDeviceFilter; 106 105 typedef std::list<USBDeviceFilter> USBDeviceFiltersList; … … 123 122 com::Utf8Str strFormat; 124 123 bool fAutoReset; // optional, only for diffs, default is false 125 PropertiesMapproperties;124 StringsMap properties; 126 125 MediumType_T hdType; 127 126 … … 168 167 169 168 void readExtraData(const xml::ElementNode &elmExtraData, 170 ExtraDataItemsMap &map);169 StringsMap &map); 171 170 void readUSBDeviceFilters(const xml::ElementNode &elmDeviceFilters, 172 171 USBDeviceFiltersList &ll); … … 178 177 void createStubDocument(); 179 178 180 void buildExtraData(xml::ElementNode &elmParent, const ExtraDataItemsMap &me);179 void buildExtraData(xml::ElementNode &elmParent, const StringsMap &me); 181 180 void buildUSBDeviceFilters(xml::ElementNode &elmParent, 182 181 const USBDeviceFiltersList &ll, … … 257 256 MachinesRegistry llMachines; 258 257 DHCPServersList llDhcpServers; 259 ExtraDataItemsMapmapExtraDataItems;258 StringsMap mapExtraDataItems; 260 259 }; 261 260 … … 881 880 MediaRegistry mediaRegistry; 882 881 883 ExtraDataItemsMapmapExtraDataItems;882 StringsMap mapExtraDataItems; 884 883 885 884 SnapshotsList llFirstSnapshot; // first snapshot or empty list if there's none -
trunk/src/VBox/Main/MachineImpl.cpp
r31358 r31481 3798 3798 com::SafeArray<BSTR> saKeys(mData->pMachineConfigFile->mapExtraDataItems.size()); 3799 3799 int i = 0; 3800 for (settings:: ExtraDataItemsMap::const_iterator it = mData->pMachineConfigFile->mapExtraDataItems.begin();3800 for (settings::StringsMap::const_iterator it = mData->pMachineConfigFile->mapExtraDataItems.begin(); 3801 3801 it != mData->pMachineConfigFile->mapExtraDataItems.end(); 3802 3802 ++it, ++i) … … 3827 3827 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 3828 3828 3829 settings:: ExtraDataItemsMap::const_iterator it = mData->pMachineConfigFile->mapExtraDataItems.find(Utf8Str(aKey));3829 settings::StringsMap::const_iterator it = mData->pMachineConfigFile->mapExtraDataItems.find(Utf8Str(aKey)); 3830 3830 if (it != mData->pMachineConfigFile->mapExtraDataItems.end()) 3831 3831 // found: … … 3862 3862 { 3863 3863 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); // hold read lock only while looking up 3864 settings:: ExtraDataItemsMap::const_iterator it = mData->pMachineConfigFile->mapExtraDataItems.find(strKey);3864 settings::StringsMap::const_iterator it = mData->pMachineConfigFile->mapExtraDataItems.find(strKey); 3865 3865 if (it != mData->pMachineConfigFile->mapExtraDataItems.end()) 3866 3866 strOldValue = it->second; -
trunk/src/VBox/Main/MediumImpl.cpp
r31480 r31481 150 150 bool hostDrive : 1; 151 151 152 settings:: PropertiesMap mapProperties;152 settings::StringsMap mapProperties; 153 153 154 154 bool implicit : 1; … … 986 986 * compatibility; we can also clean them up from the XML upon next 987 987 * XML format version change if we wish) */ 988 for (settings:: PropertiesMap::const_iterator it = data.properties.begin();988 for (settings::StringsMap::const_iterator it = data.properties.begin(); 989 989 it != data.properties.end(); 990 990 ++it) … … 1962 1962 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1963 1963 1964 settings:: PropertiesMap::const_iterator it = m->mapProperties.find(Utf8Str(aName));1964 settings::StringsMap::const_iterator it = m->mapProperties.find(Utf8Str(aName)); 1965 1965 if (it == m->mapProperties.end()) 1966 1966 return setError(VBOX_E_OBJECT_NOT_FOUND, … … 1990 1990 } 1991 1991 1992 settings:: PropertiesMap::iterator it = m->mapProperties.find(Utf8Str(aName));1992 settings::StringsMap::iterator it = m->mapProperties.find(Utf8Str(aName)); 1993 1993 if (it == m->mapProperties.end()) 1994 1994 return setError(VBOX_E_OBJECT_NOT_FOUND, … … 2025 2025 size_t i = 0; 2026 2026 2027 for (settings:: PropertiesMap::const_iterator it = m->mapProperties.begin();2027 for (settings::StringsMap::const_iterator it = m->mapProperties.begin(); 2028 2028 it != m->mapProperties.end(); 2029 2029 ++it) … … 2069 2069 ++i) 2070 2070 { 2071 settings:: PropertiesMap::iterator it = m->mapProperties.find(Utf8Str(names[i]));2071 settings::StringsMap::iterator it = m->mapProperties.find(Utf8Str(names[i])); 2072 2072 AssertReturn(it != m->mapProperties.end(), E_FAIL); 2073 2073 … … 3020 3020 /* optional properties */ 3021 3021 data.properties.clear(); 3022 for (settings:: PropertiesMap::const_iterator it = m->mapProperties.begin();3022 for (settings::StringsMap::const_iterator it = m->mapProperties.begin(); 3023 3023 it != m->mapProperties.end(); 3024 3024 ++it) … … 5017 5017 AssertReturn(that != NULL, VERR_GENERAL_FAILURE); 5018 5018 5019 settings:: PropertiesMap::const_iterator it = that->m->mapProperties.find(Utf8Str(pszName));5019 settings::StringsMap::const_iterator it = that->m->mapProperties.find(Utf8Str(pszName)); 5020 5020 if (it == that->m->mapProperties.end()) 5021 5021 return VERR_CFGM_VALUE_NOT_FOUND; … … 5041 5041 AssertReturn(that != NULL, VERR_GENERAL_FAILURE); 5042 5042 5043 settings:: PropertiesMap::const_iterator it = that->m->mapProperties.find(Utf8Str(pszName));5043 settings::StringsMap::const_iterator it = that->m->mapProperties.find(Utf8Str(pszName)); 5044 5044 if (it == that->m->mapProperties.end()) 5045 5045 return VERR_CFGM_VALUE_NOT_FOUND; -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r31473 r31481 1773 1773 com::SafeArray<BSTR> saKeys(m->pMainConfigFile->mapExtraDataItems.size()); 1774 1774 int i = 0; 1775 for ( ExtraDataItemsMap::const_iterator it = m->pMainConfigFile->mapExtraDataItems.begin();1775 for (StringsMap::const_iterator it = m->pMainConfigFile->mapExtraDataItems.begin(); 1776 1776 it != m->pMainConfigFile->mapExtraDataItems.end(); 1777 1777 ++it, ++i) … … 1801 1801 Bstr bstrResult; 1802 1802 1803 settings:: ExtraDataItemsMap::const_iterator it = m->pMainConfigFile->mapExtraDataItems.find(strKey);1803 settings::StringsMap::const_iterator it = m->pMainConfigFile->mapExtraDataItems.find(strKey); 1804 1804 if (it != m->pMainConfigFile->mapExtraDataItems.end()) 1805 1805 // found: … … 1837 1837 { 1838 1838 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); // hold read lock only while looking up 1839 settings:: ExtraDataItemsMap::const_iterator it = m->pMainConfigFile->mapExtraDataItems.find(strKey);1839 settings::StringsMap::const_iterator it = m->pMainConfigFile->mapExtraDataItems.find(strKey); 1840 1840 if (it != m->pMainConfigFile->mapExtraDataItems.end()) 1841 1841 strOldValue = it->second; -
trunk/src/VBox/Main/xml/Settings.cpp
r31472 r31481 477 477 */ 478 478 void ConfigFileBase::readExtraData(const xml::ElementNode &elmExtraData, 479 ExtraDataItemsMap &map)479 StringsMap &map) 480 480 { 481 481 xml::NodesLoop nlLevel4(elmExtraData); … … 894 894 */ 895 895 void ConfigFileBase::buildExtraData(xml::ElementNode &elmParent, 896 const ExtraDataItemsMap &me)896 const StringsMap &me) 897 897 { 898 898 if (me.size()) 899 899 { 900 900 xml::ElementNode *pelmExtraData = elmParent.createChild("ExtraData"); 901 for ( ExtraDataItemsMap::const_iterator it = me.begin();901 for (StringsMap::const_iterator it = me.begin(); 902 902 it != me.end(); 903 903 ++it) … … 992 992 pelmHardDisk->setAttribute("Description", mdm.strDescription); 993 993 994 for ( PropertiesMap::const_iterator it = mdm.properties.begin();994 for (StringsMap::const_iterator it = mdm.properties.begin(); 995 995 it != mdm.properties.end(); 996 996 ++it)
Note:
See TracChangeset
for help on using the changeset viewer.