//------------------------------------------------------ // // Public Methods // //------------------------------------------------------ #region Public Methods public override void Go() { string generatedPath = Path.Combine( _resourceModel.OutputDirectory, "src\\Graphics\\Include\\Generated" ); FileCodeSink cppFile = new FileCodeSink(generatedPath, "wincodec_private_generated.h");; Helpers.Style.WriteFileHeader(cppFile); foreach (McgEnum e in _resourceModel.Enums) { if (_resourceModel.ShouldGenerate(CodeSections.NativeWincodecPrivate, e)) { cppFile.WriteBlock(EnumHelper.FormatNativeEnum(e)); } } foreach (McgResource r in _resourceModel.Resources) { if (_resourceModel.ShouldGenerate(CodeSections.NativeWincodecPrivate, r)) { cppFile.WriteBlock(StructHelper.FormatNativeStructure(r)); } } cppFile.Dispose(); }
//------------------------------------------------------ // // Public Methods // //------------------------------------------------------ #region Public Methods public override void Go() { string generatedPath = Path.Combine( _resourceModel.OutputDirectory, "src\\Graphics\\Include\\Generated" ); FileCodeSink cppFile = new FileCodeSink(generatedPath, "wgx_misc.h");; FileCodeSink csFile = new FileCodeSink(generatedPath, "wgx_misc.cs"); m_cpp = new StringCodeSink(); m_cs = new StringCodeSink(); // // Write the definitions // WriteEnums(); WriteStructs(); // // Serialize the C++ header and the C# files for the Avalon commands: // Helpers.Style.WriteFileHeader(cppFile); cppFile.WriteBlock(m_cpp.ToString()); csFile.WriteBlock(Helpers.ManagedStyle.WriteFileHeader("wgx_misc.cs")); csFile.WriteBlock(m_cs.ToString()); cppFile.Dispose(); csFile.Dispose(); }