Improve documentation.

Add virtual GetDim() function.