sal_uInt16 SvMetaClass::WriteSlots( std::string_view rShellName,
SvSlotElementList & rSlotList,
SvIdlDataBase & rBase,
SvStream & rOutStm )
{
sal_uInt16 nSCount = 0; for ( size_t i = 0, n = rSlotList.size(); i < n; ++i )
{
SvMetaSlot * pAttr = rSlotList[ i ];
nSCount = nSCount + pAttr->WriteSlotMap( rShellName, nSCount,
rSlotList, i, rBase,
rOutStm );
}
return nSCount;
}
void SvMetaClass::InsertSlots( SvSlotElementList& rList, std::vector<sal_uInt32>& rSuperList,
SvMetaClassList &rClassList, const OString& rPrefix, SvIdlDataBase& rBase)
{ // was this class already written? if ( std::find( rClassList.begin(), rClassList.end(), this ) != rClassList.end() ) return;
rClassList.push_back( this );
// write all direct attributes for( constauto& pAttr : aAttrList )
{
sal_uInt32 nId = pAttr->GetSlotId().GetValue();
std::vector<sal_uInt32>::iterator iter = std::find(rSuperList.begin(),
rSuperList.end(),nId);
if( iter == rSuperList.end() )
{ // Write only if not already written by subclass or // imported interface.
rSuperList.push_back(nId);
pAttr->Insert(rList);
}
}
// All Interfaces already imported by SuperShell should not be // written any more. // It is prohibited that Shell and SuperShell directly import the same // class. if( GetMetaTypeType() == MetaTypeType::Shell && aSuperClass.is() )
aSuperClass->FillClasses( rClassList );
// Write all attributes of the imported classes, as long as they have // not already been imported by the superclass. for( auto& rElement : aClassElementList )
{
SvMetaClass * pCl = rElement.GetClass();
OStringBuffer rPre(rPrefix.getLength() + 1 + rElement.GetPrefix().getLength());
rPre.append(rPrefix); if( !rPre.isEmpty() && !rElement.GetPrefix().isEmpty() )
rPre.append('.');
rPre.append(rElement.GetPrefix());
// first of all write direct imported interfaces
pCl->InsertSlots( rList, rSuperList, rClassList,
rPre.makeStringAndClear(), rBase );
}
// only write superclass if no shell and not in the list if( GetMetaTypeType() != MetaTypeType::Shell && aSuperClass.is() )
{
aSuperClass->InsertSlots( rList, rSuperList, rClassList, rPrefix, rBase );
}
}
void SvMetaClass::FillClasses( SvMetaClassList & rClassList )
{ // Am I not yet in? if ( std::find( rClassList.begin(), rClassList.end(), this ) != rClassList.end() ) return;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.