@@ -50,16 +50,53 @@ namespace sta {
5050
5151class Scene ;
5252class PathExpanded ;
53- class ReportField ;
5453
55- using ReportFieldSeq = std::vector<ReportField*>;
56- using ReportFieldMap = std::map<std::string, ReportField, std::less<>>;
5754using ReportFieldGetValue = std::function<std::string (const Path*)>;
5855
56+ class ReportField
57+ {
58+ public:
59+ ReportField (std::string_view name,
60+ std::string_view title,
61+ size_t width,
62+ bool left_justify,
63+ Unit *unit,
64+ ReportFieldGetValue get_value);
65+ ~ReportField ();
66+ void setProperties (std::string_view title,
67+ size_t width,
68+ bool left_justify);
69+ const std::string &name () const { return name_; }
70+ const std::string &title () const { return title_; }
71+ size_t width () const { return width_; }
72+ void setWidth (size_t width);
73+ bool leftJustify () const { return left_justify_; }
74+ Unit *unit () const { return unit_; }
75+ const std::string &blank () const { return blank_; }
76+ void setEnabled (bool enabled);
77+ bool enabled () const { return enabled_; }
78+ std::string value (const Path *path) const ;
79+ const ReportFieldGetValue &getValue () const { return get_value_; }
80+
81+ protected:
82+ std::string name_;
83+ std::string title_;
84+ size_t width_;
85+ bool left_justify_;
86+ Unit *unit_;
87+ bool enabled_{false };
88+ ReportFieldGetValue get_value_;
89+ std::string blank_;
90+ };
91+
92+ using ReportFieldSeq = std::vector<ReportField*>;
93+ using ReportFieldMap = std::map<std::string, ReportField*, std::less<>>;
94+
5995class ReportPath : public StaState
6096{
6197public:
6298 ReportPath (StaState *sta);
99+ ~ReportPath () override ;
63100 ReportPathFormat pathFormat () const { return format_; }
64101 void setPathFormat (ReportPathFormat format);
65102 void setReportFieldOrder (const StringSeq &field_names);
@@ -68,6 +105,7 @@ public:
68105 void setDigits (int digits);
69106 void setNoSplit (bool no_split);
70107 ReportField *findField (std::string_view name);
108+ ReportField *findFieldAbrev (std::string_view name);
71109
72110 // Header above reportPathEnd results.
73111 void reportPathEndHeader () const ;
@@ -167,7 +205,7 @@ public:
167205 bool left_justify,
168206 // nullptr for string fields.
169207 Unit *unit,
170- const ReportFieldGetValue & get_value);
208+ ReportFieldGetValue get_value);
171209 ReportField *fieldSlew () const { return field_slew_; }
172210 ReportField *fieldFanout () const { return field_fanout_; }
173211 ReportField *fieldCapacitance () const { return field_capacitance_; }
@@ -514,40 +552,4 @@ protected:
514552 static const float field_skip_;
515553};
516554
517- class ReportField
518- {
519- public:
520- ReportField (std::string_view name,
521- std::string_view title,
522- size_t width,
523- bool left_justify,
524- Unit *unit,
525- const ReportFieldGetValue &get_value);
526- ~ReportField ();
527- void setProperties (std::string_view title,
528- size_t width,
529- bool left_justify);
530- const std::string &name () const { return name_; }
531- const std::string &title () const { return title_; }
532- size_t width () const { return width_; }
533- void setWidth (size_t width);
534- bool leftJustify () const { return left_justify_; }
535- Unit *unit () const { return unit_; }
536- const std::string &blank () const { return blank_; }
537- void setEnabled (bool enabled);
538- bool enabled () const { return enabled_; }
539- std::string value (const Path *path) const ;
540- const ReportFieldGetValue &getValue () const { return get_value_; }
541-
542- protected:
543- std::string name_;
544- std::string title_;
545- size_t width_;
546- bool left_justify_;
547- Unit *unit_;
548- bool enabled_{false };
549- const ReportFieldGetValue &get_value_;
550- std::string blank_;
551- };
552-
553555} // namespace sta
0 commit comments