/* -*-c++-*- */
/* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
 * Copyright 2008-2010 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 OSGEARTHFEATURES_MARKER_FACTORY_H
#define OSGEARTHFEATURES_MARKER_FACTORY_H 1

#if 0

#include <osgEarthFeatures/Common>
#include <osgEarthFeatures/Session>
#include <osgEarthFeatures/Feature>
#include <osgEarthSymbology/MarkerSymbol>
#include <osg/Node>

namespace osgEarth { namespace Features
{
    using namespace osgEarth;
    using namespace osgEarth::Symbology;

    /**
     * Creates OSG nodes from Marker symbols.
     */
    class OSGEARTHFEATURES_EXPORT MarkerFactory
    {
    public:
        /**
         * Constructs a marker factory tied to the specified Session.
         */
        MarkerFactory(Session* session =0L);

        osg::Node* getOrCreateNode( const Feature* feature, const MarkerSymbol* symbol, bool useCache =true );

        /** Tries to create a new image from the marker's image() URI if it has one */
        osg::Image* getOrCreateImage( const MarkerSymbol* symbol, bool useCache =true );

        //URI getRawURI( const MarkerSymbol* symbol ) const;

        /**
         * Generates a marker node for a given URI.
         */
        //osg::Node* getOrCreateNode( const std::string& markerURI, bool useCache =true );

    protected:
        osg::Node* createFromURI( const URI& uri ) const;
        osg::Image* createImageFromURI( const URI& uri ) const;

    protected:
        osg::ref_ptr<Session> _session;
    };

} } // namespace osgEarth::Features

#endif

#endif // OSGEARTHFEATURES_MARKER_FACTORY_H
