/* -*-c++-*- */
/* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
* Copyright 2008-2014 Pelican Mapping
* http://osgearth.org
*
* osgEarth 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 2 of the License, or
* (at your option) any later version.
*
* This program 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 this program.  If not, see <http://www.gnu.org/licenses/>
*/
#ifndef OSGEARTH_AERODROME_AERODROMENODE
#define OSGEARTH_AERODROME_AERODROMENODE 1

#include <osg/Group>

#include "Common"
#include "BoundaryNode"

namespace osgEarth { namespace Aerodrome
{
    using namespace osgEarth;

    /**
     * Aerodrome
     */
    class OSGEARTHAERODROME_EXPORT AerodromeNode : public osg::Group
    {
    public:

        AerodromeNode(const std::string& icao);

        virtual ~AerodromeNode() { }

    public: // properties

        const std::string& icao() { return _icao; }

        void setBoundary(BoundaryNode* boundary) { _boundary = boundary; }
        BoundaryNode* getBoundary() { return _boundary.get(); }

        void setRendered(bool rendered) { _rendered = rendered; }
        bool getRendered() const { return _rendered; }

    public: // osg::Node

        //void traverse(osg::NodeVisitor& nv);

    protected:

        std::string _icao;
        osg::ref_ptr<BoundaryNode> _boundary;
        bool _rendered;
    };

    typedef std::vector< osg::ref_ptr<AerodromeNode> > AerodromeNodeVector;

    typedef std::map< std::string, osg::ref_ptr<AerodromeNode> > AerodromeNodeMap;

} } // namespace osgEarth::Aerodrome

#endif // OSGEARTH_AERODROME_AERODROMENODE
