// Save //------------------------------------------------------------------------------ /*virtual*/ void ObjectListNode::Save( IOStream & stream ) const { NODE_SAVE( m_Name ); NODE_SAVE_NODE( m_Compiler ); NODE_SAVE( m_CompilerArgs ); NODE_SAVE( m_CompilerArgsDeoptimized ); NODE_SAVE( m_CompilerOutputPath ); NODE_SAVE_DEPS( m_StaticDependencies ); NODE_SAVE_NODE( m_PrecompiledHeader ); NODE_SAVE( m_ObjExtensionOverride ); NODE_SAVE( m_CompilerOutputPrefix ); NODE_SAVE_DEPS( m_CompilerForceUsing ); NODE_SAVE_DEPS( m_PreBuildDependencies ); NODE_SAVE( m_DeoptimizeWritableFiles ); NODE_SAVE( m_DeoptimizeWritableFilesWithToken ); NODE_SAVE( m_AllowDistribution ); NODE_SAVE( m_AllowCaching ); NODE_SAVE_NODE( m_Preprocessor ); NODE_SAVE( m_PreprocessorArgs ); NODE_SAVE( m_BaseDirectory ); NODE_SAVE( m_ExtraPDBPath ); NODE_SAVE( m_ExtraASMPath ); // TODO:B Need to save the dynamic deps, for better progress estimates // but we can't right now because we rely on the nodes we depend on // being saved before us which isn't the case for dynamic deps. // dynamic deps are saved for more accurate progress estimates in future builds //Node::SaveDepArray( fileStream, m_DynamicDependencies ); }
// Save //------------------------------------------------------------------------------ /*virtual*/ void CopyDirNode::Save( IOStream & stream ) const { NODE_SAVE( m_Name ); NODE_SAVE_DEPS( m_StaticDependencies ); NODE_SAVE( m_DestPath ); NODE_SAVE_DEPS( m_PreBuildDependencies ); }
// Serialize //------------------------------------------------------------------------------ void Node::Serialize( IOStream & stream ) const { // Deps NODE_SAVE_DEPS( m_PreBuildDependencies ); NODE_SAVE_DEPS( m_StaticDependencies ); NODE_SAVE_DEPS( m_DynamicDependencies ); // Properties const ReflectionInfo * const ri = GetReflectionInfoV(); const ReflectionIter end = ri->End(); for ( ReflectionIter it = ri->Begin(); it != end; ++it ) { const ReflectedProperty & property = *it; const PropertyType pt = property.GetType(); switch ( pt ) { case PT_ASTRING: { if ( property.IsArray() ) { const Array< AString > * arrayOfStrings( nullptr ); property.GetProperty( this, arrayOfStrings ); VERIFY( stream.Write( *arrayOfStrings ) ); } else { AString string; // TODO:C remove this copy property.GetProperty( this, &string ); VERIFY( stream.Write( string ) ); } break; } case PT_BOOL: { bool b( false ); property.GetProperty( this, &b ); VERIFY( stream.Write( b ) ); break; } case PT_UINT32: { uint32_t u32( 0 ); property.GetProperty( this, &u32 ); VERIFY( stream.Write( u32 ) ); break; } default: { ASSERT( false ); // Unsupported type break; } } } }
// Save //------------------------------------------------------------------------------ /*virtual*/ void CSNode::Save( IOStream & stream ) const { NODE_SAVE( m_Name ); // Only save the original static deps here (remove the extra refs) size_t numBaseDeps = m_StaticDependencies.GetSize() - m_ExtraRefs.GetSize(); Dependencies staticDeps( numBaseDeps, false ); for ( size_t i=0; i<numBaseDeps; ++i ) { staticDeps.Append( Dependency( m_StaticDependencies[ i ].GetNode() ) ); } NODE_SAVE_DEPS( staticDeps ); NODE_SAVE( m_CompilerPath ); NODE_SAVE( m_CompilerArgs ); NODE_SAVE_DEPS( m_ExtraRefs ); }
// Save //------------------------------------------------------------------------------ /*virtual*/ void LibraryNode::Save( IOStream & stream ) const { ObjectListNode::Save( stream ); NODE_SAVE( m_LibrarianPath ); NODE_SAVE( m_LibrarianArgs ); NODE_SAVE( m_Flags ); NODE_SAVE_DEPS( m_AdditionalInputs ); }
// Save //------------------------------------------------------------------------------ /*virtual*/ void AliasNode::Save( IOStream & stream ) const { #ifdef USE_NODE_REFLECTION NODE_SAVE( m_Name ); Node::Serialize( stream ); #else NODE_SAVE( m_Name ); NODE_SAVE_DEPS( m_StaticDependencies ); #endif }
// Save //------------------------------------------------------------------------------ /*virtual*/ void ExecNode::Save( IOStream & stream ) const { NODE_SAVE( m_Name ); NODE_SAVE( m_SourceFile->GetName() ); NODE_SAVE( m_Executable->GetName() ); NODE_SAVE( m_Arguments ); NODE_SAVE( m_WorkingDir ); NODE_SAVE( m_ExpectedReturnCode ); NODE_SAVE_DEPS( m_PreBuildDependencies ); }
// Save //------------------------------------------------------------------------------ /*virtual*/ void SLNNode::Save( IOStream & stream ) const { NODE_SAVE( m_Name ); NODE_SAVE( m_SolutionBuildProject ); NODE_SAVE( m_SolutionVisualStudioVersion ); NODE_SAVE( m_SolutionMinimumVisualStudioVersion ); NODE_SAVE_DEPS( m_StaticDependencies ); VSProjectConfig::Save( stream, m_Configs ); SLNSolutionFolder::Save( stream, m_Folders ); }
// Save //------------------------------------------------------------------------------ /*virtual*/ void CompilerNode::Save( IOStream & stream ) const { #ifdef USE_NODE_REFLECTION NODE_SAVE( m_Name ); Node::Serialize( stream ); m_Manifest.Serialize( stream ); #else NODE_SAVE( m_Name ); NODE_SAVE_DEPS( m_StaticDependencies ); NODE_SAVE( m_AllowDistribution ); m_Manifest.Serialize( stream ); #endif }
// Save //------------------------------------------------------------------------------ /*virtual*/ void LinkerNode::Save( IOStream & stream ) const { // we want to save the static deps excluding the size_t count = m_StaticDependencies.GetSize() - ( m_AssemblyResources.GetSize() + m_OtherLibraries.GetSize() ); if ( m_LinkerStampExe ) { count--; } Dependencies staticDeps( m_StaticDependencies.Begin(), m_StaticDependencies.Begin() + count ); NODE_SAVE( m_Name ); NODE_SAVE( m_LinkerType ); NODE_SAVE( m_Linker ); NODE_SAVE( m_LinkerArgs ); NODE_SAVE_DEPS( staticDeps ); NODE_SAVE( m_Flags ); NODE_SAVE_DEPS( m_AssemblyResources ); NODE_SAVE_DEPS( m_OtherLibraries ); NODE_SAVE( m_ImportLibName ); NODE_SAVE_NODE( m_LinkerStampExe ); NODE_SAVE( m_LinkerStampExeArgs ); }