VirtualBox

Changeset 37553 in vbox for trunk/include/VBox/com


Ignore:
Timestamp:
Jun 20, 2011 12:48:28 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
72393
Message:

com: method for SafeArray -> RTCList

Location:
trunk/include/VBox/com
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/com/array.h

    r36186 r37553  
    168168#include "VBox/com/ptr.h"
    169169#include "VBox/com/assert.h"
     170#include "iprt/cpp/list.h"
    170171
    171172#ifdef VBOX_WITH_XPCOM
     
    10081009        return *this;
    10091010    }
     1011
     1012    /**
     1013     * Returns a copy of this SafeArray as RTCList<T>.
     1014     */
     1015        RTCList<T> toList()
     1016        {
     1017                RTCList<T> list(size());
     1018                for (size_t i = 0; i < size(); ++i)
     1019#ifdef VBOX_WITH_XPCOM
     1020                        list.append(m.arr[i]);
     1021#else
     1022                        list.append(m.raw[i]);
     1023#endif
     1024                return list;
     1025        }
    10101026
    10111027    inline void initFrom(const com::SafeArray<T> & aRef);
  • trunk/include/VBox/com/list.h

    r37547 r37553  
    196196};
    197197
    198 //template <typename T> RTCList<T> SafeArrayToRTCList(ComSafeArrayIn(T, other), T* = 0)
    199 //{
    200 //    com::SafeArray<T> sfaOther(ComSafeArrayInArg(other));
    201 //    RTCList<T> list(sfaOther.size());
    202 //    for (size_t i = 0; i < sfaOther.size(); ++i)
    203 //        list.append(sfaOther[i]);
    204 //    return list;
    205 //}
    206 
    207198#endif /* !___VBox_com_list_h */
    208199
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