VirtualBox

Changeset 33605 in vbox for trunk/include


Ignore:
Timestamp:
Oct 29, 2010 1:13:58 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
67216
Message:

iprt/cpp/ministring: Added printf and printfV methods.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/cpp/ministring.h

    r33563 r33605  
    2929#include <iprt/mem.h>
    3030#include <iprt/string.h>
     31#include <iprt/stdarg.h>
    3132
    3233#include <new>
     
    211212
    212213    /**
     214     * Assigns the output of the string format operation (RTStrPrintf).
     215     *
     216     * @param   pszFormat       The format string.
     217     * @param   ...             Ellipsis containing the arguments specified by
     218     *                          the format string.
     219     *
     220     * @throws  std::bad_alloc  On allocation error.  The object is left unchanged.
     221     *
     222     * @returns Reference to the object.
     223     */
     224    MiniString &printf(const char *pszFormat, ...);
     225
     226    /**
     227     * Assigns the output of the string format operation (RTStrPrintfV).
     228     *
     229     * @param   pszFormat       The format string.
     230     * @param   va              Argument vector containing the arguments
     231     *                          specified by the format string.
     232     *
     233     * @throws  std::bad_alloc  On allocation error.  The object is left unchanged.
     234     *
     235     * @returns Reference to the object.
     236     */
     237    MiniString &printfV(const char *pszFormat, va_list va);
     238
     239    /**
    213240     * Appends the string "that" to "this".
    214241     *
     
    725752    }
    726753
    727     char    *m_psz;                     /**< The string buffer. */
     754    static DECLCALLBACK(size_t) printfOutputCallback(void *pvArg, const char *pachChars, size_t cbChars);
     755
     756    char   *m_psz;                      /**< The string buffer. */
    728757    size_t  m_cch;                      /**< strlen(m_psz) - i.e. no terminator included. */
    729758    size_t  m_cbAllocated;              /**< Size of buffer that m_psz points to; at least m_cbLength + 1. */
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