Changeset 80793 in vbox for trunk/include/VBox/com
- Timestamp:
- Sep 15, 2019 11:27:47 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 133360
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/string.h
r76585 r80793 147 147 } 148 148 149 Bstr &operator=(const Bstr &that)149 Bstr &operator=(const Bstr &that) 150 150 { 151 151 cleanup(); … … 154 154 } 155 155 156 Bstr &operator=(CBSTR that)156 Bstr &operator=(CBSTR that) 157 157 { 158 158 cleanup(); … … 162 162 163 163 #if defined(VBOX_WITH_XPCOM) 164 Bstr &operator=(const wchar_t *that)164 Bstr &operator=(const wchar_t *that) 165 165 { 166 166 cleanup(); … … 170 170 #endif 171 171 172 Bstr &setNull()172 Bstr &setNull() 173 173 { 174 174 cleanup(); … … 301 301 size_t length() const { return isEmpty() ? 0 : ::RTUtf16Len((PRTUTF16)m_bstr); } 302 302 303 /** 304 * Assigns the output of the string format operation (RTStrPrintf). 305 * 306 * @param pszFormat Pointer to the format string, 307 * @see pg_rt_str_format. 308 * @param ... Ellipsis containing the arguments specified by 309 * the format string. 310 * 311 * @throws std::bad_alloc On allocation error. Object state is undefined. 312 * 313 * @returns Reference to the object. 314 */ 315 Bstr &printf(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2); 316 317 /** 318 * Assigns the output of the string format operation (RTStrPrintf). 319 * 320 * @param pszFormat Pointer to the format string, 321 * @see pg_rt_str_format. 322 * @param ... Ellipsis containing the arguments specified by 323 * the format string. 324 * 325 * @returns S_OK or E_OUTOFMEMORY 326 */ 327 HRESULT printfNoThrow(const char *pszFormat, ...) RT_NOEXCEPT RT_IPRT_FORMAT_ATTR(1, 2); 328 329 /** 330 * Assigns the output of the string format operation (RTStrPrintfV). 331 * 332 * @param pszFormat Pointer to the format string, 333 * @see pg_rt_str_format. 334 * @param va Argument vector containing the arguments 335 * specified by the format string. 336 * 337 * @throws std::bad_alloc On allocation error. Object state is undefined. 338 * 339 * @returns Reference to the object. 340 */ 341 Bstr &printfV(const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(1, 0); 342 343 /** 344 * Assigns the output of the string format operation (RTStrPrintfV). 345 * 346 * @param pszFormat Pointer to the format string, 347 * @see pg_rt_str_format. 348 * @param va Argument vector containing the arguments 349 * specified by the format string. 350 * 351 * @returns S_OK or E_OUTOFMEMORY 352 */ 353 HRESULT printfVNoThrow(const char *pszFormat, va_list va) RT_NOEXCEPT RT_IPRT_FORMAT_ATTR(1, 0); 354 303 355 #if defined(VBOX_WITH_XPCOM) 304 356 /** … … 522 574 */ 523 575 void copyFromN(const char *a_pszSrc, size_t a_cchSrc); 576 577 static DECLCALLBACK(size_t) printfOutputCallbackNoThrow(void *pvArg, const char *pachChars, size_t cbChars) RT_NOEXCEPT; 524 578 525 579 BSTR m_bstr;
Note:
See TracChangeset
for help on using the changeset viewer.