//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project
//
//File: gsmptimermapvalue.cpp
//
//Version: $Revision: 1.2 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/06/18 05:21:58 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Harri Sunila
//
//Description:
//      See corresponding hearder file.
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History: 

#include "gsmptimermapvalue.h"

//
// Function: gsmpTimerMapValue
//
// Description:
//     Default constructor
//

gsmpTimerMapValue :: gsmpTimerMapValue(void)
    : _timer(),
      _messageType(0),
      _function(0)
{
    return;
}

//
// Function: gsmpTimerMapValue
//
// Description:
//     Constructor
//

gsmpTimerMapValue :: gsmpTimerMapValue(pfTimer &timer_,
                                       pfByte messageType_,
                                       pfUlong function_)
    : _timer(timer_),
      _messageType(messageType_),
      _function(function_)
{
    return;
}

//
// Function: gsmpTimerMapValue
//
// Description:
//     Copy constructor
//

gsmpTimerMapValue :: gsmpTimerMapValue(const gsmpTimerMapValue &other_)
    : _timer(other_._timer),
      _messageType(other_._messageType),
      _function(other_._function)
{
    return;
}

//
// Function: ~gsmpTimerMapValue
//
// Description:
//     Destructor
//

gsmpTimerMapValue :: ~gsmpTimerMapValue(void)
{
    if (_timer.isActive != 0)
    {
        _timer.stop();
    }
    return;
}

//
// Function: operator=
//
// Description:     
//

gsmpTimerMapValue &gsmpTimerMapValue :: operator=(
    const gsmpTimerMapValue &other_)
{
    if (this != &other_)
    {
        _timer = other_._timer;
        _messageType = other_._messageType;
        _function = other_._function;
    }
    return *this;
}

//
// Function: startTimer
//
// Description:
//     Start _timer
//

void gsmpTimerMapValue :: startTimer(void)
{
    if (_timer.isActive() == 0)
    {
        _timer.start();
    }
    return;
}

//
// Function: stopTimer
//
// Description:
//     Stop _timer
//

void gsmpTimerMapValue :: stopTimer(void)
{
    if (_timer.isActive() != 0)
    {
        _timer.stop();
    }
    return;
}

//
// Function: getMessageType
//
// Description:
//     Return the _messageType
//

pfByte gsmpTimerMapValue :: getMessageType(void) const
{
    return _messageType;
}

//
// Function: getFunction
//
// Description:
//     Return the _function
//

pfUlong gsmpTimerMapValue :: getFunction(void) const
{
    return _function;
}
