Пример #1
0
        public static CGFFieldSymbol Parse(CGFParserReporter reporter, Microsoft.CodeAnalysis.IFieldSymbol fieldSymbol)
        {
            CGFFieldSymbol cgfFieldSymbol = new CGFFieldSymbol(fieldSymbol);

            cgfFieldSymbol.m_AttributeDataList = CGFAttributeDataList.Parse(reporter, fieldSymbol.GetAttributes());

            return(cgfFieldSymbol);
        }
Пример #2
0
    /////////////////////////////////////////////////////////////////////////////////////
    /// Function blocks
    /////////////////////////////////////////////////////////////////////////////////////

    bool IsStandaloneFieldType(CGFFieldSymbol cgfFieldSymbol)
    {
        if (cgfFieldSymbol.TypeSymbol == null)
            return false;

        ExtendAttribute fieldTypeExtendAttribute = cgfFieldSymbol.TypeSymbol.Attributes.GetAttribute<ExtendAttribute>();
        bool isStandaloneFieldType = fieldTypeExtendAttribute != null && fieldTypeExtendAttribute.Flags == SerializeFlags.CustomFullLine;
        return isStandaloneFieldType;
    }
Пример #3
0
        /// <summary>
        /// Create the template output
        /// </summary>
        public virtual string TransformText()
        {
            this.Write(@"/////////////////////////////////////////////////////////////////////////////////////
// This file is auto generated. 
// *Any modifications to this file will be lost.*
/////////////////////////////////////////////////////////////////////////////////////

");
            
            #line 13 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

    CGFDocument cgfDocument = CGFDocument;

    foreach(CGFTypeSymbol cgfTypeSymbol in cgfDocument.Types)
    {
        CGFAttributeDataList typeAttributes = cgfTypeSymbol.Attributes;
        ExtendAttribute typeExtendAttribute = typeAttributes.GetAttribute<ExtendAttribute>();
        if (typeExtendAttribute != null && typeExtendAttribute.HasCustomSerialization)
            continue;

        if (cgfTypeSymbol.IsEnum)
            continue;

        bool isFrameData = typeAttributes.GetAttribute<FrameDataAttribute>() != null;
        bool isGlobalData = typeAttributes.GetAttribute<GlobalDataAttribute>() != null;
        bool isGlobalOrFrameData = isFrameData || isGlobalData;

            
            #line default
            #line hidden
            this.Write("std::istream& operator>>(std::istream& inputStream, ");
            
            #line 30 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(cgfTypeSymbol.GeneratedName));
            
            #line default
            #line hidden
            this.Write("& ");
            
            #line 30 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(cgfTypeSymbol.VariableName));
            
            #line default
            #line hidden
            this.Write(")\r\n{\r\n");
            
            #line 32 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

        foreach(CGFFieldSymbol cgfFieldSymbol in cgfTypeSymbol.Fields)
        {
            CGFAttributeDataList fieldAttributes = cgfFieldSymbol.Attributes;

            string cppType = CGFParserUtils.GetCPPStringForType(cgfFieldSymbol.TypeName);
            string variableName = cgfTypeSymbol.VariableName + "." + cgfFieldSymbol.Name;

            bool isFirstField = cgfTypeSymbol.Fields[0] == cgfFieldSymbol;
            bool isLastField = cgfTypeSymbol.Fields[cgfTypeSymbol.Fields.Count - 1] == cgfFieldSymbol;
    
            bool isStandaloneFieldType = IsStandaloneFieldType(cgfFieldSymbol);
            bool appendWithIgnore = !isStandaloneFieldType && (isLastField && isGlobalOrFrameData || !isLastField);

            ArrayAttribute arrayAttribute = fieldAttributes.GetAttribute<ArrayAttribute>();
            if (arrayAttribute != null)
            {
                string indentationIncrement = "    ";
                string indentation = indentationIncrement;
                string arrayVariableName = variableName;
                
                List<ArrayDimension> arrayDimensions = arrayAttribute.Dimensions;
                int arrayIndexCount = arrayDimensions.Count - 1;
                for (int i = arrayIndexCount; i >= 0; --i)
                {
                    ArrayDimension dimension = arrayDimensions[i];
                    string variableNameSuffix = new string('i', (arrayDimensions.Count - i));
                    string loopVariableName = new string('i', (arrayDimensions.Count - i));

                    string arraySize;
                    if (dimension.IsFixedSize)
                    {
                        arraySize = dimension.SizeString;
                    }
                    else
                    {
                        arraySize = cgfTypeSymbol.VariableName + "." + dimension.SizeString;
                    }

                    if (dimension.IsVariableSize)
                    {

            
            #line default
            #line hidden
            
            #line 74 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            
            #line 74 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(arrayVariableName));
            
            #line default
            #line hidden
            this.Write(".resize((unsigned int)");
            
            #line 74 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(arraySize));
            
            #line default
            #line hidden
            this.Write(");\r\n");
            
            #line 75 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

                    }

            
            #line default
            #line hidden
            
            #line 78 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("for(int ");
            
            #line 78 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(loopVariableName));
            
            #line default
            #line hidden
            this.Write(" = 0; ");
            
            #line 78 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(loopVariableName));
            
            #line default
            #line hidden
            this.Write(" < ");
            
            #line 78 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(arraySize));
            
            #line default
            #line hidden
            this.Write("; ++");
            
            #line 78 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(loopVariableName));
            
            #line default
            #line hidden
            this.Write(")\r\n");
            
            #line 79 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("{\r\n");
            
            #line 80 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

                    indentation += indentationIncrement;

                    if (i != 0)
                    {
                        ArrayDimension nextDimension = arrayDimensions[i - 1];
                        string nextArrayVariableName = cgfTypeSymbol.VariableName + "_" + variableNameSuffix;

            
            #line default
            #line hidden
            
            #line 88 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("auto& ");
            
            #line 88 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(nextArrayVariableName));
            
            #line default
            #line hidden
            this.Write(" = ");
            
            #line 88 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(arrayVariableName));
            
            #line default
            #line hidden
            this.Write("[");
            
            #line 88 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(loopVariableName));
            
            #line default
            #line hidden
            this.Write("];\r\n");
            
            #line 89 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

                        arrayVariableName = nextArrayVariableName;
                    }
                    else
                    {

            
            #line default
            #line hidden
            
            #line 95 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("inputStream >> ");
            
            #line 95 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(arrayVariableName));
            
            #line default
            #line hidden
            this.Write("[");
            
            #line 95 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(loopVariableName));
            
            #line default
            #line hidden
            this.Write("];");
            
            #line 95 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
 if (appendWithIgnore) { 
            
            #line default
            #line hidden
            this.Write(" inputStream.ignore();");
            
            #line 95 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
 } 
            
            #line default
            #line hidden
            this.Write(" \r\n");
            
            #line 96 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

                    }
                }

                for (int i = 0; i < arrayDimensions.Count; ++i)
                {
                    indentation = indentation.Remove(indentation.Length - indentationIncrement.Length);

            
            #line default
            #line hidden
            
            #line 104 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("}\r\n");
            
            #line 105 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

                }
            }
            else //Not an array
            {

            
            #line default
            #line hidden
            this.Write("    inputStream >> ");
            
            #line 111 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(variableName));
            
            #line default
            #line hidden
            this.Write(";");
            
            #line 111 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
 if (appendWithIgnore) { 
            
            #line default
            #line hidden
            this.Write(" inputStream.ignore();");
            
            #line 111 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
 } 
            
            #line default
            #line hidden
            this.Write(" \r\n");
            
            #line 112 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

            }
        }

            
            #line default
            #line hidden
            this.Write("\r\n    return inputStream;\r\n}\r\n\r\nstd::ostream& operator<<(std::ostream& outputStre" +
                    "am, const ");
            
            #line 120 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(cgfTypeSymbol.GeneratedName));
            
            #line default
            #line hidden
            this.Write("& ");
            
            #line 120 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(cgfTypeSymbol.VariableName));
            
            #line default
            #line hidden
            this.Write(")\r\n{\r\n");
            
            #line 122 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

        if (isFrameData)
        {

            
            #line default
            #line hidden
            this.Write("    Logging::LogInputData(outputStream) << \"Frame Input:\" << Game::GetFrameCounte" +
                    "r() << std::endl;\r\n\r\n");
            
            #line 128 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

        }
        else if (isGlobalData)
        {

            
            #line default
            #line hidden
            this.Write("    Logging::LogInputData(outputStream) << \"Global Input:\" << std::endl;\r\n\r\n");
            
            #line 135 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

        }

        CGFFieldSymbol previousSerializableFieldSymbol = null;
        foreach(CGFFieldSymbol cgfFieldSymbol in cgfTypeSymbol.Fields)
        {
            CGFAttributeDataList fieldAttributes = cgfFieldSymbol.Attributes;

            string cppType = CGFParserUtils.GetCPPStringForType(cgfFieldSymbol.TypeName);
            string variableName = cgfTypeSymbol.VariableName + "." + cgfFieldSymbol.Name;

            bool isFirstField = cgfTypeSymbol.Fields[0] == cgfFieldSymbol;

            bool isStandaloneFieldType = IsStandaloneFieldType(cgfFieldSymbol);
            bool prependWithLogging = !isStandaloneFieldType 
                && ((isFirstField && isGlobalOrFrameData) || (!isFirstField && (previousSerializableFieldSymbol.Attributes.GetAttribute<GroupWithNextAttribute>() == null)));

            ArrayAttribute arrayAttribute = fieldAttributes.GetAttribute<ArrayAttribute>();
            if (arrayAttribute != null)
            {
                string indentationIncrement = "    ";
                string indentation = indentationIncrement;
                string arrayVariableName = variableName;
                
                List<ArrayDimension> arrayDimensions = arrayAttribute.Dimensions;
                int arrayIndexCount = arrayDimensions.Count - 1;
                for (int i = arrayIndexCount; i >= 0; --i)
                {
                    ArrayDimension dimension = arrayDimensions[i];
                    string variableNameSuffix = new string('i', (arrayDimensions.Count - i));
                    string loopVariableName = new string('i', (arrayDimensions.Count - i));

                    string arraySize;
                    if (dimension.IsFixedSize)
                    {
                        arraySize = dimension.SizeString;
                    }
                    else
                    {
                        arraySize = cgfTypeSymbol.VariableName + "." + dimension.SizeString;
                    }

            
            #line default
            #line hidden
            
            #line 177 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("for(int ");
            
            #line 177 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(loopVariableName));
            
            #line default
            #line hidden
            this.Write(" = 0; ");
            
            #line 177 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(loopVariableName));
            
            #line default
            #line hidden
            this.Write(" < ");
            
            #line 177 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(arraySize));
            
            #line default
            #line hidden
            this.Write("; ++");
            
            #line 177 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(loopVariableName));
            
            #line default
            #line hidden
            this.Write(")\r\n");
            
            #line 178 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("{\r\n");
            
            #line 179 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

                    indentation += indentationIncrement;

                    if (i != 0)
                    {
                        ArrayDimension nextDimension = arrayDimensions[i - 1];
                        string nextArrayVariableName = cgfTypeSymbol.VariableName + "_" + variableNameSuffix;

            
            #line default
            #line hidden
            
            #line 187 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("auto& ");
            
            #line 187 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(nextArrayVariableName));
            
            #line default
            #line hidden
            this.Write(" = ");
            
            #line 187 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(arrayVariableName));
            
            #line default
            #line hidden
            this.Write("[");
            
            #line 187 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(loopVariableName));
            
            #line default
            #line hidden
            this.Write("];\r\n");
            
            #line 188 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

                        arrayVariableName = nextArrayVariableName;
                    }
                    else
                    {

            
            #line default
            #line hidden
            
            #line 194 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            
            #line 194 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
 if (prependWithLogging) { 
            
            #line default
            #line hidden
            this.Write("Logging::LogInputData(outputStream)");
            
            #line 194 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
 } else { 
            
            #line default
            #line hidden
            this.Write("outputStream");
            
            #line 194 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
 } 
            
            #line default
            #line hidden
            this.Write(" << ");
            
            #line 194 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(arrayVariableName));
            
            #line default
            #line hidden
            this.Write("[");
            
            #line 194 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(loopVariableName));
            
            #line default
            #line hidden
            this.Write("];\r\n");
            
            #line 195 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
 
                        if (!isStandaloneFieldType)
                        {
                            if (fieldAttributes.GetAttribute<GroupWithNextAttribute>() != null)
                            {

            
            #line default
            #line hidden
            
            #line 201 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("bool isLastIndex = i == (");
            
            #line 201 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(arraySize));
            
            #line default
            #line hidden
            this.Write(" - 1);\r\n");
            
            #line 202 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("if (!isLastIndex)\r\n");
            
            #line 203 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("{\r\n");
            
            #line 204 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("    outputStream << \" \";\r\n");
            
            #line 205 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("}\r\n");
            
            #line 206 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("else\r\n");
            
            #line 207 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("{\r\n");
            
            #line 208 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("    outputStream << std::endl;\r\n");
            
            #line 209 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("}\r\n");
            
            #line 210 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

                            }
                            else //!IsGroupWithNext
                            {

            
            #line default
            #line hidden
            
            #line 215 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("outputStream << std::endl;\r\n");
            
            #line 216 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

                            } //IsGroupWithNext
                        } //IsSystemType
                    }
                }

                for (int i = 0; i < arrayDimensions.Count; ++i)
                {
                    indentation = indentation.Remove(indentation.Length - indentationIncrement.Length);

            
            #line default
            #line hidden
            
            #line 226 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(indentation));
            
            #line default
            #line hidden
            this.Write("}\r\n");
            
            #line 227 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

                }
            }
            else //Not an array
            {
                bool isLastField = cgfTypeSymbol.Fields[cgfTypeSymbol.Fields.Count - 1] == cgfFieldSymbol;
                bool appendWithEndl = !isStandaloneFieldType && (isLastField && isGlobalOrFrameData || ((!isLastField || isGlobalOrFrameData) && (fieldAttributes.GetAttribute<GroupWithNextAttribute>() == null)));
                bool appendWithSpace = !isStandaloneFieldType && (isLastField && isGlobalOrFrameData || !isLastField);

            
            #line default
            #line hidden
            this.Write("    ");
            
            #line 236 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
 if (prependWithLogging) { 
            
            #line default
            #line hidden
            this.Write("Logging::LogInputData(outputStream)");
            
            #line 236 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
 } else { 
            
            #line default
            #line hidden
            this.Write("outputStream");
            
            #line 236 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
 } 
            
            #line default
            #line hidden
            this.Write(" << ");
            
            #line 236 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(variableName));
            
            #line default
            #line hidden
            
            #line 236 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
 if (appendWithEndl) { 
            
            #line default
            #line hidden
            this.Write(" << std::endl");
            
            #line 236 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
 } else if (appendWithSpace) { 
            
            #line default
            #line hidden
            this.Write(" << \" \"");
            
            #line 236 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"
 } 
            
            #line default
            #line hidden
            this.Write(";\r\n");
            
            #line 237 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

            }

            previousSerializableFieldSymbol = cgfFieldSymbol;
        }

            
            #line default
            #line hidden
            this.Write("\r\n    return outputStream;\r\n}\r\n\r\n////////////////////////////////////////////////" +
                    "/////////////////////////////////////\r\n");
            
            #line 248 "D:\Files\Projects\CodinGameCppFramework-Private\tools\CGFCodeGenerator\CGFCodeGenerator\CGFInlineCodeGenerator.tt"

    }

            
            #line default
            #line hidden
            return this.GenerationEnvironment.ToString();
        }