lets say you are doing a lab supply with digitally controlled
output voltage and current limiting
then you would simply follow the application note for the switching power supply controller IC and use a DAC's or a digital pot to set the feedback for the output voltage.. And to scale the current detect into the error amp.