VirtualBox

Changeset 4039 in vbox


Ignore:
Timestamp:
Aug 6, 2007 12:28:27 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
23474
Message:

Main/Collections: Accept std::map as a parameter of the init() method.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/Collection.h

    r3668 r4039  
    206206
    207207    // public initializer/uninitializer for internal purposes only
     208
    208209    void init (const List &l)
    209210    {
    210211        // create a copy of the list
    211212        vec = Vector (l.begin(), l.end());
     213    }
     214
     215    template <class Key>
     216    void init (const std::map <Key, CollItem> &m)
     217    {
     218        // create a copy of the map
     219        for (std::map <Key, CollItem>::const_iterator it = m.begin();
     220             it != m.end(); ++ it)
     221            vec.push_back (it->second);
    212222    }
    213223
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette