VirtualBox

Changeset 36527 in vbox


Ignore:
Timestamp:
Apr 4, 2011 1:16:09 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70949
Message:

iprt::MiniString -> RTCString.

Location:
trunk
Files:
23 edited

Legend:

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

    r36429 r36527  
    7272 *
    7373 * The Bstr class hides all this handling behind a std::string-like interface
    74  * and also provides automatic conversions to MiniString and Utf8Str instances.
     74 * and also provides automatic conversions to RTCString and Utf8Str instances.
    7575 *
    7676 * The one advantage of using the SysString* routines is that this makes it
     
    117117#endif
    118118
    119     Bstr(const iprt::MiniString &that)
     119    Bstr(const RTCString &that)
    120120    {
    121121        copyFrom(that.c_str());
     
    426426 * String class used universally in Main for UTF-8 strings.
    427427 *
    428  * This is based on iprt::MiniString, to which some functionality has been
     428 * This is based on RTCString, to which some functionality has been
    429429 * moved.  Here we keep things that are specific to Main, such as conversions
    430430 * with UTF-16 strings (Bstr).
    431431 *
    432  * Like iprt::MiniString, Utf8Str does not differentiate between NULL strings
     432 * Like RTCString, Utf8Str does not differentiate between NULL strings
    433433 * and empty strings.  In other words, Utf8Str("") and Utf8Str(NULL) behave the
    434  * same.  In both cases, MiniString allocates no memory, reports
     434 * same.  In both cases, RTCString allocates no memory, reports
    435435 * a zero length and zero allocated bytes for both, and returns an empty
    436436 * C string from c_str().
     
    440440 *          from external sources before passing them to Utf8Str or Bstr.
    441441 */
    442 class Utf8Str : public iprt::MiniString
     442class Utf8Str : public RTCString
    443443{
    444444public:
     
    446446    Utf8Str() {}
    447447
    448     Utf8Str(const MiniString &that)
    449         : MiniString(that)
     448    Utf8Str(const RTCString &that)
     449        : RTCString(that)
    450450    {}
    451451
    452452    Utf8Str(const char *that)
    453         : MiniString(that)
     453        : RTCString(that)
    454454    {}
    455455
     
    472472     * @param   a_va            Argument vector containing the arguments
    473473     *                          specified by the format string.
    474      * @sa      iprt::MiniString::printfV
     474     * @sa      RTCString::printfV
    475475     */
    476476    Utf8Str(const char *a_pszFormat, va_list a_va)
    477         : MiniString(a_pszFormat, a_va)
    478     {
    479     }
    480 
    481     Utf8Str& operator=(const MiniString &that)
    482     {
    483         MiniString::operator=(that);
     477        : RTCString(a_pszFormat, a_va)
     478    {
     479    }
     480
     481    Utf8Str& operator=(const RTCString &that)
     482    {
     483        RTCString::operator=(that);
    484484        return *this;
    485485    }
     
    487487    Utf8Str& operator=(const char *that)
    488488    {
    489         MiniString::operator=(that);
     489        RTCString::operator=(that);
    490490        return *this;
    491491    }
     
    572572
    573573/**
    574  * Class with iprt::MiniString::printf as constructor for your convenience.
     574 * Class with RTCString::printf as constructor for your convenience.
    575575 *
    576576 * Constructing a Utf8Str string object from a format string and a variable
  • trunk/include/iprt/cpp/exception.h

    r36523 r36527  
    4949    }
    5050
    51     RTCError(const iprt::MiniString &a_rstrMessage)
     51    RTCError(const RTCString &a_rstrMessage)
    5252        : m_strMsg(a_rstrMessage)
    5353    {
     
    8787
    8888    /** The exception message. */
    89     iprt::MiniString m_strMsg;
     89    RTCString m_strMsg;
    9090};
    9191
  • trunk/include/iprt/cpp/list.h

    r36526 r36527  
    5454 * preallocated. To minimize the memory overhead, native types (that is
    5555 * everything smaller then the size of void*) are directly saved in the array.
    56  * If bigger types are used (e.g. iprt::MiniString) the internal array is an
    57  * array of pointers to the objects.
     56 * If bigger types are used (e.g. RTCString) the internal array is an array of
     57 * pointers to the objects.
    5858 *
    5959 * The size of the internal array will usually not shrink, but grow
  • trunk/include/iprt/cpp/ministring.h

    r36508 r36527  
    11/** @file
    2  * IPRT - Mini C++ string class.
     2 * IPRT - C++ string class.
    33 */
    44
     
    2424 */
    2525
    26 #ifndef ___VBox_ministring_h
    27 #define ___VBox_ministring_h
     26#ifndef ___iprt_cpp_ministring_h
     27#define ___iprt_cpp_ministring_h
    2828
    2929#include <iprt/mem.h>
     
    3434#include <new>
    3535
    36 namespace iprt
    37 {
    3836
    3937/** @defgroup grp_rt_cpp_string     C++ String support
     
    4240 */
    4341
    44 /** @brief  Mini C++ string class.
    45  *
    46  * "MiniString" is a small C++ string class that does not depend on anything
    47  * else except IPRT memory management functions.  Semantics are like in
    48  * std::string, except it can do a lot less.
    49  *
    50  * Note that MiniString does not differentiate between NULL strings and
    51  * empty strings. In other words, MiniString("") and MiniString(NULL)
    52  * behave the same. In both cases, MiniString allocates no memory, reports
     42/** @brief  C++ string class.
     43 *
     44 * This is a C++ string class that does not depend on anything else except IPRT
     45 * memory management functions.  Semantics are like in std::string, except it
     46 * can do a lot less.
     47 *
     48 * Note that RTCString does not differentiate between NULL strings
     49 * and empty strings.  In other words, RTCString("") and RTCString(NULL)
     50 * behave the same.  In both cases, RTCString allocates no memory, reports
    5351 * a zero length and zero allocated bytes for both, and returns an empty
    5452 * C string from c_str().
    5553 *
    56  * @note    MiniString ASSUMES that all strings it deals with are valid UTF-8.
     54 * @note    RTCString ASSUMES that all strings it deals with are valid UTF-8.
    5755 *          The caller is responsible for not breaking this assumption.
    5856 */
    5957#ifdef VBOX
    6058 /** @remarks Much of the code in here used to be in com::Utf8Str so that
    61   *          com::Utf8Str can now derive from MiniString and only contain code
     59  *          com::Utf8Str can now derive from RTCString and only contain code
    6260  *          that is COM-specific, such as com::Bstr conversions.  Compared to
    63   *          the old Utf8Str though, MiniString always knows the length of its
     61  *          the old Utf8Str though, RTCString always knows the length of its
    6462  *          member string and the size of the buffer so it can use memcpy()
    6563  *          instead of strdup().
    6664  */
    6765#endif
    68 class RT_DECL_CLASS MiniString
     66class RT_DECL_CLASS RTCString
    6967{
    7068public:
     
    7270     * Creates an empty string that has no memory allocated.
    7371     */
    74     MiniString()
     72    RTCString()
    7573        : m_psz(NULL),
    7674          m_cch(0),
     
    8078
    8179    /**
    82      * Creates a copy of another MiniString.
     80     * Creates a copy of another RTCString.
    8381     *
    8482     * This allocates s.length() + 1 bytes for the new instance, unless s is empty.
     
    8886     * @throws  std::bad_alloc
    8987     */
    90     MiniString(const MiniString &a_rSrc)
     88    RTCString(const RTCString &a_rSrc)
    9189    {
    9290        copyFromN(a_rSrc.m_psz, a_rSrc.m_cch);
     
    102100     * @throws  std::bad_alloc
    103101     */
    104     MiniString(const char *pcsz)
     102    RTCString(const char *pcsz)
    105103    {
    106104        copyFromN(pcsz, pcsz ? strlen(pcsz) : 0);
     
    108106
    109107    /**
    110      * Create a partial copy of another MiniString.
     108     * Create a partial copy of another RTCString.
    111109     *
    112110     * @param   a_rSrc          The source string.
     
    115113     *                          to copy from the source string.
    116114     */
    117     MiniString(const MiniString &a_rSrc, size_t a_offSrc, size_t a_cchSrc = npos)
     115    RTCString(const RTCString &a_rSrc, size_t a_offSrc, size_t a_cchSrc = npos)
    118116    {
    119117        if (a_offSrc < a_rSrc.m_cch)
     
    136134     *                          that for the va_list constructor.
    137135     */
    138     MiniString(const char *a_pszSrc, size_t a_cchSrc)
     136    RTCString(const char *a_pszSrc, size_t a_cchSrc)
    139137    {
    140138        size_t cchMax = a_pszSrc ? RTStrNLen(a_pszSrc, a_cchSrc) : 0;
     
    149147     * @param   a_ch            The character to fill the string with.
    150148     */
    151     MiniString(size_t a_cTimes, char a_ch)
     149    RTCString(size_t a_cTimes, char a_ch)
    152150        : m_psz(NULL),
    153151          m_cch(0),
     
    174172     * @remarks Not part of std::string.
    175173     */
    176     MiniString(const char *a_pszFormat, va_list a_va)
     174    RTCString(const char *a_pszFormat, va_list a_va)
    177175        : m_psz(NULL),
    178176          m_cch(0),
     
    185183     * Destructor.
    186184     */
    187     virtual ~MiniString()
     185    virtual ~RTCString()
    188186    {
    189187        cleanup();
     
    280278     * @returns Reference to the object.
    281279     */
    282     MiniString &operator=(const char *pcsz)
     280    RTCString &operator=(const char *pcsz)
    283281    {
    284282        if (m_psz != pcsz)
     
    300298     * @returns Reference to the object.
    301299     */
    302     MiniString &operator=(const MiniString &s)
     300    RTCString &operator=(const RTCString &s)
    303301    {
    304302        if (this != &s)
     
    322320     * @returns Reference to the object.
    323321     */
    324     MiniString &printf(const char *pszFormat, ...);
     322    RTCString &printf(const char *pszFormat, ...);
    325323
    326324    /**
     
    336334     * @returns Reference to the object.
    337335     */
    338     MiniString &printfV(const char *pszFormat, va_list va);
     336    RTCString &printfV(const char *pszFormat, va_list va);
    339337
    340338    /**
     
    347345     * @returns Reference to the object.
    348346     */
    349     MiniString &append(const MiniString &that);
     347    RTCString &append(const RTCString &that);
    350348
    351349    /**
     
    358356     * @returns Reference to the object.
    359357     */
    360     MiniString &append(const char *pszThat);
     358    RTCString &append(const char *pszThat);
    361359
    362360    /**
     
    369367     * @returns Reference to the object.
    370368     */
    371     MiniString &append(char ch);
     369    RTCString &append(char ch);
    372370
    373371    /**
     
    380378     * @returns Reference to the object.
    381379     */
    382     MiniString &appendCodePoint(RTUNICP uc);
    383 
    384     /**
    385      * Shortcut to append(), MiniString variant.
     380    RTCString &appendCodePoint(RTUNICP uc);
     381
     382    /**
     383     * Shortcut to append(), RTCString variant.
    386384     *
    387385     * @param that              The string to append.
     
    389387     * @returns Reference to the object.
    390388     */
    391     MiniString &operator+=(const MiniString &that)
     389    RTCString &operator+=(const RTCString &that)
    392390    {
    393391        return append(that);
     
    401399     * @returns                 Reference to the object.
    402400     */
    403     MiniString &operator+=(const char *pszThat)
     401    RTCString &operator+=(const char *pszThat)
    404402    {
    405403        return append(pszThat);
     
    413411     * @returns                 Reference to the object.
    414412     */
    415     MiniString &operator+=(char c)
     413    RTCString &operator+=(char c)
    416414    {
    417415        return append(c);
     
    423421     * @returns Reference to the object.
    424422     */
    425     MiniString &toUpper()
     423    RTCString &toUpper()
    426424    {
    427425        if (length())
     
    442440     * @returns Reference to the object.
    443441     */
    444     MiniString &toLower()
     442    RTCString &toLower()
    445443    {
    446444        if (length())
     
    494492     *         capacity() to find out how large that buffer is.
    495493     *      -# After any operation that modifies the length of the string,
    496      *         you _must_ call MiniString::jolt(), or subsequent copy operations
     494     *         you _must_ call RTCString::jolt(), or subsequent copy operations
    497495     *         may go nowhere.  Better not use mutableRaw() at all.
    498496     */
     
    582580
    583581    /**
    584      * Compares the member string to another MiniString.
     582     * Compares the member string to another RTCString.
    585583     *
    586584     * @param   pcszThat    The string to compare with.
     
    589587     *          if larger.
    590588     */
    591     int compare(const MiniString &that, CaseSensitivity cs = CaseSensitive) const
     589    int compare(const RTCString &that, CaseSensitivity cs = CaseSensitive) const
    592590    {
    593591        if (cs == CaseSensitive)
     
    602600     * @param   that    The string to compare with.
    603601     */
    604     bool equals(const MiniString &that) const
     602    bool equals(const RTCString &that) const
    605603    {
    606604        return that.length() == length()
     
    629627     * @param   that    The string to compare with.
    630628     */
    631     bool equalsIgnoreCase(const MiniString &that) const
     629    bool equalsIgnoreCase(const RTCString &that) const
    632630    {
    633631        /* Unfolded upper and lower case characters may require different
     
    653651    /** @name Comparison operators.
    654652     * @{  */
    655     bool operator==(const MiniString &that) const { return equals(that); }
    656     bool operator!=(const MiniString &that) const { return !equals(that); }
    657     bool operator<( const MiniString &that) const { return compare(that) < 0; }
    658     bool operator>( const MiniString &that) const { return compare(that) > 0; }
     653    bool operator==(const RTCString &that) const { return equals(that); }
     654    bool operator!=(const RTCString &that) const { return !equals(that); }
     655    bool operator<( const RTCString &that) const { return compare(that) < 0; }
     656    bool operator>( const RTCString &that) const { return compare(that) > 0; }
    659657
    660658    bool operator==(const char *pszThat) const    { return equals(pszThat); }
     
    709707     *                          n bytes have been copied.
    710708     */
    711     iprt::MiniString substr(size_t pos = 0, size_t n = npos) const
    712     {
    713         return MiniString(*this, pos, n);
     709    RTCString substr(size_t pos = 0, size_t n = npos) const
     710    {
     711        return RTCString(*this, pos, n);
    714712    }
    715713
     
    725723     *                          been copied.
    726724     */
    727     iprt::MiniString substrCP(size_t pos = 0, size_t n = npos) const;
     725    RTCString substrCP(size_t pos = 0, size_t n = npos) const;
    728726
    729727    /**
     
    734732     * @returns true if match, false if mismatch.
    735733     */
    736     bool endsWith(const iprt::MiniString &that, CaseSensitivity cs = CaseSensitive) const;
     734    bool endsWith(const RTCString &that, CaseSensitivity cs = CaseSensitive) const;
    737735
    738736    /**
     
    742740     * @returns true if match, false if mismatch.
    743741     */
    744     bool startsWith(const iprt::MiniString &that, CaseSensitivity cs = CaseSensitive) const;
     742    bool startsWith(const RTCString &that, CaseSensitivity cs = CaseSensitive) const;
    745743
    746744    /**
     
    751749     * @returns true if match, false if mismatch.
    752750     */
    753     bool contains(const iprt::MiniString &that, CaseSensitivity cs = CaseSensitive) const;
     751    bool contains(const RTCString &that, CaseSensitivity cs = CaseSensitive) const;
    754752
    755753    /**
     
    827825     * @returns separated strings as string list.
    828826     */
    829     iprt::list<iprt::MiniString, iprt::MiniString *> split(const iprt::MiniString &a_rstrSep,
    830                                                            SplitMode a_enmMode = RemoveEmptyParts);
     827    iprt::list<RTCString, RTCString *> split(const RTCString &a_rstrSep,
     828                                             SplitMode a_enmMode = RemoveEmptyParts);
    831829
    832830    /**
     
    837835     * @returns joined string.
    838836     */
    839     static iprt::MiniString join(const iprt::list<iprt::MiniString, iprt::MiniString *> &a_rList,
    840                                  const iprt::MiniString &a_rstrSep = "");
     837    static RTCString join(const iprt::list<RTCString, RTCString *> &a_rList,
     838                          const RTCString &a_rstrSep = "");
    841839
    842840protected:
     
    917915/** @} */
    918916
    919 } /* namespace iprt */
    920917
    921918/** @addtogroup grp_rt_cpp_string
     
    930927 * @returns the concatenate string.
    931928 *
    932  * @relates iprt::MiniString
     929 * @relates RTCString
    933930 */
    934 RTDECL(const iprt::MiniString) operator+(const iprt::MiniString &a_rstr1, const iprt::MiniString &a_rstr2);
     931RTDECL(const RTCString) operator+(const RTCString &a_rstr1, const RTCString &a_rstr2);
    935932
    936933/**
     
    941938 * @returns the concatenate string.
    942939 *
    943  * @relates iprt::MiniString
     940 * @relates RTCString
    944941 */
    945 RTDECL(const iprt::MiniString) operator+(const iprt::MiniString &a_rstr1, const char *a_psz2);
     942RTDECL(const RTCString) operator+(const RTCString &a_rstr1, const char *a_psz2);
    946943
    947944/**
     
    952949 * @returns the concatenate string.
    953950 *
    954  * @relates iprt::MiniString
     951 * @relates RTCString
    955952 */
    956 RTDECL(const iprt::MiniString) operator+(const char *a_psz1, const iprt::MiniString &a_rstr2);
     953RTDECL(const RTCString) operator+(const char *a_psz1, const RTCString &a_rstr2);
    957954
    958955/** @} */
  • trunk/include/iprt/cpp/xml.h

    r36523 r36527  
    465465    const AttributeNode* findAttribute(const char *pcszMatch) const;
    466466    bool getAttributeValue(const char *pcszMatch, const char *&ppcsz) const;
    467     bool getAttributeValue(const char *pcszMatch, iprt::MiniString &str) const;
    468     bool getAttributeValuePath(const char *pcszMatch, iprt::MiniString &str) const;
     467    bool getAttributeValue(const char *pcszMatch, RTCString &str) const;
     468    bool getAttributeValuePath(const char *pcszMatch, RTCString &str) const;
    469469    bool getAttributeValue(const char *pcszMatch, int32_t &i) const;
    470470    bool getAttributeValue(const char *pcszMatch, uint32_t &i) const;
     
    476476
    477477    ContentNode* addContent(const char *pcszContent);
    478     ContentNode* addContent(const iprt::MiniString &strContent)
     478    ContentNode* addContent(const RTCString &strContent)
    479479    {
    480480        return addContent(strContent.c_str());
     
    482482
    483483    AttributeNode* setAttribute(const char *pcszName, const char *pcszValue);
    484     AttributeNode* setAttribute(const char *pcszName, const iprt::MiniString &strValue)
     484    AttributeNode* setAttribute(const char *pcszName, const RTCString &strValue)
    485485    {
    486486        return setAttribute(pcszName, strValue.c_str());
    487487    }
    488     AttributeNode* setAttributePath(const char *pcszName, const iprt::MiniString &strValue);
     488    AttributeNode* setAttributePath(const char *pcszName, const RTCString &strValue);
    489489    AttributeNode* setAttribute(const char *pcszName, int32_t i);
    490490    AttributeNode* setAttribute(const char *pcszName, uint32_t i);
     
    550550    AttributeNode(const AttributeNode &x);      // no copying
    551551
    552     iprt::MiniString    m_strKey;
     552    RTCString    m_strKey;
    553553
    554554    friend class Node;
     
    651651    ~XmlMemParser();
    652652
    653     void read(const void* pvBuf, size_t cbSize, const iprt::MiniString &strFilename, Document &doc);
     653    void read(const void* pvBuf, size_t cbSize, const RTCString &strFilename, Document &doc);
    654654};
    655655
     
    665665    ~XmlFileParser();
    666666
    667     void read(const iprt::MiniString &strFilename, Document &doc);
     667    void read(const RTCString &strFilename, Document &doc);
    668668
    669669private:
  • trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp

    r36303 r36527  
    19281928    bool                fEnable        = false;
    19291929    bool                fFlagsPresent  = false;
    1930     iprt::MiniString    strFlags;
     1930    RTCString    strFlags;
    19311931    bool                fGroupsPresent = false;
    1932     iprt::MiniString    strGroups;
     1932    RTCString    strGroups;
    19331933    bool                fDestsPresent  = false;
    1934     iprt::MiniString    strDests;
     1934    RTCString    strDests;
    19351935
    19361936    static const RTGETOPTDEF s_aOptions[] =
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp

    r33540 r36527  
    256256
    257257        char *pszAbsFilePath;
    258         if (strOvfFilename.startsWith("S3://", iprt::MiniString::CaseInsensitive) ||
    259             strOvfFilename.startsWith("SunCloud://", iprt::MiniString::CaseInsensitive) ||
    260             strOvfFilename.startsWith("webdav://", iprt::MiniString::CaseInsensitive))
     258        if (strOvfFilename.startsWith("S3://", RTCString::CaseInsensitive) ||
     259            strOvfFilename.startsWith("SunCloud://", RTCString::CaseInsensitive) ||
     260            strOvfFilename.startsWith("webdav://", RTCString::CaseInsensitive))
    261261            pszAbsFilePath = RTStrDup(strOvfFilename.c_str());
    262262        else
     
    928928
    929929        char *pszAbsFilePath = 0;
    930         if (strOutputFile.startsWith("S3://", iprt::MiniString::CaseInsensitive) ||
    931             strOutputFile.startsWith("SunCloud://", iprt::MiniString::CaseInsensitive) ||
    932             strOutputFile.startsWith("webdav://", iprt::MiniString::CaseInsensitive))
     930        if (strOutputFile.startsWith("S3://", RTCString::CaseInsensitive) ||
     931            strOutputFile.startsWith("SunCloud://", RTCString::CaseInsensitive) ||
     932            strOutputFile.startsWith("webdav://", RTCString::CaseInsensitive))
    933933            pszAbsFilePath = RTStrDup(strOutputFile.c_str());
    934934        else
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp

    r35823 r36527  
    336336    {
    337337        Utf8Str strFormat(format);
    338         if (strFormat.compare("vmdk", iprt::MiniString::CaseInsensitive) == 0)
     338        if (strFormat.compare("vmdk", RTCString::CaseInsensitive) == 0)
    339339            strName.append(".vmdk");
    340         else if (strFormat.compare("vhd", iprt::MiniString::CaseInsensitive) == 0)
     340        else if (strFormat.compare("vhd", RTCString::CaseInsensitive) == 0)
    341341            strName.append(".vhd");
    342342        else
  • trunk/src/VBox/Main/glue/string.cpp

    r36429 r36527  
    151151 *                          is valid UTF-16.
    152152 *
    153  * @sa      iprt::MiniString::copyFromN
     153 * @sa      RTCString::copyFromN
    154154 */
    155155void Utf8Str::copyFrom(CBSTR a_pbstr)
  • trunk/src/VBox/Main/include/ExtPackUtil.h

    r35523 r36527  
    6666{
    6767    /** The name. */
    68     iprt::MiniString        strName;
     68    RTCString        strName;
    6969    /** The module name. */
    70     iprt::MiniString        strModule;
     70    RTCString        strModule;
    7171    /** The description. */
    72     iprt::MiniString        strDescription;
     72    RTCString        strDescription;
    7373    /** The frontend or component which it plugs into. */
    74     iprt::MiniString        strFrontend;
     74    RTCString        strFrontend;
    7575} VBOXEXTPACKPLUGINDESC;
    7676/** Pointer to a plug-in descriptor. */
     
    8585{
    8686    /** The name. */
    87     iprt::MiniString        strName;
     87    RTCString        strName;
    8888    /** The description. */
    89     iprt::MiniString        strDescription;
     89    RTCString        strDescription;
    9090    /** The version string. */
    91     iprt::MiniString        strVersion;
     91    RTCString        strVersion;
    9292    /** The internal revision number. */
    9393    uint32_t                uRevision;
    9494    /** The name of the main module. */
    95     iprt::MiniString        strMainModule;
     95    RTCString        strMainModule;
    9696    /** The name of the VRDE module, empty if none. */
    97     iprt::MiniString        strVrdeModule;
     97    RTCString        strVrdeModule;
    9898    /** The number of plug-in descriptors. */
    9999    uint32_t                cPlugIns;
     
    111111
    112112void                VBoxExtPackInitDesc(PVBOXEXTPACKDESC a_pExtPackDesc);
    113 iprt::MiniString   *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
    114 iprt::MiniString   *VBoxExtPackLoadDescFromVfsFile(RTVFSFILE hVfsFile, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
    115 iprt::MiniString   *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball);
     113RTCString   *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
     114RTCString   *VBoxExtPackLoadDescFromVfsFile(RTVFSFILE hVfsFile, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
     115RTCString   *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball);
    116116void                VBoxExtPackFreeDesc(PVBOXEXTPACKDESC a_pExtPackDesc);
    117117bool                VBoxExtPackIsValidName(const char *pszName);
    118118bool                VBoxExtPackIsValidMangledName(const char *pszMangledName, size_t cchMax = RTSTR_MAX);
    119 iprt::MiniString   *VBoxExtPackMangleName(const char *pszName);
    120 iprt::MiniString   *VBoxExtPackUnmangleName(const char *pszMangledName, size_t cbMax);
     119RTCString   *VBoxExtPackMangleName(const char *pszName);
     120RTCString   *VBoxExtPackUnmangleName(const char *pszMangledName, size_t cbMax);
    121121int                 VBoxExtPackCalcDir(char *pszExtPackDir, size_t cbExtPackDir, const char *pszParentDir, const char *pszName);
    122122bool                VBoxExtPackIsValidVersionString(const char *pszName);
  • trunk/src/VBox/Main/include/HostHardwareLinux.h

    r34341 r36527  
    11/* $Id$ */
    22/** @file
    3  * Classes for handling hardware detection under Linux.
     3 * VirtualBox Main - Classes for handling hardware detection under Linux.
    44 *
    55 * Please feel free to expand these to work for other systems (Solaris!) or to
     
    4040    {
    4141        /** The device node of the drive. */
    42         iprt::MiniString mDevice;
     42        RTCString mDevice;
    4343        /** A unique identifier for the device, if available.  This should be
    4444         * kept consistent across different probing methods of a given
    4545         * platform if at all possible. */
    46         iprt::MiniString mUdi;
     46        RTCString mUdi;
    4747        /** A textual description of the drive. */
    48         iprt::MiniString mDescription;
     48        RTCString mDescription;
    4949
    5050        /** Constructors */
    51         DriveInfo(const iprt::MiniString &aDevice,
    52                   const iprt::MiniString &aUdi = "",
    53                   const iprt::MiniString &aDescription = "")
     51        DriveInfo(const RTCString &aDevice,
     52                  const RTCString &aUdi = "",
     53                  const RTCString &aDescription = "")
    5454            : mDevice(aDevice),
    5555              mUdi(aUdi),
  • trunk/src/VBox/Main/include/Performance.h

    r36128 r36527  
    11/* $Id$ */
    2 
    32/** @file
    4  *
    5  * VBox Performance Classes declaration.
     3 * VirtualBox Main - Performance Classes declaration.
    64 */
    75
     
    534532
    535533    private:
    536         iprt::MiniString mName;
     534        RTCString mName;
    537535        BaseMetric *mBaseMetric;
    538536        SubMetric  *mSubMetric;
     
    549547        static bool patternMatch(const char *pszPat, const char *pszName,
    550548                                 bool fSeenColon = false);
    551         bool match(const ComPtr<IUnknown> object, const iprt::MiniString &name) const;
     549        bool match(const ComPtr<IUnknown> object, const RTCString &name) const;
    552550    private:
    553551        void init(ComSafeArrayIn(IN_BSTR, metricNames),
    554552                  ComSafeArrayIn(IUnknown * , objects));
    555553
    556         typedef std::pair<const ComPtr<IUnknown>, const iprt::MiniString> FilterElement;
     554        typedef std::pair<const ComPtr<IUnknown>, const RTCString> FilterElement;
    557555        typedef std::list<FilterElement> ElementList;
    558556
  • trunk/src/VBox/Main/include/ovfreader.h

    r35536 r36527  
    11/* $Id$ */
    22/** @file
    3  * OVF reader declarations.
     3 * VirtualBox Main - OVF reader declarations.
    44 *
    5  * Depends only on IPRT, including the iprt::MiniString and IPRT XML classes.
     5 * Depends only on IPRT, including the RTCString and IPRT XML classes.
    66 */
    77
     
    160160{
    161161    // fields from /DiskSection/Disk
    162     iprt::MiniString strDiskId;     // value from DiskSection/Disk/@diskId
     162    RTCString strDiskId;     // value from DiskSection/Disk/@diskId
    163163    int64_t iCapacity;              // value from DiskSection/Disk/@capacity;
    164164                                    // (maximum size for dynamic images, I guess; we always translate this to bytes)
     
    166166                                    // (actual used size of disk, always in bytes; can be an estimate of used disk
    167167                                    // space, but cannot be larger than iCapacity; -1 if not set)
    168     iprt::MiniString strFormat;              // value from DiskSection/Disk/@format
     168    RTCString strFormat;              // value from DiskSection/Disk/@format
    169169                // typically http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized
    170     iprt::MiniString uuidVbox;      // optional; if the file was exported by VirtualBox >= 3.2,
     170    RTCString uuidVbox;      // optional; if the file was exported by VirtualBox >= 3.2,
    171171                                    // then this has the UUID with which the disk was registered
    172172
    173173    // fields from /References/File; the spec says the file reference from disk can be empty,
    174174    // so in that case, strFilename will be empty, then a new disk should be created
    175     iprt::MiniString strHref;       // value from /References/File/@href (filename); if empty, then the remaining fields are ignored
     175    RTCString strHref;       // value from /References/File/@href (filename); if empty, then the remaining fields are ignored
    176176    int64_t iSize;                  // value from /References/File/@size (optional according to spec; then we set -1 here)
    177177    int64_t iChunkSize;             // value from /References/File/@chunkSize (optional, unsupported)
    178     iprt::MiniString strCompression; // value from /References/File/@compression (optional, can be "gzip" according to spec)
     178    RTCString strCompression; // value from /References/File/@compression (optional, can be "gzip" according to spec)
    179179
    180180    // additional field which has a descriptive size in megabytes derived from the above; this can be used for progress reports
     
    207207struct VirtualHardwareItem
    208208{
    209     iprt::MiniString strDescription;
    210     iprt::MiniString strCaption;
    211     iprt::MiniString strElementName;
     209    RTCString strDescription;
     210    RTCString strCaption;
     211    RTCString strElementName;
    212212
    213213    uint32_t ulInstanceID;
     
    215215
    216216    ResourceType_T resourceType;
    217     iprt::MiniString strOtherResourceType;
    218     iprt::MiniString strResourceSubType;
     217    RTCString strOtherResourceType;
     218    RTCString strResourceSubType;
    219219    bool fResourceRequired;
    220220
    221     iprt::MiniString strHostResource;   // "Abstractly specifies how a device shall connect to a resource on the deployment platform.
     221    RTCString strHostResource;   // "Abstractly specifies how a device shall connect to a resource on the deployment platform.
    222222                                        // Not all devices need a backing." Used with disk items, for which this references a virtual
    223223                                        // disk from the Disks section.
    224224    bool fAutomaticAllocation;
    225225    bool fAutomaticDeallocation;
    226     iprt::MiniString strConnection;     // "All Ethernet adapters that specify the same abstract network connection name within an OVF
     226    RTCString strConnection;     // "All Ethernet adapters that specify the same abstract network connection name within an OVF
    227227                                        // package shall be deployed on the same network. The abstract network connection name shall be
    228228                                        // listed in the NetworkSection at the outermost envelope level." We ignore this and only set up
    229229                                        // a network adapter depending on the network name.
    230     iprt::MiniString strAddress;        // "Device-specific. For an Ethernet adapter, this specifies the MAC address."
     230    RTCString strAddress;        // "Device-specific. For an Ethernet adapter, this specifies the MAC address."
    231231    int32_t lAddress;                   // strAddress as an integer, if applicable.
    232     iprt::MiniString strAddressOnParent;         // "For a device, this specifies its location on the controller."
    233     iprt::MiniString strAllocationUnits;         // "Specifies the units of allocation used. For example, “byte * 2^20”."
     232    RTCString strAddressOnParent;         // "For a device, this specifies its location on the controller."
     233    RTCString strAllocationUnits;         // "Specifies the units of allocation used. For example, “byte * 2^20”."
    234234    uint64_t ullVirtualQuantity;        // "Specifies the quantity of resources presented. For example, “256”."
    235235    uint64_t ullReservation;            // "Specifies the minimum quantity of resources guaranteed to be available."
     
    237237    uint64_t ullWeight;                 // "Specifies a relative priority for this allocation in relation to other allocations."
    238238
    239     iprt::MiniString strConsumerVisibility;
    240     iprt::MiniString strMappingBehavior;
    241     iprt::MiniString strPoolID;
     239    RTCString strConsumerVisibility;
     240    RTCString strMappingBehavior;
     241    RTCString strPoolID;
    242242    uint32_t ulBusNumber;               // seen with IDE controllers, but not listed in OVF spec
    243243
     
    257257};
    258258
    259 typedef std::map<iprt::MiniString, DiskImage> DiskImagesMap;
     259typedef std::map<RTCString, DiskImage> DiskImagesMap;
    260260
    261261struct VirtualSystem;
     
    270270    ControllerSystemType    system;             // one of IDE, SATA, SCSI
    271271
    272     iprt::MiniString        strControllerType;
     272    RTCString        strControllerType;
    273273            // controller subtype (Item/ResourceSubType); e.g. "LsiLogic"; can be empty (esp. for IDE)
    274274            // note that we treat LsiLogicSAS as a SCSI controller (system == SCSI) even though VirtualBox
     
    296296    uint32_t            ulAddressOnParent;      // parsed strAddressOnParent of hardware item; will be 0 or 1 for IDE
    297297                                                // and possibly higher for disks attached to SCSI controllers (untested)
    298     iprt::MiniString    strDiskId;              // if the hard disk has an ovf:/disk/<id> reference,
     298    RTCString    strDiskId;              // if the hard disk has an ovf:/disk/<id> reference,
    299299                                                // this receives the <id> component; points to one of the
    300300                                                // references in Appliance::Data.mapDisks
    301301};
    302302
    303 typedef std::map<iprt::MiniString, VirtualDisk> VirtualDisksMap;
     303typedef std::map<RTCString, VirtualDisk> VirtualDisksMap;
    304304
    305305/**
     
    309309struct EthernetAdapter
    310310{
    311     iprt::MiniString    strAdapterType;         // "PCNet32" or "E1000" or whatever; from <rasd:ResourceSubType>
    312     iprt::MiniString    strNetworkName;         // from <rasd:Connection>
     311    RTCString    strAdapterType;         // "PCNet32" or "E1000" or whatever; from <rasd:ResourceSubType>
     312    RTCString    strNetworkName;         // from <rasd:Connection>
    313313};
    314314
     
    321321struct VirtualSystem
    322322{
    323     iprt::MiniString    strName;                // copy of VirtualSystem/@id
    324 
    325     iprt::MiniString    strDescription;         // copy of VirtualSystem/AnnotationSection content, if any
     323    RTCString    strName;                // copy of VirtualSystem/@id
     324
     325    RTCString    strDescription;         // copy of VirtualSystem/AnnotationSection content, if any
    326326
    327327    CIMOSType_T         cimos;
    328     iprt::MiniString    strCimosDesc;           // readable description of the cimos type in the case of cimos = 0/1/102
    329     iprt::MiniString    strTypeVbox;            // optional type from @vbox:ostype attribute (VirtualBox 4.0 or higher)
    330 
    331     iprt::MiniString    strVirtualSystemType;   // generic hardware description; OVF says this can be something like "vmx-4" or "xen";
     328    RTCString    strCimosDesc;           // readable description of the cimos type in the case of cimos = 0/1/102
     329    RTCString    strTypeVbox;            // optional type from @vbox:ostype attribute (VirtualBox 4.0 or higher)
     330
     331    RTCString    strVirtualSystemType;   // generic hardware description; OVF says this can be something like "vmx-4" or "xen";
    332332                                                // VMware Workstation 6.5 is "vmx-07"
    333333
     
    350350    bool                fHasUsbController;      // true if there's a USB controller item in mapHardwareItems
    351351
    352     iprt::MiniString    strSoundCardType;       // if not empty, then the system wants a soundcard; this then specifies the hardware;
     352    RTCString    strSoundCardType;       // if not empty, then the system wants a soundcard; this then specifies the hardware;
    353353                                                // VMware Workstation 6.5 uses "ensoniq1371" for example
    354354
    355     iprt::MiniString    strLicenseText;         // license info if any; receives contents of VirtualSystem/EulaSection/License
    356 
    357     iprt::MiniString    strProduct;             // product info if any; receives contents of VirtualSystem/ProductSection/Product
    358     iprt::MiniString    strVendor;              // product info if any; receives contents of VirtualSystem/ProductSection/Vendor
    359     iprt::MiniString    strVersion;             // product info if any; receives contents of VirtualSystem/ProductSection/Version
    360     iprt::MiniString    strProductUrl;          // product info if any; receives contents of VirtualSystem/ProductSection/ProductUrl
    361     iprt::MiniString    strVendorUrl;           // product info if any; receives contents of VirtualSystem/ProductSection/VendorUrl
     355    RTCString    strLicenseText;         // license info if any; receives contents of VirtualSystem/EulaSection/License
     356
     357    RTCString    strProduct;             // product info if any; receives contents of VirtualSystem/ProductSection/Product
     358    RTCString    strVendor;              // product info if any; receives contents of VirtualSystem/ProductSection/Vendor
     359    RTCString    strVersion;             // product info if any; receives contents of VirtualSystem/ProductSection/Version
     360    RTCString    strProductUrl;          // product info if any; receives contents of VirtualSystem/ProductSection/ProductUrl
     361    RTCString    strVendorUrl;           // product info if any; receives contents of VirtualSystem/ProductSection/VendorUrl
    362362
    363363    const xml::ElementNode                      // pointer to <vbox:Machine> element under <VirtualSystem> element or NULL if not present
     
    408408{
    409409public:
    410     OVFReader(const void *pvBuf, size_t cbSize, const iprt::MiniString &path);
    411     OVFReader(const iprt::MiniString &path);
     410    OVFReader(const void *pvBuf, size_t cbSize, const RTCString &path);
     411    OVFReader(const RTCString &path);
    412412
    413413    // Data fields
    414     iprt::MiniString            m_strPath;            // file name given to constructor
     414    RTCString            m_strPath;            // file name given to constructor
    415415    DiskImagesMap               m_mapDisks;           // map of DiskImage structs, sorted by DiskImage.strDiskId
    416416    std::list<VirtualSystem>    m_llVirtualSystems;   // list of virtual systems, created by and valid after read()
  • trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp

    r35934 r36527  
    242242    m->pVirtualBox                  = a_pVirtualBox;
    243243
    244     iprt::MiniString *pstrTarName = VBoxExtPackExtractNameFromTarballPath(a_pszFile);
     244    RTCString *pstrTarName = VBoxExtPackExtractNameFromTarballPath(a_pszFile);
    245245    if (pstrTarName)
    246246    {
     
    284284     * Parse the XML.
    285285     */
    286     iprt::MiniString strSavedName(m->Desc.strName);
    287     iprt::MiniString *pStrLoadErr = VBoxExtPackLoadDescFromVfsFile(hXmlFile, &m->Desc, &m->ObjInfoDesc);
     286    RTCString strSavedName(m->Desc.strName);
     287    RTCString *pStrLoadErr = VBoxExtPackLoadDescFromVfsFile(hXmlFile, &m->Desc, &m->ObjInfoDesc);
    288288    RTVfsFileRelease(hXmlFile);
    289289    if (pStrLoadErr != NULL)
     
    12251225     * Read the description file.
    12261226     */
    1227     iprt::MiniString strSavedName(m->Desc.strName);
    1228     iprt::MiniString *pStrLoadErr = VBoxExtPackLoadDesc(m->strExtPackPath.c_str(), &m->Desc, &m->ObjInfoDesc);
     1227    RTCString strSavedName(m->Desc.strName);
     1228    RTCString *pStrLoadErr = VBoxExtPackLoadDesc(m->strExtPackPath.c_str(), &m->Desc, &m->ObjInfoDesc);
    12291229    if (pStrLoadErr != NULL)
    12301230    {
     
    19031903                if (RT_SUCCESS(vrc))
    19041904                {
    1905                     iprt::MiniString *pstrName = VBoxExtPackUnmangleName(Entry.szName, RTSTR_MAX);
     1905                    RTCString *pstrName = VBoxExtPackUnmangleName(Entry.szName, RTSTR_MAX);
    19061906                    AssertLogRel(pstrName);
    19071907                    if (pstrName)
     
    25632563{
    25642564    AssertReturn(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON, E_UNEXPECTED);
    2565     iprt::MiniString const * const pStrName     = &a_pExtPackFile->m->Desc.strName;
    2566     iprt::MiniString const * const pStrTarball  = &a_pExtPackFile->m->strExtPackFile;
     2565    RTCString const * const pStrName     = &a_pExtPackFile->m->Desc.strName;
     2566    RTCString const * const pStrTarball  = &a_pExtPackFile->m->strExtPackFile;
    25672567
    25682568    AutoCaller autoCaller(this);
  • trunk/src/VBox/Main/src-all/ExtPackUtil.cpp

    r35523 r36527  
    4747 *                              (RTMemFree it even on failure)
    4848 */
    49 static iprt::MiniString *
     49static RTCString *
    5050vboxExtPackLoadPlugInDescs(const xml::ElementNode *pVBoxExtPackElm,
    5151                           uint32_t *pcPlugIns, PVBOXEXTPACKPLUGINDESC *paPlugIns)
     
    9898 * @param   a_pExtPackDesc      Where to store the extension pack descriptor.
    9999 */
    100 static iprt::MiniString *vboxExtPackLoadDescFromDoc(xml::Document *a_pDoc, PVBOXEXTPACKDESC a_pExtPackDesc)
     100static RTCString *vboxExtPackLoadDescFromDoc(xml::Document *a_pDoc, PVBOXEXTPACKDESC a_pExtPackDesc)
    101101{
    102102    /*
     
    106106    if (   !pVBoxExtPackElm
    107107        || strcmp(pVBoxExtPackElm->getName(), "VirtualBoxExtensionPack") != 0)
    108         return new iprt::MiniString("No VirtualBoxExtensionPack element");
    109 
    110     iprt::MiniString strFormatVersion;
     108        return new RTCString("No VirtualBoxExtensionPack element");
     109
     110    RTCString strFormatVersion;
    111111    if (!pVBoxExtPackElm->getAttributeValue("version", strFormatVersion))
    112         return new iprt::MiniString("Missing format version");
     112        return new RTCString("Missing format version");
    113113    if (!strFormatVersion.equals("1.0"))
    114         return &(new iprt::MiniString("Unsupported format version: "))->append(strFormatVersion);
     114        return &(new RTCString("Unsupported format version: "))->append(strFormatVersion);
    115115
    116116    /*
     
    119119    const xml::ElementNode *pNameElm = pVBoxExtPackElm->findChildElement("Name");
    120120    if (!pNameElm)
    121         return new iprt::MiniString("The 'Name' element is missing");
     121        return new RTCString("The 'Name' element is missing");
    122122    const char *pszName = pNameElm->getValue();
    123123    if (!VBoxExtPackIsValidName(pszName))
    124         return &(new iprt::MiniString("Invalid name: "))->append(pszName);
     124        return &(new RTCString("Invalid name: "))->append(pszName);
    125125
    126126    const xml::ElementNode *pDescElm = pVBoxExtPackElm->findChildElement("Description");
    127127    if (!pDescElm)
    128         return new iprt::MiniString("The 'Description' element is missing");
     128        return new RTCString("The 'Description' element is missing");
    129129    const char *pszDesc = pDescElm->getValue();
    130130    if (!pszDesc || *pszDesc == '\0')
    131         return new iprt::MiniString("The 'Description' element is empty");
     131        return new RTCString("The 'Description' element is empty");
    132132    if (strpbrk(pszDesc, "\n\r\t\v\b") != NULL)
    133         return new iprt::MiniString("The 'Description' must not contain control characters");
     133        return new RTCString("The 'Description' must not contain control characters");
    134134
    135135    const xml::ElementNode *pVersionElm = pVBoxExtPackElm->findChildElement("Version");
    136136    if (!pVersionElm)
    137         return new iprt::MiniString("The 'Version' element is missing");
     137        return new RTCString("The 'Version' element is missing");
    138138    const char *pszVersion = pVersionElm->getValue();
    139139    if (!pszVersion || *pszVersion == '\0')
    140         return new iprt::MiniString("The 'Version' element is empty");
     140        return new RTCString("The 'Version' element is empty");
    141141    if (!VBoxExtPackIsValidVersionString(pszVersion))
    142         return &(new iprt::MiniString("Invalid version string: "))->append(pszVersion);
     142        return &(new RTCString("Invalid version string: "))->append(pszVersion);
    143143
    144144    uint32_t uRevision;
     
    148148    const xml::ElementNode *pMainModuleElm = pVBoxExtPackElm->findChildElement("MainModule");
    149149    if (!pMainModuleElm)
    150         return new iprt::MiniString("The 'MainModule' element is missing");
     150        return new RTCString("The 'MainModule' element is missing");
    151151    const char *pszMainModule = pMainModuleElm->getValue();
    152152    if (!pszMainModule || *pszMainModule == '\0')
    153         return new iprt::MiniString("The 'MainModule' element is empty");
     153        return new RTCString("The 'MainModule' element is empty");
    154154    if (!VBoxExtPackIsValidModuleString(pszMainModule))
    155         return &(new iprt::MiniString("Invalid main module string: "))->append(pszMainModule);
     155        return &(new RTCString("Invalid main module string: "))->append(pszMainModule);
    156156
    157157    /*
     
    167167            pszVrdeModule = NULL;
    168168        else if (!VBoxExtPackIsValidModuleString(pszVrdeModule))
    169             return &(new iprt::MiniString("Invalid VRDE module string: "))->append(pszVrdeModule);
     169            return &(new RTCString("Invalid VRDE module string: "))->append(pszVrdeModule);
    170170    }
    171171
     
    181181    uint32_t                cPlugIns  = 0;
    182182    PVBOXEXTPACKPLUGINDESC  paPlugIns = NULL;
    183     iprt::MiniString *pstrRet = vboxExtPackLoadPlugInDescs(pVBoxExtPackElm, &cPlugIns, &paPlugIns);
     183    RTCString *pstrRet = vboxExtPackLoadPlugInDescs(pVBoxExtPackElm, &cPlugIns, &paPlugIns);
    184184    if (pstrRet)
    185185    {
     
    214214 *                          attribs). Optional.
    215215 */
    216 iprt::MiniString *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo)
     216RTCString *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo)
    217217{
    218218    vboxExtPackClearDesc(a_pExtPackDesc);
     
    224224    int vrc = RTPathJoin(szFilePath, sizeof(szFilePath), a_pszDir, VBOX_EXTPACK_DESCRIPTION_NAME);
    225225    if (RT_FAILURE(vrc))
    226         return new iprt::MiniString("RTPathJoin failed with %Rrc", vrc);
     226        return new RTCString("RTPathJoin failed with %Rrc", vrc);
    227227
    228228    RTFSOBJINFO ObjInfo;
    229229    vrc = RTPathQueryInfoEx(szFilePath, &ObjInfo,  RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
    230230    if (RT_FAILURE(vrc))
    231         return &(new iprt::MiniString())->printf("RTPathQueryInfoEx failed with %Rrc", vrc);
     231        return &(new RTCString())->printf("RTPathQueryInfoEx failed with %Rrc", vrc);
    232232    if (a_pObjInfo)
    233233        *a_pObjInfo = ObjInfo;
     
    235235    {
    236236        if (RTFS_IS_SYMLINK(ObjInfo.Attr.fMode))
    237             return new iprt::MiniString("The XML file is symlinked, that is not allowed");
    238         return &(new iprt::MiniString)->printf("The XML file is not a file (fMode=%#x)", ObjInfo.Attr.fMode);
     237            return new RTCString("The XML file is symlinked, that is not allowed");
     238        return &(new RTCString)->printf("The XML file is not a file (fMode=%#x)", ObjInfo.Attr.fMode);
    239239    }
    240240
     
    248248        catch (xml::XmlError Err)
    249249        {
    250             return new iprt::MiniString(Err.what());
     250            return new RTCString(Err.what());
    251251        }
    252252    }
     
    268268 *                          attribs). Optional.
    269269 */
    270 iprt::MiniString *VBoxExtPackLoadDescFromVfsFile(RTVFSFILE hVfsFile, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo)
     270RTCString *VBoxExtPackLoadDescFromVfsFile(RTVFSFILE hVfsFile, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo)
    271271{
    272272    vboxExtPackClearDesc(a_pExtPackDesc);
     
    278278    int rc = RTVfsFileQueryInfo(hVfsFile, &ObjInfo, RTFSOBJATTRADD_UNIX);
    279279    if (RT_FAILURE(rc))
    280         return &(new iprt::MiniString)->printf("RTVfsFileQueryInfo failed: %Rrc", rc);
     280        return &(new RTCString)->printf("RTVfsFileQueryInfo failed: %Rrc", rc);
    281281    if (a_pObjInfo)
    282282        *a_pObjInfo = ObjInfo;
     
    289289    /* Check the file size. */
    290290    if (ObjInfo.cbObject > _1M || ObjInfo.cbObject < 0)
    291         return &(new iprt::MiniString)->printf("The XML file is too large (%'RU64 bytes)", ObjInfo.cbObject);
     291        return &(new RTCString)->printf("The XML file is too large (%'RU64 bytes)", ObjInfo.cbObject);
    292292    size_t const cbFile = (size_t)ObjInfo.cbObject;
    293293
     
    295295    rc = RTVfsFileSeek(hVfsFile, 0, RTFILE_SEEK_BEGIN, NULL);
    296296    if (RT_FAILURE(rc))
    297         return &(new iprt::MiniString)->printf("RTVfsFileSeek(,0,BEGIN) failed: %Rrc", rc);
     297        return &(new RTCString)->printf("RTVfsFileSeek(,0,BEGIN) failed: %Rrc", rc);
    298298
    299299    /* Allocate memory and read the file content into it. */
    300300    void *pvFile = RTMemTmpAlloc(cbFile);
    301301    if (!pvFile)
    302         return &(new iprt::MiniString)->printf("RTMemTmpAlloc(%zu) failed", cbFile);
    303 
    304     iprt::MiniString *pstrErr = NULL;
     302        return &(new RTCString)->printf("RTMemTmpAlloc(%zu) failed", cbFile);
     303
     304    RTCString *pstrErr = NULL;
    305305    rc = RTVfsFileRead(hVfsFile, pvFile, cbFile, NULL);
    306306    if (RT_FAILURE(rc))
    307         pstrErr = &(new iprt::MiniString)->printf("RTVfsFileRead failed: %Rrc", rc);
     307        pstrErr = &(new RTCString)->printf("RTVfsFileRead failed: %Rrc", rc);
    308308
    309309    /*
     
    314314    {
    315315        xml::XmlMemParser   Parser;
    316         iprt::MiniString    strFileName = VBOX_EXTPACK_DESCRIPTION_NAME;
     316        RTCString    strFileName = VBOX_EXTPACK_DESCRIPTION_NAME;
    317317        try
    318318        {
     
    321321        catch (xml::XmlError Err)
    322322        {
    323             pstrErr = new iprt::MiniString(Err.what());
     323            pstrErr = new RTCString(Err.what());
    324324            rc = VERR_PARSE_ERROR;
    325325        }
     
    366366 * @param   pszTarball          The path to the tarball.
    367367 */
    368 iprt::MiniString *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball)
     368RTCString *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball)
    369369{
    370370    /*
     
    470470 * @sa      VBoxExtPackUnmangleName, VBoxExtPackIsValidMangledName
    471471 */
    472 iprt::MiniString *VBoxExtPackMangleName(const char *pszName)
     472RTCString *VBoxExtPackMangleName(const char *pszName)
    473473{
    474474    AssertReturn(VBoxExtPackIsValidName(pszName), NULL);
     
    486486    Assert(VBoxExtPackIsValidMangledName(szTmp));
    487487
    488     return new iprt::MiniString(szTmp, off);
     488    return new RTCString(szTmp, off);
    489489}
    490490
     
    498498 * @sa      VBoxExtPackMangleName, VBoxExtPackIsValidMangledName
    499499 */
    500 iprt::MiniString *VBoxExtPackUnmangleName(const char *pszMangledName, size_t cchMax)
     500RTCString *VBoxExtPackUnmangleName(const char *pszMangledName, size_t cchMax)
    501501{
    502502    AssertReturn(VBoxExtPackIsValidMangledName(pszMangledName, cchMax), NULL);
     
    517517    AssertReturn(VBoxExtPackIsValidName(szTmp), NULL);
    518518
    519     return new iprt::MiniString(szTmp, off);
     519    return new RTCString(szTmp, off);
    520520}
    521521
     
    535535    AssertReturn(VBoxExtPackIsValidName(pszName), VERR_INTERNAL_ERROR_5);
    536536
    537     iprt::MiniString *pstrMangledName = VBoxExtPackMangleName(pszName);
     537    RTCString *pstrMangledName = VBoxExtPackMangleName(pszName);
    538538    if (!pstrMangledName)
    539539        return VERR_INTERNAL_ERROR_4;
     
    665665     */
    666666    VBOXEXTPACKDESC     ExtPackDesc;
    667     iprt::MiniString   *pstrErr = VBoxExtPackLoadDescFromVfsFile(hXmlFile, &ExtPackDesc, NULL);
     667    RTCString   *pstrErr = VBoxExtPackLoadDescFromVfsFile(hXmlFile, &ExtPackDesc, NULL);
    668668    if (pstrErr)
    669669    {
  • trunk/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp

    r35712 r36527  
    869869     * Ok, down to business.
    870870     */
    871     iprt::MiniString *pstrMangledName = VBoxExtPackMangleName(pszName);
     871    RTCString *pstrMangledName = VBoxExtPackMangleName(pszName);
    872872    if (!pstrMangledName)
    873873        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to mangle name ('%s)", pszName);
     
    955955     * Mangle the name so we can construct the directory names.
    956956     */
    957     iprt::MiniString *pstrMangledName = VBoxExtPackMangleName(pszName);
     957    RTCString *pstrMangledName = VBoxExtPackMangleName(pszName);
    958958    if (!pstrMangledName)
    959959        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to mangle name ('%s)", pszName);
    960     iprt::MiniString strMangledName(*pstrMangledName);
     960    RTCString strMangledName(*pstrMangledName);
    961961    delete pstrMangledName;
    962962
  • trunk/src/VBox/Main/src-server/Performance.cpp

    r36226 r36527  
    11/* $Id$ */
    2 
    32/** @file
    4  *
    53 * VBox Performance Classes implementation.
    64 */
     
    798796         pos = name.find(",", startPos))
    799797    {
    800         mElements.push_back(std::make_pair(object, iprt::MiniString(name.substr(startPos, pos - startPos).c_str())));
     798        mElements.push_back(std::make_pair(object, RTCString(name.substr(startPos, pos - startPos).c_str())));
    801799        startPos = pos + 1;
    802800    }
    803     mElements.push_back(std::make_pair(object, iprt::MiniString(name.substr(startPos).c_str())));
     801    mElements.push_back(std::make_pair(object, RTCString(name.substr(startPos).c_str())));
    804802}
    805803
     
    877875}
    878876
    879 bool Filter::match(const ComPtr<IUnknown> object, const iprt::MiniString &name) const
     877bool Filter::match(const ComPtr<IUnknown> object, const RTCString &name) const
    880878{
    881879    ElementList::const_iterator it;
  • trunk/src/VBox/Main/xml/Settings.cpp

    r36521 r36527  
    142142    }
    143143
    144     iprt::MiniString        strFilename;
     144    RTCString        strFilename;
    145145    bool                    fFileExists;
    146146
  • trunk/src/VBox/Main/xml/ovfreader.cpp

    r35566 r36527  
    11/* $Id$ */
    22/** @file
     3 * OVF reader declarations.
    34 *
    4  * OVF reader declarations. Depends only on IPRT, including the iprt::MiniString
    5  * and IPRT XML classes.
     5 * Depends only on IPRT, including the RTCString and IPRT XML classes.
    66 */
    77
     
    2121
    2222using namespace std;
    23 using namespace iprt;
    2423using namespace ovf;
    2524
     
    3736 * @param path   path to a filename for error messages.
    3837 */
    39 OVFReader::OVFReader(const void *pvBuf, size_t cbSize, const MiniString &path)
     38OVFReader::OVFReader(const void *pvBuf, size_t cbSize, const RTCString &path)
    4039    : m_strPath(path)
    4140{
     
    5352 * @param path
    5453 */
    55 OVFReader::OVFReader(const MiniString &path)
     54OVFReader::OVFReader(const RTCString &path)
    5655    : m_strPath(path)
    5756{
     
    653652                            <rasd:BusNumber>0</rasd:BusNumber>
    654653                        </Item> */
    655                         if (    i.strCaption.startsWith("sataController", MiniString::CaseInsensitive)
    656                              && !i.strResourceSubType.compare("AHCI", MiniString::CaseInsensitive)
     654                        if (    i.strCaption.startsWith("sataController", RTCString::CaseInsensitive)
     655                             && !i.strResourceSubType.compare("AHCI", RTCString::CaseInsensitive)
    657656                           )
    658657                        {
  • trunk/src/VBox/Runtime/common/string/ministring.cpp

    r36508 r36527  
    3333*******************************************************************************/
    3434#include <iprt/cpp/ministring.h>
    35 using namespace iprt;
    3635
    3736
     
    3938*   Global Variables                                                           *
    4039*******************************************************************************/
    41 const size_t MiniString::npos = ~(size_t)0;
     40const size_t RTCString::npos = ~(size_t)0;
     41
    4242
    4343/*******************************************************************************
     
    4848
    4949
    50 MiniString &MiniString::printf(const char *pszFormat, ...)
     50RTCString &RTCString::printf(const char *pszFormat, ...)
    5151{
    5252    va_list va;
     
    5858
    5959/**
    60  * Callback used with RTStrFormatV by MiniString::printfV.
     60 * Callback used with RTStrFormatV by RTCString::printfV.
    6161 *
    6262 * @returns The number of bytes added (not used).
     
    6767 */
    6868/*static*/ DECLCALLBACK(size_t)
    69 MiniString::printfOutputCallback(void *pvArg, const char *pachChars, size_t cbChars)
    70 {
    71     MiniString *pThis = (MiniString *)pvArg;
     69RTCString::printfOutputCallback(void *pvArg, const char *pachChars, size_t cbChars)
     70{
     71    RTCString *pThis = (RTCString *)pvArg;
    7272    if (cbChars)
    7373    {
     
    9494}
    9595
    96 MiniString &MiniString::printfV(const char *pszFormat, va_list va)
     96RTCString &RTCString::printfV(const char *pszFormat, va_list va)
    9797{
    9898    cleanup();
     
    101101}
    102102
    103 MiniString &MiniString::append(const MiniString &that)
     103RTCString &RTCString::append(const RTCString &that)
    104104{
    105105    size_t cchThat = that.length();
     
    125125}
    126126
    127 MiniString &MiniString::append(const char *pszThat)
     127RTCString &RTCString::append(const char *pszThat)
    128128{
    129129    size_t cchThat = strlen(pszThat);
     
    149149}
    150150
    151 MiniString& MiniString::append(char ch)
     151RTCString& RTCString::append(char ch)
    152152{
    153153    Assert((unsigned char)ch < 0x80);                  /* Don't create invalid UTF-8. */
     
    170170}
    171171
    172 MiniString &MiniString::appendCodePoint(RTUNICP uc)
     172RTCString &RTCString::appendCodePoint(RTUNICP uc)
    173173{
    174174    /*
     
    176176     */
    177177    if (uc < 0x80)
    178         return MiniString::append((char)uc);
     178        return RTCString::append((char)uc);
    179179
    180180    /*
     
    200200}
    201201
    202 size_t MiniString::find(const char *pcszFind, size_t pos /*= 0*/) const
     202size_t RTCString::find(const char *pcszFind, size_t pos /*= 0*/) const
    203203{
    204204    const char *pszThis, *p;
     
    213213}
    214214
    215 void MiniString::findReplace(char cFind, char cReplace)
     215void RTCString::findReplace(char cFind, char cReplace)
    216216{
    217217    for (size_t i = 0; i < length(); ++i)
     
    223223}
    224224
    225 MiniString MiniString::substrCP(size_t pos /*= 0*/, size_t n /*= npos*/) const
    226 {
    227     MiniString ret;
     225RTCString RTCString::substrCP(size_t pos /*= 0*/, size_t n /*= npos*/) const
     226{
     227    RTCString ret;
    228228
    229229    if (n)
     
    271271}
    272272
    273 bool MiniString::endsWith(const MiniString &that, CaseSensitivity cs /*= CaseSensitive*/) const
     273bool RTCString::endsWith(const RTCString &that, CaseSensitivity cs /*= CaseSensitive*/) const
    274274{
    275275    size_t l1 = length();
     
    289289}
    290290
    291 bool MiniString::startsWith(const MiniString &that, CaseSensitivity cs /*= CaseSensitive*/) const
     291bool RTCString::startsWith(const RTCString &that, CaseSensitivity cs /*= CaseSensitive*/) const
    292292{
    293293    size_t l1 = length();
     
    304304}
    305305
    306 bool MiniString::contains(const MiniString &that, CaseSensitivity cs /*= CaseSensitive*/) const
     306bool RTCString::contains(const RTCString &that, CaseSensitivity cs /*= CaseSensitive*/) const
    307307{
    308308    /** @todo r-bird: Not checking for NULL strings like startsWith does (and
     
    313313}
    314314
    315 int MiniString::toInt(uint64_t &i) const
     315int RTCString::toInt(uint64_t &i) const
    316316{
    317317    if (!m_psz)
     
    320320}
    321321
    322 int MiniString::toInt(uint32_t &i) const
     322int RTCString::toInt(uint32_t &i) const
    323323{
    324324    if (!m_psz)
     
    327327}
    328328
    329 iprt::list<iprt::MiniString, iprt::MiniString *>
    330 MiniString::split(const iprt::MiniString &a_rstrSep, SplitMode mode /* = RemoveEmptyParts */)
    331 {
    332     iprt::list<iprt::MiniString> strRet;
     329iprt::list<RTCString, RTCString *>
     330RTCString::split(const RTCString &a_rstrSep, SplitMode mode /* = RemoveEmptyParts */)
     331{
     332    iprt::list<RTCString> strRet;
    333333    if (!m_psz)
    334334        return strRet;
    335335    if (a_rstrSep.isEmpty())
    336336    {
    337         strRet.append(iprt::MiniString(m_psz));
     337        strRet.append(RTCString(m_psz));
    338338        return strRet;
    339339    }
     
    346346        if (!pszNext)
    347347        {
    348             strRet.append(iprt::MiniString(pszTmp, cch));
     348            strRet.append(RTCString(pszTmp, cch));
    349349            break;
    350350        }
     
    352352        if (   cchNext > 0
    353353            || mode == KeepEmptyParts)
    354             strRet.append(iprt::MiniString(pszTmp, cchNext));
     354            strRet.append(RTCString(pszTmp, cchNext));
    355355        pszTmp += cchNext + a_rstrSep.length();
    356356        cch    -= cchNext + a_rstrSep.length();
     
    361361
    362362/* static */
    363 iprt::MiniString
    364 MiniString::join(const iprt::list<iprt::MiniString, iprt::MiniString*> &a_rList,
    365                  const iprt::MiniString &a_rstrSep /* = "" */)
    366 {
    367     MiniString strRet;
     363RTCString
     364RTCString::join(const iprt::list<RTCString, RTCString*> &a_rList,
     365                 const RTCString &a_rstrSep /* = "" */)
     366{
     367    RTCString strRet;
    368368    if (a_rList.size() > 1)
    369369    {
     
    376376}
    377377
    378 const iprt::MiniString operator+(const iprt::MiniString &a_rStr1, const iprt::MiniString &a_rStr2)
    379 {
    380     iprt::MiniString strRet(a_rStr1);
     378const RTCString operator+(const RTCString &a_rStr1, const RTCString &a_rStr2)
     379{
     380    RTCString strRet(a_rStr1);
    381381    strRet += a_rStr2;
    382382    return strRet;
    383383}
    384384
    385 const iprt::MiniString operator+(const iprt::MiniString &a_rStr1, const char *a_pszStr2)
    386 {
    387     iprt::MiniString strRet(a_rStr1);
     385const RTCString operator+(const RTCString &a_rStr1, const char *a_pszStr2)
     386{
     387    RTCString strRet(a_rStr1);
    388388    strRet += a_pszStr2;
    389389    return strRet;
    390390}
    391391
    392 const iprt::MiniString operator+(const char *a_psz1, const iprt::MiniString &a_rStr2)
    393 {
    394     iprt::MiniString strRet(a_psz1);
     392const RTCString operator+(const char *a_psz1, const RTCString &a_rStr2)
     393{
     394    RTCString strRet(a_psz1);
    395395    strRet += a_rStr2;
    396396    return strRet;
  • trunk/src/VBox/Runtime/r3/xml.cpp

    r36523 r36527  
    175175    { }
    176176
    177     iprt::MiniString strFileName;
     177    RTCString strFileName;
    178178    RTFILE handle;
    179179    bool opened : 1;
     
    825825 * @return TRUE if attribute was found and str was thus updated.
    826826 */
    827 bool ElementNode::getAttributeValue(const char *pcszMatch, iprt::MiniString &str) const
     827bool ElementNode::getAttributeValue(const char *pcszMatch, RTCString &str) const
    828828{
    829829    const Node* pAttr;
     
    844844 * @return
    845845 */
    846 bool ElementNode::getAttributeValuePath(const char *pcszMatch, iprt::MiniString &str) const
     846bool ElementNode::getAttributeValuePath(const char *pcszMatch, RTCString &str) const
    847847{
    848848    if (getAttributeValue(pcszMatch, str))
     
    10781078 * @return
    10791079 */
    1080 AttributeNode* ElementNode::setAttributePath(const char *pcszName, const iprt::MiniString &strValue)
    1081 {
    1082     iprt::MiniString strTemp(strValue);
     1080AttributeNode* ElementNode::setAttributePath(const char *pcszName, const RTCString &strValue)
     1081{
     1082    RTCString strTemp(strValue);
    10831083    strTemp.findReplace('\\', '/');
    10841084    return setAttribute(pcszName, strTemp.c_str());
     
    14821482 */
    14831483void XmlMemParser::read(const void* pvBuf, size_t cbSize,
    1484                         const iprt::MiniString &strFilename,
     1484                        const RTCString &strFilename,
    14851485                        Document &doc)
    14861486{
     
    15401540struct XmlFileParser::Data
    15411541{
    1542     iprt::MiniString strXmlFilename;
     1542    RTCString strXmlFilename;
    15431543
    15441544    Data()
     
    15661566{
    15671567    File file;
    1568     iprt::MiniString error;
     1568    RTCString error;
    15691569
    15701570    IOContext(const char *pcszFilename, File::Mode mode, bool fFlush = false)
     
    16091609 * @param doc out: document to be reset and filled with data according to file contents.
    16101610 */
    1611 void XmlFileParser::read(const iprt::MiniString &strFilename,
     1611void XmlFileParser::read(const RTCString &strFilename,
    16121612                         Document &doc)
    16131613{
  • trunk/src/VBox/Runtime/testcase/tstIprtList.cpp

    r36525 r36527  
    567567     * Big size type (translate to internal pointer list).
    568568     */
    569     test1<iprt::list,   iprt::MiniString, iprt::MiniString*, const char *>("ST: Class type", g_apszTestStrings, RT_ELEMENTS(g_apszTestStrings));
    570     test1<iprt::mtlist, iprt::MiniString, iprt::MiniString*, const char *>("MT: Class type", g_apszTestStrings, RT_ELEMENTS(g_apszTestStrings));
     569    test1<iprt::list,   RTCString, RTCString *, const char *>("ST: Class type", g_apszTestStrings, RT_ELEMENTS(g_apszTestStrings));
     570    test1<iprt::mtlist, RTCString, RTCString *, const char *>("MT: Class type", g_apszTestStrings, RT_ELEMENTS(g_apszTestStrings));
    571571
    572572    /*
  • trunk/src/VBox/Runtime/testcase/tstIprtMiniString.cpp

    r36501 r36527  
    11/* $Id$ */
    22/** @file
    3  * IPRT Testcase - iprt::MiniString.
     3 * IPRT Testcase - RTCString.
    44 */
    55
     
    4242    va_list va;
    4343    va_start(va, pszFormat);
    44     iprt::MiniString strTst(pszFormat, va);
     44    RTCString strTst(pszFormat, va);
    4545    va_end(va);
    4646    RTTESTI_CHECK_MSG(strTst.equals(pszExpect),  ("strTst='%s' expected='%s'\n",  strTst.c_str(), pszExpect));
     
    7070    } while (0)
    7171
    72     iprt::MiniString empty;
     72    RTCString empty;
    7373    CHECK(empty.length() == 0);
    7474    CHECK(empty.capacity() == 0);
    7575
    76     iprt::MiniString sixbytes("12345");
     76    RTCString sixbytes("12345");
    7777    CHECK(sixbytes.length() == 5);
    7878    CHECK(sixbytes.capacity() == 6);
    7979
    80     sixbytes.append(iprt::MiniString("678"));
     80    sixbytes.append(RTCString("678"));
    8181    CHECK(sixbytes.length() == 8);
    8282    CHECK(sixbytes.capacity() >= 9);
     
    9595    CHECK(sixbytes.capacity() == 7);
    9696
    97     iprt::MiniString morebytes("tobereplaced");
     97    RTCString morebytes("tobereplaced");
    9898    morebytes = "newstring ";
    9999    morebytes.append(sixbytes);
     
    101101    CHECK_DUMP(morebytes == "newstring 123456", morebytes.c_str());
    102102
    103     iprt::MiniString third(morebytes);
     103    RTCString third(morebytes);
    104104    third.reserve(100 * 1024);      // 100 KB
    105105    CHECK_DUMP(third == "newstring 123456", morebytes.c_str() );
     
    107107    CHECK(third.length() == morebytes.length());          // must not have changed
    108108
    109     iprt::MiniString copy1(morebytes);
    110     iprt::MiniString copy2 = morebytes;
     109    RTCString copy1(morebytes);
     110    RTCString copy2 = morebytes;
    111111    CHECK(copy1 == copy2);
    112112
     
    117117    CHECK(copy1.length() == 0);
    118118
    119     CHECK(iprt::MiniString("abc") <  iprt::MiniString("def"));
    120     CHECK(iprt::MiniString("") <  iprt::MiniString("def"));
    121     CHECK(iprt::MiniString("abc") > iprt::MiniString(""));
    122     CHECK(iprt::MiniString("abc") != iprt::MiniString("def"));
    123     CHECK_DUMP_I(iprt::MiniString("def") > iprt::MiniString("abc"));
    124     CHECK(iprt::MiniString("abc") == iprt::MiniString("abc"));
    125     CHECK(iprt::MiniString("").compare("") == 0);
    126     CHECK(iprt::MiniString("").compare(NULL) == 0);
    127     CHECK(iprt::MiniString("").compare("a") < 0);
    128     CHECK(iprt::MiniString("a").compare("") > 0);
    129     CHECK(iprt::MiniString("a").compare(NULL) > 0);
    130 
    131     CHECK(iprt::MiniString("abc") <  "def");
    132     CHECK(iprt::MiniString("abc") != "def");
    133     CHECK_DUMP_I(iprt::MiniString("def") > "abc");
    134     CHECK(iprt::MiniString("abc") == "abc");
    135 
    136     CHECK(iprt::MiniString("abc").equals("abc"));
    137     CHECK(!iprt::MiniString("abc").equals("def"));
    138     CHECK(iprt::MiniString("abc").equalsIgnoreCase("Abc"));
    139     CHECK(iprt::MiniString("abc").equalsIgnoreCase("ABc"));
    140     CHECK(iprt::MiniString("abc").equalsIgnoreCase("ABC"));
    141     CHECK(!iprt::MiniString("abc").equalsIgnoreCase("dBC"));
    142     CHECK(iprt::MiniString("").equals(""));
    143     CHECK(iprt::MiniString("").equals(NULL));
    144     CHECK(!iprt::MiniString("").equals("a"));
    145     CHECK(!iprt::MiniString("a").equals(""));
    146     CHECK(!iprt::MiniString("a").equals(NULL));
    147     CHECK(iprt::MiniString("").equalsIgnoreCase(""));
    148     CHECK(iprt::MiniString("").equalsIgnoreCase(NULL));
    149     CHECK(!iprt::MiniString("").equalsIgnoreCase("a"));
    150     CHECK(!iprt::MiniString("a").equalsIgnoreCase(""));
     119    CHECK(RTCString("abc") <  RTCString("def"));
     120    CHECK(RTCString("") <  RTCString("def"));
     121    CHECK(RTCString("abc") > RTCString(""));
     122    CHECK(RTCString("abc") != RTCString("def"));
     123    CHECK_DUMP_I(RTCString("def") > RTCString("abc"));
     124    CHECK(RTCString("abc") == RTCString("abc"));
     125    CHECK(RTCString("").compare("") == 0);
     126    CHECK(RTCString("").compare(NULL) == 0);
     127    CHECK(RTCString("").compare("a") < 0);
     128    CHECK(RTCString("a").compare("") > 0);
     129    CHECK(RTCString("a").compare(NULL) > 0);
     130
     131    CHECK(RTCString("abc") <  "def");
     132    CHECK(RTCString("abc") != "def");
     133    CHECK_DUMP_I(RTCString("def") > "abc");
     134    CHECK(RTCString("abc") == "abc");
     135
     136    CHECK(RTCString("abc").equals("abc"));
     137    CHECK(!RTCString("abc").equals("def"));
     138    CHECK(RTCString("abc").equalsIgnoreCase("Abc"));
     139    CHECK(RTCString("abc").equalsIgnoreCase("ABc"));
     140    CHECK(RTCString("abc").equalsIgnoreCase("ABC"));
     141    CHECK(!RTCString("abc").equalsIgnoreCase("dBC"));
     142    CHECK(RTCString("").equals(""));
     143    CHECK(RTCString("").equals(NULL));
     144    CHECK(!RTCString("").equals("a"));
     145    CHECK(!RTCString("a").equals(""));
     146    CHECK(!RTCString("a").equals(NULL));
     147    CHECK(RTCString("").equalsIgnoreCase(""));
     148    CHECK(RTCString("").equalsIgnoreCase(NULL));
     149    CHECK(!RTCString("").equalsIgnoreCase("a"));
     150    CHECK(!RTCString("a").equalsIgnoreCase(""));
    151151
    152152    copy2.setNull();
     
    167167
    168168    /* printf */
    169     iprt::MiniString StrFmt;
     169    RTCString StrFmt;
    170170    CHECK(StrFmt.printf("%s-%s-%d", "abc", "def", 42).equals("abc-def-42"));
    171171    test1Hlp1("abc-42-def", "%s-%d-%s", "abc", 42, "def");
     
    175175
    176176    /* substring constructors */
    177     iprt::MiniString SubStr1("", (size_t)0);
     177    RTCString SubStr1("", (size_t)0);
    178178    CHECK_EQUAL(SubStr1, "");
    179179
    180     iprt::MiniString SubStr2("abcdef", 2);
     180    RTCString SubStr2("abcdef", 2);
    181181    CHECK_EQUAL(SubStr2, "ab");
    182182
    183     iprt::MiniString SubStr3("abcdef", 1);
     183    RTCString SubStr3("abcdef", 1);
    184184    CHECK_EQUAL(SubStr3, "a");
    185185
    186     iprt::MiniString SubStr4("abcdef", 6);
     186    RTCString SubStr4("abcdef", 6);
    187187    CHECK_EQUAL(SubStr4, "abcdef");
    188188
    189     iprt::MiniString SubStr5("abcdef", 7);
     189    RTCString SubStr5("abcdef", 7);
    190190    CHECK_EQUAL(SubStr5, "abcdef");
    191191
    192192
    193     iprt::MiniString SubStrBase("abcdef");
    194 
    195     iprt::MiniString SubStr10(SubStrBase, 0);
     193    RTCString SubStrBase("abcdef");
     194
     195    RTCString SubStr10(SubStrBase, 0);
    196196    CHECK_EQUAL(SubStr10, "abcdef");
    197197
    198     iprt::MiniString SubStr11(SubStrBase, 1);
     198    RTCString SubStr11(SubStrBase, 1);
    199199    CHECK_EQUAL(SubStr11, "bcdef");
    200200
    201     iprt::MiniString SubStr12(SubStrBase, 1, 1);
     201    RTCString SubStr12(SubStrBase, 1, 1);
    202202    CHECK_EQUAL(SubStr12, "b");
    203203
    204     iprt::MiniString SubStr13(SubStrBase, 2, 3);
     204    RTCString SubStr13(SubStrBase, 2, 3);
    205205    CHECK_EQUAL(SubStr13, "cde");
    206206
    207     iprt::MiniString SubStr14(SubStrBase, 2, 4);
     207    RTCString SubStr14(SubStrBase, 2, 4);
    208208    CHECK_EQUAL(SubStr14, "cdef");
    209209
    210     iprt::MiniString SubStr15(SubStrBase, 2, 5);
     210    RTCString SubStr15(SubStrBase, 2, 5);
    211211    CHECK_EQUAL(SubStr15, "cdef");
    212212
    213213    /* substr() and substrCP() functions */
    214     iprt::MiniString strTest("");
     214    RTCString strTest("");
    215215    CHECK_EQUAL(strTest.substr(0), "");
    216216    CHECK_EQUAL(strTest.substrCP(0), "");
     
    257257
    258258    /* split */
    259     iprt::list<iprt::MiniString> spList1 = iprt::MiniString("##abcdef##abcdef####abcdef##").split("##", iprt::MiniString::RemoveEmptyParts);
     259    iprt::list<RTCString> spList1 = RTCString("##abcdef##abcdef####abcdef##").split("##", RTCString::RemoveEmptyParts);
    260260    RTTESTI_CHECK(spList1.size() == 3);
    261261    for (size_t i = 0; i < spList1.size(); ++i)
    262262        RTTESTI_CHECK(spList1.at(i) == "abcdef");
    263     iprt::list<iprt::MiniString> spList2 = iprt::MiniString("##abcdef##abcdef####abcdef##").split("##", iprt::MiniString::KeepEmptyParts);
     263    iprt::list<RTCString> spList2 = RTCString("##abcdef##abcdef####abcdef##").split("##", RTCString::KeepEmptyParts);
    264264    RTTESTI_CHECK_RETV(spList2.size() == 5);
    265265    RTTESTI_CHECK(spList2.at(0) == "");
     
    268268    RTTESTI_CHECK(spList2.at(3) == "");
    269269    RTTESTI_CHECK(spList2.at(4) == "abcdef");
    270     iprt::list<iprt::MiniString> spList3 = iprt::MiniString().split("##", iprt::MiniString::KeepEmptyParts);
     270    iprt::list<RTCString> spList3 = RTCString().split("##", RTCString::KeepEmptyParts);
    271271    RTTESTI_CHECK(spList3.size() == 0);
    272     iprt::list<iprt::MiniString> spList4 = iprt::MiniString().split("");
     272    iprt::list<RTCString> spList4 = RTCString().split("");
    273273    RTTESTI_CHECK(spList4.size() == 0);
    274     iprt::list<iprt::MiniString> spList5 = iprt::MiniString("abcdef").split("");
     274    iprt::list<RTCString> spList5 = RTCString("abcdef").split("");
    275275    RTTESTI_CHECK_RETV(spList5.size() == 1);
    276276    RTTESTI_CHECK(spList5.at(0) == "abcdef");
    277277
    278278    /* join */
    279     iprt::list<iprt::MiniString> jnList;
    280     strTest = iprt::MiniString::join(jnList);
     279    iprt::list<RTCString> jnList;
     280    strTest = RTCString::join(jnList);
    281281    RTTESTI_CHECK(strTest == "");
    282     strTest = iprt::MiniString::join(jnList, "##");
     282    strTest = RTCString::join(jnList, "##");
    283283    RTTESTI_CHECK(strTest == "");
    284284    for (size_t i = 0; i < 5; ++i)
    285285        jnList.append("abcdef");
    286     strTest = iprt::MiniString::join(jnList);
     286    strTest = RTCString::join(jnList);
    287287    RTTESTI_CHECK(strTest == "abcdefabcdefabcdefabcdefabcdef");
    288     strTest = iprt::MiniString::join(jnList, "##");
     288    strTest = RTCString::join(jnList, "##");
    289289    RTTESTI_CHECK(strTest == "abcdef##abcdef##abcdef##abcdef##abcdef");
    290290
    291291    /* special constructor and assignment arguments */
    292     iprt::MiniString StrCtor1("");
     292    RTCString StrCtor1("");
    293293    RTTESTI_CHECK(StrCtor1.isEmpty());
    294294    RTTESTI_CHECK(StrCtor1.length() == 0);
    295295
    296     iprt::MiniString StrCtor2(NULL);
     296    RTCString StrCtor2(NULL);
    297297    RTTESTI_CHECK(StrCtor2.isEmpty());
    298298    RTTESTI_CHECK(StrCtor2.length() == 0);
    299299
    300     iprt::MiniString StrCtor1d(StrCtor1);
     300    RTCString StrCtor1d(StrCtor1);
    301301    RTTESTI_CHECK(StrCtor1d.isEmpty());
    302302    RTTESTI_CHECK(StrCtor1d.length() == 0);
    303303
    304     iprt::MiniString StrCtor2d(StrCtor2);
     304    RTCString StrCtor2d(StrCtor2);
    305305    RTTESTI_CHECK(StrCtor2d.isEmpty());
    306306    RTTESTI_CHECK(StrCtor2d.length() == 0);
     
    308308    for (unsigned i = 0; i < 2; i++)
    309309    {
    310         iprt::MiniString StrAssign;
     310        RTCString StrAssign;
    311311        if (i) StrAssign = "abcdef";
    312312        StrAssign = (char *)NULL;
     
    362362    } while (0)
    363363
    364     iprt::MiniString strTmp;
     364    RTCString strTmp;
    365365    char szDst[16];
    366366
    367367    /* Collect all upper and lower case code points. */
    368     iprt::MiniString strLower("");
     368    RTCString strLower("");
    369369    strLower.reserve(_4M);
    370370
    371     iprt::MiniString strUpper("");
     371    RTCString strUpper("");
    372372    strUpper.reserve(_4M);
    373373
     
    392392    size_t      cch    = 0;
    393393    const char *pszCur = strLower.c_str();
    394     iprt::MiniString    strUpper2("");
     394    RTCString    strUpper2("");
    395395    strUpper2.reserve(strLower.length() + 64);
    396396    for (;;)
     
    436436    cch    = 0;
    437437    pszCur = strUpper.c_str();
    438     iprt::MiniString    strLower2("");
     438    RTCString    strLower2("");
    439439    strLower2.reserve(strUpper.length() + 64);
    440440    for (;;)
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