Magento add notification, success, and error messages

Assume you have a controller that uses the app/design/frontend/base/default/template/page/1column.phtml layout. You can add success or error notification messages in the controller action function like these