Home Comments

feature request: toString() functions for Slice types

n2503vn2503v Member Alex MakarenkoOrganization: ACFR, University of SydneyProject: Orca ✭✭✭
Hi, would it be possible to automatically generate function for dumping Slice types to strings? I guess you could have an option similar to --stream in slice2xxx utilities.

Currently we write such functions by hand and use them mostly for debugging. Writing them is not much fun.

After parsing *.ice files you should have all the information necessary to generate some default to-string conversion. The only question is what to do with (potentially large) sequences. I'm picturing something very simple like:
struct MyStructure
  int a=1
  double x=1.2345
  string name=alex
  struct MyStruct
    int b=2
    double y=6.7890
  string sequence jobs=[length=12]

cheers, alex
Sign In or Register to comment.