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); }
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(); }
public static bool IsMultiline(Obj obj, int maxLineLen) { Multiliner multiliner = new Multiliner(obj, true, maxLineLen, null); return(multiliner.done); }
public static bool PrintSizeFits(Obj obj, int maxSize) { return(!Multiliner.IsMultiline(obj, maxSize)); }