why not:
```
cpp = baseClass->isCPPclass();
```
?