<div dir="ltr"><div><div>Hi,<br></div>  the hard part is IMO done, should be enough for a first round of review; I've left the TODO list I discussed with Amos on IRC in to keep track of what's been done. There are two things left that I can think of: getting rid of the masks (ListHeadersMask etc) in favor of bools or bitfields in the headersTable (I'd go for bools for speed, I believe we can afford to waste 100-ish bytes per flag), and possibly switching some enums  to c++11 strongly-typed enums (enum class foo) in some places.<br><br></div>Code has been casually run-tested, seems to be OK.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 30, 2015 at 9:44 PM, Kinkie <span dir="ltr"><<a href="mailto:gkinkie@gmail.com" target="_blank">gkinkie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Thu, Jul 30, 2015 at 6:42 PM, Alex Rousskov <span dir="ltr"><<a href="mailto:rousskov@measurement-factory.com" target="_blank">rousskov@measurement-factory.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 07/30/2015 01:44 AM, Kinkie wrote:<br>
<br>
> headerDescription: a std::vector keyed by header ID containing header type<br>
<br>
</span>HeaderDescriptions (plural) then.<br></blockquote><div><br></div></span><div>Ok, will change.<br></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span>> template <typename EnumType><br>
> typedef struct LookupTableRecord<br>
> {<br>
>    const char *name;<br>
>    EnumType id;<br>
> }<br>
<br>
</span>Please avoid "struct" whenever possible. Typing "public:" once is better<br>
that always remembering whether to search for and forward-declare a<br>
"struct Foo" or a "class Foo".<br></blockquote><div><br></div></span><div>Sure.<br></div><span class=""><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
> template<typename Enumtype, typename RecordType =<br>
> LookupTableRecord<EnumType> ><br>
> class LookupTable<br>
> {<br>
>    //...<br>
> }<br>
><br>
> This would make it so that someone could define a custom Record type,<br>
> and as long as that record type matches the signature of<br>
> LookupTableRecord, LookupTable won't care.<br>
<br>
</span>Do not add that template parameter until you actually need to customize<br>
the record type. If you end up using this design, just typedef Record to<br>
be LookupTableRecord.<br></blockquote><div><br></div></span><div>Need is already present; it's done exactly as you say.<br></div><div>Thanks! <br></div></div><span class="HOEnZb"><font color="#888888"><br>-- <br><div>    Francesco</div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">    Francesco</div>
</div>