Re: What does this forward curve primitive function do?
In zeroYieldImpl(Time t) the integral from 0 to t over the instantaneous forward rate is computed (to get the zero yield times t at t), in your example this would be the integral from 0 to t2, not from t2 to t3.
The integration uses the primitive function (i.e. the function F with F(x0)=0 and whose derivative is the interpolating function) provided by the interpolation. In your case it seems to be LinearInterpolation. Now the interpolation could in general use a numerical integration scheme, but in the case of a linear interpolation it is of course much more efficient to code the primitive function directly, which is done in the second code snippet you posted (the primitiveConst_ values are precomputed in the update() method).