// NReflect - Easy assembly reflection
// Copyright (C) 2010-2013 Malte Ried
//
// This file is part of NReflect.
//
// NReflect is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// NReflect 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with NReflect. If not, see <http://www.gnu.org/licenses/>.

using System;
using System.Collections.Generic;
using NReflect.NRMembers;

namespace NReflect.NREntities
{
    /// <summary>
    ///     Represents an enum which is reflected by NReflect.
    /// </summary>
    [Serializable]
    public class NREnum : NRTypeBase
    {
        // ========================================================================
        // Con- / Destruction

        #region === Con- / Destruction

        /// <summary>
        ///     Initializes a new instance of <see cref="NREnum" />.
        /// </summary>
        public NREnum( )
        {
            Values = new List< NREnumValue >( );
        }

        #endregion

        // ========================================================================
        // Methods

        #region === Methods

        /// <summary>
        ///     Accept an <see cref="IVisitor" /> instance on the implementing class and all its children.
        /// </summary>
        /// <param name="visitor">The <see cref="IVisitor" /> instance to accept.</param>
        public override void Accept( IVisitor visitor )
        {
            visitor.Visit( this );
        }

        #endregion

        // ========================================================================
        // Properties

        #region === Properties

        /// <summary>
        ///     Gets a list of values of this enum.
        /// </summary>
        public List< NREnumValue > Values { get; private set; }

        /// <summary>
        ///     Gets or sets the underlying type of the enum.
        /// </summary>
        public string UnderlyingType { get; set; }

        #endregion
    }
}