Project

General

Profile

Feature #9880

Deprecate current ParameterSet::Prettifier class in favor of something easier to maintain

Added by Kyle Knoepfel almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
08/24/2015
Due date:
% Done:

100%

Estimated time:
28.00 h
Spent time:
Duration:

Description

The Prettifier class is a private class of fhicl::ParameterSet. Its purpose is to provide an std::string-rendered value of an in-memory ParameterSet object. The Prettifier::operator() function is a recursive algorithm that relies on many conditional statements in order to provide the desired result. The format of the printout looks like:

table0: { atom: value
        }
table1: { table2: { seq: [ 1
                         , 2
                         , 3
                         ]
                    seq1: []
                    seq2: [ 11 ]
                  }
        }
table2: {}

Such a printout is not necessarily easy to parse, and achieving such a printout is cumbersome. I suggest deprecating this function in favor of something easier to maintain, using the new ParameterSet::walk_ algorithm. An easier-to-maintain format would be:

table0: { 
   atom: value
}
table1: { 
   table2: { 
      seq: [ 
         1,
         2,
         3
      ]
      seq1: []
      seq2: [
         11
      ]
   }
}
table2: {}

Such a layout could be improved, but it should be done so in a way that's easier to support than the current algorithm.

History

#1 Updated by Kyle Knoepfel almost 5 years ago

  • Description updated (diff)

#2 Updated by Christopher Green almost 5 years ago

  • Category set to Infrastructure
  • Status changed from New to Assigned
  • Assignee set to Kyle Knoepfel
  • % Done changed from 0 to 70
  • Estimated time set to 28.00 h

#3 Updated by Kyle Knoepfel almost 5 years ago

  • Tracker changed from Necessary Maintenance to Feature
  • Project changed from art to fhicl-cpp
  • Category deleted (Infrastructure)
  • % Done changed from 70 to 100

Implemented with fhicl-cpp:08912823.

#4 Updated by Kyle Knoepfel almost 5 years ago

  • Status changed from Assigned to Resolved

#5 Updated by Kyle Knoepfel almost 5 years ago

  • Description updated (diff)

#6 Updated by Kyle Knoepfel almost 5 years ago

  • Target version set to 1.18.00

#7 Updated by Kyle Knoepfel almost 5 years ago

  • Target version changed from 1.18.00 to 1.16.00

#8 Updated by Christopher Green almost 5 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF