//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project / mgmt module
//
//File: mgmtcommand.h
//
//Version: $Revision: 1.7 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/09/17 17:13:07 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Timo Kokkonen
//
//Description:
//      Class that can use to build and use corba interface execute properties.
//
//      Possible exceptions: pfOutOfRangeException(PF_EX_INFO)
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History:
//
#ifndef __MGMT_COMMAND_H__
#define __MGMT_COMMAND_H__

#include <typeinfo>
#include <string>
#include <OB/CORBA.h>

#include "pf/types.h"
#include "toveswitch.h"

class mgmtCommand
{
    public:
        mgmtCommand(const string &command_);
        mgmtCommand(const string &command_,
                    const toveSwitch_ParameterList &list_);
        virtual ~mgmtCommand(void);
        const mgmtCommand &operator=(const mgmtCommand &other_);

        string getCommandName(void) const;
        toveSwitch_ParameterList getList(void) const;
        void getNextParameter(string &name_, string &value_, string &type_);
        void getNextParameter(string &name_, string &value_);
        void getNextParameter(string &value_);        

        pfUlong getCommandLength(void) const;
        void setCurrentTheFirst(void);

        void addParameter(const string &name_,
                          const string &value_,
                          const string &type_);
        void addParameter(const string &name_, const string &value_);

    private:
        string _command;
        pfUlong _nextParameter;
        toveSwitch_ParameterList _list;
};

#endif // __MGMT_COMMAND_H__
