Пример #1
0
string DIDC42BackingStore::getFormatLabel()
{
    string formatLabel = "Disk Copy 4.2 Disk Image";
    
    if (!isWriteEnabled())
        formatLabel += " (read-only)";
    
    return formatLabel;
}
Пример #2
0
string DIVMDKBlockStorage::getFormatLabel()
{
    string formatLabel = "VMDK Disk Image";
    
    if (!isWriteEnabled())
        formatLabel += " (read-only)";
    
    return formatLabel;
}
Пример #3
0
Acad::ErrorStatus asdkBolt::subClose()
{
	if(isWriteEnabled())
	{
		if(pHead)
			//pHead->setColorIndex(colorIndex());
			pHead->setColorIndex(1);
		if(pShaft)
			//pShaft->setColorIndex(colorIndex());
			pShaft->setColorIndex(1);
	}
	return Acad::eOk;
}
void
ArxDbgDbAdeskLogoStyle::subSetDatabaseDefaults(AcDbDatabase* pDb)
{
        // get past ARX bug of calling this on Undo/Redo
        // without opening for Write!  See AecDbAdeskLogo.cpp
        // for details.
    if (isWriteEnabled() == Adesk::kFalse)
        return;

    ASSERT(pDb != NULL);
    if (m_textStyleId == AcDbObjectId::kNull)
        m_textStyleId = pDb->textstyle();
}
void
ArxDbgDbAdeskLogo::subSetDatabaseDefaults(AcDbDatabase* pDb)
{
    ASSERT(pDb != NULL);

		// NOTE: the following note was true in R14... don't know
		// for sure whether it is still true in R15

        // get past AutoCAD bug of calling this on Undo/Redo
        // without opening for Write!  Under the following
        // condition, AutoCAD will call this function without
        // opening us for write.  Since we may call functions that
        // call assertWriteEnabled(), we will crash if we don't
        // trap for this oddball case.
        // CONDITION:  you add a new object to the database, then
        // do an UNDO/REDO.  AutoCAD tries to get tricky with this
        // case for speed improvements.  It is really just marking
        // some state flag to say "unappended" or "reappended"
        // without invoking any UNDO filers and such.  Only problem
        // is that it calls setDatabaseDefaults() again for no
        // apparent reason (at this level of the hierarchy) since our
        // data hasn't changed.  So, either bail early as we do here,
        // or make sure assertWriteEnabled() does not get called anywhere
        // from inside this function or indirectly from this function.
    if (isWriteEnabled() == Adesk::kFalse)
        return;

    ArxDbgDbEntity::subSetDatabaseDefaults(pDb);      // let parent class do its thing

        // if style is still NULL, set it to the standard style from
        // this database.
    if (m_logoStyleId == AcDbObjectId::kNull) {
        assertWriteEnabled();
		m_logoStyleId = ArxDbgDbAdeskLogoStyle::getStandardStyle(pDb, true);
    }
}