MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / write

Method write

Engine/source/persistence/taml/binary/tamlBinaryWriter.cpp:34–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32//-----------------------------------------------------------------------------
33
34bool TamlBinaryWriter::write( FileStream& stream, const TamlWriteNode* pTamlWriteNode, const bool compressed )
35{
36 // Debug Profiling.
37 PROFILE_SCOPE(TamlBinaryWriter_Write);
38
39 // Write Taml signature.
40 stream.writeString( StringTable->insert( TAML_SIGNATURE ) );
41
42 // Write version Id.
43 stream.write( mVersionId );
44
45 // Write compressed flag.
46 stream.write( compressed );
47
48 // Are we compressed?
49 if ( compressed )
50 {
51 // yes, so attach zip stream.
52 ZipSubWStream zipStream;
53 zipStream.attachStream( &stream );
54
55 // Write element.
56 writeElement( zipStream, pTamlWriteNode );
57
58 // Detach zip stream.
59 zipStream.detachStream();
60 }
61 else
62 {
63 // No, so write element.
64 writeElement( stream, pTamlWriteNode );
65 }
66
67 return true;
68}
69
70//-----------------------------------------------------------------------------
71

Callers 5

writeElementMethod · 0.45
writeAttributesMethod · 0.45
writeChildrenMethod · 0.45
writeCustomElementsMethod · 0.45
writeCustomNodeMethod · 0.45

Calls 4

writeStringMethod · 0.45
insertMethod · 0.45
attachStreamMethod · 0.45
detachStreamMethod · 0.45

Tested by

no test coverage detected