예제 #1
0
            public static HashSet <Obj> MultilineObjs(Obj obj, int maxLineLen)
            {
                HashSet <Obj> multilineObjs = new HashSet <Obj>(new IdentityEqualityComparer <Obj>());
                Multiliner    multiliner    = new Multiliner(obj, false, maxLineLen, multilineObjs);

                return(multilineObjs);
            }
예제 #2
0
        public static void Print(Obj obj, DataWriter writer, int maxLineLen)
        {
            HashSet <Obj> multilineObjs = Multiliner.MultilineObjs(obj, maxLineLen);
            ObjPrinter    printer       = new ObjPrinter(writer, multilineObjs);

            obj.Visit(printer);
            writer.Flush();
        }
예제 #3
0
            public static bool IsMultiline(Obj obj, int maxLineLen)
            {
                Multiliner multiliner = new Multiliner(obj, true, maxLineLen, null);

                return(multiliner.done);
            }
예제 #4
0
 public static bool PrintSizeFits(Obj obj, int maxSize)
 {
     return(!Multiliner.IsMultiline(obj, maxSize));
 }