/**
 * @file
 * $Id$
 * $Revision$
 * $Author$
 * $Date$
 *
 * This file is part of The iWear Framework.
 *
 * 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 __IWREMOTE_ENUM_H
#define __IWREMOTE_ENUM_H

#include <iwremote/statement.h>
#include <iwremote/class.h>

namespace iwear
{
    namespace net
    {

struct EnumDef
{
private:
protected:
public:
    EnumDef( const string& id_, const string& value_ )
	: id(id_), value(value_) { }
    string id;
    string value;
};
/**
 * An enum can be in both, namespace scope or class scope
 */
class Enum : public NamespaceItem, public ClassItem
{
private:
protected:
public:
    list<EnumDef> enumdefs;
    Enum( const string& id_) : ClassItem(id_) { }
    void add_enumdef( const EnumDef& ed );
    const list<EnumDef>& get_enumdefs( void ) const { return enumdefs; }
    list<EnumDef>& get_enumdefs( void ) { return enumdefs; }

    virtual string get_crcstring( void );
    virtual nit_type get_namespaceitem_type( void ) { return enum_t; }
    virtual classitem_type get_classitem_type( void ) { return enum_cit; }
    virtual void generate_crcids( const string& );

    string get_own_size( void ) { return ""; }
};

}
}
#endif
