MCPcopy Create free account
hub / github.com/carbonengine/trinity / Save

Method Save

shadercompiler/EffectData.h:822–849  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

820{
821 template <typename T>
822 void Save( T& stream )
823 {
824 stream.Save( uint8_t( techniques.size() ) );
825 for( auto it = techniques.begin(); it != techniques.end(); ++it )
826 {
827 it->Save( stream );
828 }
829 stream.Save( uint16_t( annotations.size() ) );
830
831
832 std::vector<StringReference> keys;
833 keys.reserve( annotations.size() );
834 for( auto& k : annotations )
835 {
836 keys.push_back( k.first );
837 }
838
839 std::sort( begin( keys ), end( keys ), []( StringReference a, StringReference b ) {
840 extern StringTable g_stringTable;
841 return strcmp( g_stringTable.GetString( a ), g_stringTable.GetString( b ) ) < 0;
842 } );
843
844 for( auto key : keys )
845 {
846 stream.Save( key );
847 annotations[key].Save( stream );
848 }
849 }
850
851 std::vector<PDB> pdbs;
852 std::vector<Technique> techniques;

Callers

nothing calls this directly

Calls 7

sizeMethod · 0.80
beginFunction · 0.50
endFunction · 0.50
SaveMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
GetStringMethod · 0.45

Tested by

no test coverage detected