There's a filter for that.
Example:
function wpse_filter_post_class( $classes ) {
// How you determine what class is up to you;
// We will assume you've determined the class name
// and added it to $my_post_class
$my_post_class = 'some-class';
// Add it to the array of post classes
$classes[] = $my_post_class;
// Return the array
return $classes;
}
add_filter( 'post_class', 'wpse_filter_post_class' );
Edit
Assuming you'll be using custom post meta data to determine the layout string to add as a post class, you'd do something like follows:
$my_post_class = ( isset( get_post_meta( get_the_ID(), '_post_layout', true ) ? get_post_meta( get_the_ID(), '_post_layout', true ) : false );
To incorporate that into your filter callback:
function wpse_filter_post_class( $classes ) {
// Test for your layout post meta
$my_post_class = ( isset( get_post_meta( get_the_ID(), '_post_layout', true ) ? get_post_meta( get_the_ID(), '_post_layout', true ) : false );
// If it's there, use it
if ( $my_post_class ) {
// Add layout as a post class
$classes[] = $my_post_class;
}
// Return the array
return $classes;
}
add_filter( 'post_class', 'wpse_filter_post_class' );