Generate "set present" functions for structs