VirtualBox

Changeset 73900 in vbox for trunk/src


Ignore:
Timestamp:
Aug 26, 2018 8:28:30 PM (6 years ago)
Author:
vboxsync
Message:

IPRT/rest: More API code generation bits. bugref:9167

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/rest/rest-primary-object-types.cpp

    r73898 r73900  
    5656
    5757
    58 int RTCRestObjectBase::toString(RTCString *a_pDst, uint32_t fFlags)
    59 {
    60     Assert(fFlags == 0);
    61     RT_NOREF(fFlags);
     58int RTCRestObjectBase::toString(RTCString *a_pDst, uint32_t a_fFlags /*= 0*/) const
     59{
     60    Assert(a_fFlags == 0); RT_NOREF(a_fFlags);
     61
    6262    /*
    6363     * Just wrap the JSON serialization method.
     
    6969
    7070
    71 RTCString RTCRestObjectBase::toString()
     71RTCString RTCRestObjectBase::toString() const
    7272{
    7373    RTCString strRet;
     
    124124
    125125
    126 RTCRestOutputBase &RTCRestBool::serializeAsJson(RTCRestOutputBase &a_rDst)
     126RTCRestOutputBase &RTCRestBool::serializeAsJson(RTCRestOutputBase &a_rDst) const
    127127{
    128128    a_rDst.printf(m_fValue ? "true" : "false");
     
    156156
    157157
    158 int RTCRestBool::toString(RTCString *a_pDst, uint32_t fFlags /*= 0*/)
    159 {
    160     Assert(!fFlags);
    161     RT_NOREF(fFlags);
     158int RTCRestBool::toString(RTCString *a_pDst, uint32_t a_fFlags /*= 0*/) const
     159{
     160    Assert(a_fFlags == 0); RT_NOREF(a_fFlags);
     161
    162162    /* Be a little careful here to avoid throwing anything. */
    163163    int rc = a_pDst->reserveNoThrow(m_fValue ? sizeof("true") : sizeof("false"));
     
    225225
    226226
    227 RTCRestOutputBase &RTCRestInt64::serializeAsJson(RTCRestOutputBase &a_rDst)
     227RTCRestOutputBase &RTCRestInt64::serializeAsJson(RTCRestOutputBase &a_rDst) const
    228228{
    229229    a_rDst.printf("%RI64", m_iValue);
     
    254254
    255255
    256 int RTCRestInt64::toString(RTCString *a_pDst, uint32_t fFlags /*= 0*/)
    257 {
    258     Assert(!fFlags);
    259     RT_NOREF(fFlags);
     256int RTCRestInt64::toString(RTCString *a_pDst, uint32_t a_fFlags /*= 0*/) const
     257{
     258    Assert(a_fFlags == 0); RT_NOREF(a_fFlags);
     259
    260260    /* Be a little careful here to avoid throwing anything. */
    261261    char   szValue[64];
     
    321321
    322322
    323 RTCRestOutputBase &RTCRestInt32::serializeAsJson(RTCRestOutputBase &a_rDst)
     323RTCRestOutputBase &RTCRestInt32::serializeAsJson(RTCRestOutputBase &a_rDst) const
    324324{
    325325    a_rDst.printf("%RI32", m_iValue);
     
    356356
    357357
    358 int RTCRestInt32::toString(RTCString *a_pDst, uint32_t fFlags /*= 0*/)
    359 {
    360     Assert(!fFlags);
    361     RT_NOREF(fFlags);
     358int RTCRestInt32::toString(RTCString *a_pDst, uint32_t a_fFlags /*= 0*/) const
     359{
     360    Assert(a_fFlags == 0); RT_NOREF(a_fFlags);
     361
    362362    /* Be a little careful here to avoid throwing anything. */
    363363    char   szValue[16];
     
    423423
    424424
    425 RTCRestOutputBase &RTCRestInt16::serializeAsJson(RTCRestOutputBase &a_rDst)
     425RTCRestOutputBase &RTCRestInt16::serializeAsJson(RTCRestOutputBase &a_rDst) const
    426426{
    427427    a_rDst.printf("%RI16", m_iValue);
     
    458458
    459459
    460 int RTCRestInt16::toString(RTCString *a_pDst, uint32_t fFlags /*= 0*/)
    461 {
    462     Assert(!fFlags);
    463     RT_NOREF(fFlags);
     460int RTCRestInt16::toString(RTCString *a_pDst, uint32_t a_fFlags /*= 0*/) const
     461{
     462    Assert(a_fFlags == 0); RT_NOREF(a_fFlags);
     463
    464464    /* Be a little careful here to avoid throwing anything. */
    465465    char   szValue[8];
     
    517517
    518518
    519 RTCRestOutputBase &RTCRestDouble::serializeAsJson(RTCRestOutputBase &a_rDst)
     519RTCRestOutputBase &RTCRestDouble::serializeAsJson(RTCRestOutputBase &a_rDst) const
    520520{
    521521    /* Just a simple approximation here. */
     
    540540
    541541
    542 int RTCRestDouble::toString(RTCString *a_pDst, uint32_t fFlags /*= 0*/)
    543 {
    544     Assert(!fFlags);
    545     RT_NOREF(fFlags);
     542int RTCRestDouble::toString(RTCString *a_pDst, uint32_t a_fFlags /*= 0*/) const
     543{
     544    Assert(a_fFlags == 0); RT_NOREF(a_fFlags);
     545
    546546    /* Just a simple approximation here. */
    547547    /** @todo implement floating point values for json. */
     
    613613
    614614
    615 RTCRestOutputBase &RTCRestString::serializeAsJson(RTCRestOutputBase &a_rDst)
     615RTCRestOutputBase &RTCRestString::serializeAsJson(RTCRestOutputBase &a_rDst) const
    616616{
    617617    a_rDst.printf("%RJs", m_psz);
     
    647647
    648648
    649 int RTCRestString::toString(RTCString *a_pDst, uint32_t fFlags /*= 0*/)
    650 {
    651     Assert(!fFlags);
    652     RT_NOREF(fFlags);
     649int RTCRestString::toString(RTCString *a_pDst, uint32_t a_fFlags /*= 0*/) const
     650{
     651    Assert(a_fFlags == 0); RT_NOREF(a_fFlags);
     652
    653653    /* Careful as always. */
    654654    if (m_cch)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette