Changeset 10151 in vbox for trunk/include/VBox/com
- Timestamp:
- Jul 3, 2008 12:26:56 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/array.h
r8155 r10151 214 214 struct SafeArrayTraits 215 215 { 216 protected: 217 216 218 static void Init (T &aElem) { aElem = 0; } 217 219 static void Uninit (T &aElem) { aElem = 0; } 218 220 static void Copy (const T &aFrom, T &aTo) { aTo = aFrom; } 221 222 public: 219 223 220 224 /* Magic to workaround strict rules of par. 4.4.4 of the C++ standard (that … … 236 240 struct SafeArrayTraits <PRUnichar *> 237 241 { 242 protected: 243 238 244 static void Init (PRUnichar * &aElem) { aElem = NULL; } 239 245 static void Uninit (PRUnichar * &aElem) … … 252 258 } 253 259 260 public: 261 254 262 /* Magic to workaround strict rules of par. 4.4.4 of the C++ standard */ 255 263 static const PRUnichar **__asInParam_Arr (PRUnichar **aArr) … … 276 284 struct SafeArrayTraits <LONG> 277 285 { 286 protected: 287 278 288 static VARTYPE VarType() { return VT_I4; } 279 289 static void Copy (LONG aFrom, LONG &aTo) { aTo = aFrom; } … … 283 293 struct SafeArrayTraits <ULONG> 284 294 { 295 protected: 296 285 297 static VARTYPE VarType() { return VT_UI4; } 286 298 static void Copy (ULONG aFrom, ULONG &aTo) { aTo = aFrom; } … … 290 302 struct SafeArrayTraits <BSTR> 291 303 { 304 protected: 305 292 306 static VARTYPE VarType() { return VT_BSTR; } 293 307 … … 329 343 */ 330 344 template <typename T, class Traits = SafeArrayTraits <T> > 331 class SafeArray : p rotectedTraits345 class SafeArray : public Traits 332 346 { 333 347 public: … … 781 795 struct SafeIfaceArrayTraits 782 796 { 797 protected: 798 783 799 static void Init (I * &aElem) { aElem = NULL; } 784 800 static void Uninit (I * &aElem) … … 802 818 } 803 819 820 public: 821 804 822 /* Magic to workaround strict rules of par. 4.4.4 of the C++ standard. */ 805 823 static I **__asInParam_Arr (I **aArr) { return aArr; } … … 812 830 struct SafeIfaceArrayTraits 813 831 { 832 protected: 833 814 834 static VARTYPE VarType() { return VT_UNKNOWN; } 815 835
Note:
See TracChangeset
for help on using the changeset viewer.