예제 #1
0
I_OStream* GetEmbFilesLog( void )
{
static I_OStream_Ptr sLogFile = NULL;

	if( sLogFile == NULL )
	{
		I_Disk_Location_Ptr pLoc = CreateDiskLocation( "FBL_EmbeddedFiles.txt" );
		
		I_IStream_Ptr pIStream = CreateTextStream(pLoc);
		sLogFile = fbl_dynamic_cast<I_OStream>(pIStream);
	}
	
	return sLogFile.get();
}
예제 #2
0
void Value_Raw::To( I_OStream_Ptr inStream, bool inBlock ) const
{
	argused1(inBlock);

	bool IsNull = bool( m_pStart == nullptr );
	inStream->put(IsNull);
	
	if( !IsNull )
	{
		vuint32 Len = vuint32(m_pEnd - m_pStart);
		inStream->put(Len);
		if( Len )
		{
			inStream->put(reinterpret_cast<void*>(m_pStart), Len);
		}
	}
}
예제 #3
0
void ArraySet::To( 
	I_OStream_Ptr inStream,
	bool		  inBlock ) const
{
	argused1(inBlock);
	
	// Type of set.
	inStream->put(vuint8(1));

	if( mpStart )
	{
		vuint32 allocLen  = static_cast<vuint32>((mpStorageEnd - mpStart) * sizeof(vuint32));
		vuint32 actualLen = static_cast<vuint32>((mpFinish - mpStart)     * sizeof(vuint32));

		// 1) Allocated len (in bytes).
		inStream->put(allocLen);

		if( actualLen > 0 )
		{
			// 2) Actual len (in bytes).
			inStream->put(actualLen);
			
			// 3) Data of actual len.
			inStream->put((vuint8*)mpStart, actualLen);

			// 4) 'Sorted' flag.
			inStream->put(mIsSorted);
		}
		else
		{
			inStream->put( vuint32(0) );
		}
	}
	else
	{
		inStream->put( vuint32(0) );
	}
}