change CTypes and CPPTypes to PrimitiveType and CPPType according to SWIG representation