if ( !aDevice.IsNull() )
aSig = aDevice->Signature();
- if( !getLookUpTable().IsBound(aSig) ) {
+ if ( aSig.IsEmpty() || !getLookUpTable().IsBound(aSig) ) {
theMetaData = new CDM_MetaData(aDevice, ReadOnly);
- getLookUpTable().Bind(aSig, theMetaData);
+ if ( !aSig.IsEmpty() )
+ getLookUpTable().Bind(aSig, theMetaData);
}
else
theMetaData = getLookUpTable()(aSig);
if ( !aDevice.IsNull() )
aSig = aDevice->Signature();
- if( !getLookUpTable().IsBound(aSig) ) {
+ if ( aSig.IsEmpty() || !getLookUpTable().IsBound(aSig) ) {
theMetaData = new CDM_MetaData(aDevice, aVersion, ReadOnly);
- getLookUpTable().Bind(aSig, theMetaData);
+ if ( !aSig.IsEmpty() )
+ getLookUpTable().Bind(aSig, theMetaData);
}
else
theMetaData = getLookUpTable()(aSig);
//=======================================================================
TCollection_AsciiString Storage_IStream::Signature() const
{
- Standard_Character buf[256];
- sprintf( buf, "%lx", (unsigned long)myStream );
- return TCollection_AsciiString( buf );
+ return TCollection_AsciiString();
}
//=======================================================================
//purpose :
//=======================================================================
Standard_Size Storage_OStream::Write (const Standard_Address theBuffer, const Standard_Size theSize)
-{
- Storage_Position aPosBefore = Tell();
-
- myStream->write ((char*)theBuffer, theSize);
-
- Storage_Position aPosAfter = Tell();
-
- return aPosAfter - aPosBefore;
+{
+ myStream->write((char*)theBuffer, theSize);
+ return theSize;
}
//=======================================================================
//=======================================================================
TCollection_AsciiString Storage_OStream::Signature() const
{
- Standard_Character buf[256];
- sprintf( buf, "%lx", (unsigned long)myStream );
- return TCollection_AsciiString( buf );
+ return TCollection_AsciiString();
}
//=======================================================================