Hi Jan,
This message from the cctbxbb archive demonstrates how you can map sites to the asymmetric unit cell in Python. I think you should probably be able to write the equivalent code in C++ if you need the speed, but I would have to look into it more closely to be sure:
Regarding the sites_frac between 0 and 1, there is a standalone C++ function mod_positive() and a related function mod_short() in cctbx/coordinates.h which act just on a site coordinate rather than on a scatterer. If you have need to access this in Python you would need to write a wrapper function that will act on a flex.vec3_double() from Python and loop over this in C++. If this is what you want we can point you in the write direction for how to accomplish this.
Cheers,
Richard