[antlr-interest] TEMPLATES

Henry Butowsky henryb at ntlworld.com
Thu Dec 29 04:05:30 PST 2005


Hi Guys,
	This isn't strictly an antlr problem, but I'm desperate for some help.
	
Basically I would like to know how to create a pointer to a class that 
has been generated by a template.
In my code I want some thing like the following to work.
If someone could tell me what TEMPLATE POINTER is I would be very gratefu



TEMPLATE_POINTER Var_Type(nc_type type) {

static VarOp<short> VS;
static VarOp<int> Vl;
static VarOp<float> Vf;
static VarOp<double> Vd;

	
if (type ==NC_SHORT) TEPLATE_POINTER= &VS
if (type ==NC_INT) TEPLATE_POINTER= &Vl
if (type ==NC_FLOAT) TEPLATE_POINTER= &Vf
if (type ==NC_DOUBLE) TEPLATE_POINTER= &Vd

return TEMPLATE_POINTER

}

regards Henry



More information about the antlr-interest mailing list