Often used with interface objects (which put a face on data)
Listen listen_socket(SocketAddr(IPaddress(),Listen_port));
FSMakeFSSpec(0,0,(Pstr)full_path_name,&file_spec);
FilterIt(image). conv(conv_kernel(1,1,1,CommonDenom(3))). clip_to_intensity_range();
void VenusDialog::stop_flight(void) { is_flying = FALSE; ModelessDialog::ControlItem(*this,item_Go). set_title("\pGo"); const int time_elapsed = TickCount() - time_started; // in Ticks NumberItem(*this,item_fps).draw( time_elapsed == 0 ? 0 : (60*frame_counter)/time_elapsed ); }
Note
A more advanced example of anonymous objects, which actually do a byte-compilation.
In the FilterIt example:
Not only we don't allocate the thing on heap, we don't even assign it a name (nipping possible name conflicts in the bud). No garbage (object garbage/name garbage).conv_kernel
and CommonDenom
are classes (not functions). So is FilterIt
. And it's all one single statement.