
On 02/28/2004 08:24 AM, Larry Evans wrote:
On 02/28/2004 08:08 AM, Larry Evans wrote:
On 02/27/2004 11:01 PM, Brian McNamara wrote:
[snip] One thing I forgot to emphasize is that this design pattern seeks [snip]
Ok, maybe just one more thing: tree<B> has additional virtual functions. This, in essence, distinguishes this pattern from the "pattern" implemented by boost graph properties AFAICT. I really haven't looked closely at graph properties, but I assume they don't have virtual methods associated with the added properties. What I need is a virtual function associated with the new property. For example, the regexp_nilable_top::calc_nilable method is associated with the added property, synattr_nilable::my_nilable. Without this virtual function, in order to calculate my_nilable for each node, each node would have to have a flag indicating which regexp_tree type it was, and a possibly large switch statement on this flag to dispatch to the correct calc_nilable code.