/*
 * SPDX-FileCopyrightText: 2004 Copyright contributors to the cppTango project
 *
 * SPDX-License-Identifier: LGPL-3.0-or-later
 */

#ifndef TANGO_SERVER_ATTRPROPERTY_H
#define TANGO_SERVER_ATTRPROPERTY_H

#include <string>
#include <vector>

namespace Tango
{
class Attr;

//=============================================================================
//
//            The AttrProperty class
//
//
// description :    This class is used to store a pair of attribute name,
//            attribute value. Both name and value are stored as
//            string
//
//=============================================================================

class AttrProperty
{
  public:
    AttrProperty(const std::string &name, const std::string &value);
    AttrProperty(const std::string &name, long value);
    ~AttrProperty();

    AttrProperty(const AttrProperty &);
    AttrProperty &operator=(const AttrProperty &);

    AttrProperty(AttrProperty &&);
    AttrProperty &operator=(AttrProperty &&);

    std::string &get_value()
    {
        return attr_value;
    }

    std::string const &get_value() const
    {
        return attr_value;
    }

    long get_lg_value() const
    {
        return attr_lg;
    }

    std::string &get_name()
    {
        return attr_name;
    }

    std::string const &get_name() const
    {
        return attr_name;
    }

    void convert(const char *);

  private:
    std::string attr_name;
    std::string attr_value;
    long attr_lg;
};

} // namespace Tango

#endif // TANGO_SERVER_ATTRPROPERTY_H
