corrected inheritance problems. added code to CPLattice.cpp