An example of how easy CPLAT II makes it to handle commands is shown below. The example is taken from the CP_Graphics demo.
CP_Graphics_Application::CP_Graphics_Application() { CPLAT::CP_RegisterCommand( kCP_Graphics_ShapesCommand, CPLAT::CP_Command::CP_E_CH_AlwaysEnable)->connect( CPLAT::CP_SigSlot::slot(this, &CP_Graphics_Application::HandleShapes) ); CPLAT::CP_RegisterCommand( kCP_Graphics_PathsCommand, CPLAT::CP_Command::CP_E_CH_AlwaysEnable)->connect( CPLAT::CP_SigSlot::slot(this, &CP_Graphics_Application::HandlePaths) ); CPLAT::CP_RegisterCommand( kCP_Graphics_ImagesCommand, CPLAT::CP_Command::CP_E_CH_AlwaysEnable)->connect( CPLAT::CP_SigSlot::slot(this, &CP_Graphics_Application::HandleImages) ); }