Exemplo n.º 1
0
            private void NeFloatSeqObj(NeFloatSeqObj obj)
            {
                int len  = obj.GetSize();
                int size = 2 * len;

                for (int i = 0; i < len; i++)
                {
                    size += FloatObjPrinter.PrintSize(obj.GetDoubleAt(i));
                }
                ConsumeSize(obj, size);
            }
Exemplo n.º 2
0
        private void NeFloatSeqObj(NeFloatSeqObj obj)
        {
            int len = obj.GetSize();

            writer.Write('(');

            if (IsMultiline(obj))
            {
                writer.Indent();

                // If we are on a fresh line, we start writing the first element
                // after the opening bracket, with just a space in between
                // Otherwise we start on the next line
                if (writer.IsNewLine())
                {
                    writer.Write(' ');
                }
                else
                {
                    writer.NewLine();
                }

                for (int i = 0; i < len; i++)
                {
                    if (i > 0)
                    {
                        writer.Write(',');
                        writer.NewLine();
                    }
                    writer.Write(FloatObjPrinter.Print(obj.GetDoubleAt(i)));
                }

                writer.UnindentedNewLine();
            }
            else
            {
                for (int i = 0; i < len; i++)
                {
                    if (i > 0)
                    {
                        writer.Write(", ");
                    }
                    writer.Write(FloatObjPrinter.Print(obj.GetDoubleAt(i)));
                }
            }

            writer.Write(')');
        }
Exemplo n.º 3
0
 public void FloatObj(FloatObj obj)
 {
     writer.Write(FloatObjPrinter.Print(obj.GetDouble()));
 }
Exemplo n.º 4
0
 public void FloatObj(FloatObj obj)
 {
     ConsumeSize(obj, FloatObjPrinter.PrintSize(obj.GetDouble()));
 }