//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project / IE
//
//File: callstate.cpp
//
//Version: $Revision: 1.5 $
//
//State: $State: Exp $
//
//Date: $Date: 1999/03/08 07:25:51 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Sami Raatikainen
//
//Description:
//      See corresponding header file.
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History: 

#include "callstate.h"
#include "pf/error.h"

ieCallState :: ieCallState(pfUlong callState_)
    : ieInformationElement(),
      _value(callState_)
{
    return;
}

ieCallState :: ieCallState(
    const ieCallState &other_)
    : _value(other_._value)
{
    return;
}

ieCallState :: ~ieCallState(void)
{
    return;
}

const ieCallState &ieCallState :: operator=(
    const ieCallState &other_)
{
    if (&other_ != this)
    {
        _value = other_._value;
    }
    return *this;
}

pfIE *ieCallState :: clone(void) const
{
    ieCallState *newIe = new ieCallState(*this);
    return (pfIE *)newIe;
}

ieCallState* ieCallState :: narrow(pfIE *ie_)
{
    ieCallState *result =
        dynamic_cast<ieCallState*>(ie_);
    THROW_IF_DYNAMIC_CAST_FAILED(result);
    return result;
}

void ieCallState :: setCallState(pfUlong value_)
{
    _value = value_;
    return;
}

pfUlong ieCallState :: getCallState(void) const
{
    return _value;
}
