//  Copyright (c) 2001, Reson, Inc. All Rights Reserved.
//
//  Filename:   SensorItem.h
//
//  Project:    6046
//
//  Author(s):  W. Arcus
//
//  Purpose:    
//
//  Notes:      
//

#if !defined(AFX_SENSORITEM_H__1EA8B8AB_7CFA_42E4_871F_5BB634AD083F__INCLUDED_)
#define AFX_SENSORITEM_H__1EA8B8AB_7CFA_42E4_871F_5BB634AD083F__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Sensor.h"

class CSensorItem
{
public:

    ///////////////
    // Attributes.

    const int       m_iInvalidSensorIndex;

    int             m_iIndex;
    CSensor        *m_pSensor;

    ///////////////
    // Services.

                    CSensorItem         (   void );
                    CSensorItem         (   CSensor * const       &rpSensor,
                                            const int             &riIndex );

                    CSensorItem         (   const CSensorItem     &rRhs );      // Not implemented.

    CSensorItem &   operator =          (   const CSensorItem     &rRhs );      // Not implemented.

    virtual        ~CSensorItem         (   void );

    void            Invalidate          (   void );
    bool            IsValid             (   void );
    void            Destroy             (   void );

    bool            operator <          (   const CSensorItem     &rRhs )     const;

    bool            operator ==         (   const CSensorItem     &rRhs )     const;
    bool            operator ==         (   const int             &riIndex )  const;

};

///////////////
// Defintions.

#pragma warning( push, 3 )              // Microsoft's STL is dirty at warning level 4
#include <list>
#pragma warning( pop )

typedef std::list<CSensorItem>      SensorList_t;
typedef SensorList_t::iterator      SensorListIterator_t;

#include "EdgeTechMessage.h"

typedef bool ( * PFN_HANDLER_CALLBACK ) (   CEdgeTechMessage    &rEdgeTechMessage,
                                            const unsigned long &rulTimestamp,
                                            void                *pvParam );

#endif // !defined(AFX_SENSORITEM_H__1EA8B8AB_7CFA_42E4_871F_5BB634AD083F__INCLUDED_)
