/**
 * File: atomicfactorypower.h
 * Created by: <Joern Reimerdes>
 * Created on: 2004/10/13 18:00
 * @file
 * $Id$
 * $Revision$
 * $Author$
 * $Date$
 *
 * This file is a part of The iWear Framework.
 * In particular is this file a part of the Framework context Library
 *
 * 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 __ATOMIC_FACTORY_POWER_H_
#define __ATOMIC_FACTORY_POWER_H_

#include <iwear-context/atomicfactoryinterface.h>

using namespace std;
using namespace iwear::context;

namespace iwear{ 
namespace context{

class AtomicFactoryPower : public AtomicFactoryInterface
{
public:
    
    /** Creates the AtomicFactoryPower.
     *
     * @param ContextManager* context_manager The Manager is needed to
     * add and register ContextObjects.
     * @param ContextXMLHandler* context_xml_handler The
     * ContextXMLHandler is used for some helper medthods.
     */
    AtomicFactoryPower(ContextManager* context_manager, 
		       ContextXMLHandler* context_xml_handler)
	: AtomicFactoryInterface (context_manager, context_xml_handler){
    
	/* Sensor Types */
	sensor_type_enum_map = new map<const string, SensorType>;
	(*sensor_type_enum_map)["localsystem"] = LOCALSYSTEM;
    }

    /** Destroys the Factory and objects that where used in the factory.
     * @note Created ContextObjects will not be destroyed by this destructor.
     */
    virtual ~AtomicFactoryPower();

    /** This method created an PowerContext from the DOMElement.
     * 
     * @param string* context_name The name of the context that should
     * be created.
     * @param DOMElement* context_node The subnode of the
     * DOM atomic_node.
     */
    virtual ContextObject* create_atomic_context(string context_name, 
						 DOMElement* context_node);
    
protected:

private:

    /** Map for PowerContext Type XML names to enum values. */
    map<const string, PowerType>* power_type_enum_map;


}; // AtomicFactoryPower
}  // context
}  // iwear

#endif	//__ATOMIC_FACTORY_POWER_H_
