/**
 * @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 __LOCATIONCONTEXT_H
#define __LOCATIONCONTEXT_H

#ifndef __LOCATION_H
#include <iwlocator/location.h>
#endif

#ifndef __ATOMICCONTEXT_H
#include <iwear-context/atomiccontext.h>
#endif

#ifndef __CONTEXT_ENUM_H
#include <iwear-context/contextenums.h>
#endif

using namespace std;
using namespace iwear::sensor::location;

namespace iwear{
namespace context{

// forward declaration
class ContextManager;

/**
 * This is a subclass of AtomicContext. This class represents all
 * contexts for locations/positions. 
 */
class LocationContext : public AtomicContext{
private:
    
    /**
     * The last value we got from the locationmanager.
     */
    Location* location_value;

   /**
     * The value to compare with the location_value.
     */
    Location* compare_value;

protected:
public:
    
    /**
     * The constructor to be used to creat a new LocationContext. 
     */
    LocationContext(const string& name);
    
    /**
     * The destructor.
     */
    ~LocationContext(void);

    /**
     * Get the last location value from locationmanager.
     * @return Location 
     */
    Location* get_location_value();

    /**
     * Set the location_value
     * @param Location new_location_value
     */
    void set_location_values(Location* new_location_value);
    
    /**
     * Get the compare_value
     * @return Location
     */
    Location* get_compare_value();

    /**
     * Set the compare_value
     * @param Location new_compare_value
     */
    void set_compare_value(Location* new_compare_value);

}; // class LocationContext

} // namespace context
} // namespace iwear
#endif // __LOCATIONCONTEXT_H

