Example #1
0
STDMETHODIMP GuestOSTypeWrap::COMGETTER(FamilyId)(BSTR *aFamilyId)
{
    LogRelFlow(("{%p} %s: enter aFamilyId=%p\n", this, "GuestOSType::getFamilyId", aFamilyId));

    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFamilyId);

        AutoCaller autoCaller(this);
        if (FAILED(autoCaller.rc()))
            throw autoCaller.rc();

        hrc = getFamilyId(BSTROutConverter(aFamilyId).str());
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
    }

    LogRelFlow(("{%p} %s: leave *aFamilyId=%ls hrc=%Rhrc\n", this, "GuestOSType::getFamilyId", *aFamilyId, hrc));
    return hrc;
}
void AffectorRoad::save (Iff& iff) const
{
	iff.insertForm (TAG_0006);

		//-- save the base
		LayerItem::save (iff);

		//-- save specific data
		iff.insertForm (TAG_DATA);

			m_heightData.save (iff);

			iff.insertChunk (TAG_DATA);

				iff.insertChunkData (m_pointList.getNumberOfElements ());
				int i;
				for (i = 0; i < m_pointList.getNumberOfElements (); ++i)
				{
					iff.insertChunkData (getPoint (i).x);
					iff.insertChunkData (getPoint (i).y);
				}

				iff.insertChunkData (m_heightList.getNumberOfElements ());
				for (i = 0; i < m_heightList.getNumberOfElements (); ++i)
				{
					iff.insertChunkData (m_heightList[i]);
				}

				iff.insertChunkData (getWidth ());
				iff.insertChunkData (getFamilyId ());
				iff.insertChunkData (static_cast<int32> (getFeatherFunction ()));
				iff.insertChunkData (getFeatherDistance ());
				iff.insertChunkData (static_cast<int32> (getFeatherFunctionShader ()));
				iff.insertChunkData (getFeatherDistanceShader ());
				iff.insertChunkData (m_hasFixedHeights ? static_cast<int32> (1) : static_cast<int32> (0));

			iff.exitChunk (TAG_DATA);

		iff.exitForm (TAG_DATA);

	iff.exitForm (TAG_0006);
}