Yes.
You could Also make your own class, equivalent to linear problem in C++. The reason for it not being part of the core library, is that it adds minimal gain in C++, as you have to define your forms explicitly anyhow. The only thing it actually wraps up is the creation of petsc matrices, vectors and the ksp solver.