/**
 * $Id$
 * $Revision$
 * $Author$
 * $Date$
 *
 * This file is part of The iWear Framework.
 * In particular this file is part of the Framework Output
 *
 * The iWear Framework is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation as in version 2 of the License.

 * 
 * The iWear Framework is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * The iWear Framework; if not, write to the Free Software Foundation, Inc., 59
 * Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
#ifndef __MENUDATA_H
#define __MENUDATA_H

#include <iwear_output/outputdata.h>
#include <iwear_uiservices/menu.h>
#include <iwear_uiservices/exportablemenu.h>

using namespace iwear::output;


namespace iwear {
namespace uiservices {

class MenuDataInternalMenuFunctor;

/**
 * This class holds a menu
 * @author Carsten Rachuy
 */
class MenuData : public OutputData {

    friend class MenuDataInternalMenuFunctor;
	
public:

    /**
     * Contains the OutputData type of this object.
     */
    static const string TYPE;

    /**
     * Constructor
     * @param name The name of the output data
     * @param description A description of the output data
     * @param menu The menu which is contained in this data object
     */	
    MenuData(const uid& application_id,
	     const string& name, 
	     const string& description, 
	     Menu& menu);
	    
    /**
     * Destructor
     */
    virtual ~MenuData(void);

    // ------------------------ Other ------------------------


    /**
     * Get a export of the Menu
     */
    ExportableMenu* export_menu(void);
    	

private:

    /**
     * The actual content of this menudata
     */
    Menu* menu;

    /**
     * The functor to the menu
     */
    MenuDataInternalMenuFunctor* menu_data_internal_menu_functor;

};

} // namespace uiservices
} // namespace iwear

#endif // MENUDATA_H

