//-----------------------------------------------------------------------------
// File: Array.cpp
//-----------------------------------------------------------------------------
// Project: Kactus 2
// Author: Esko Pekkarinen
// Date: 03.08.2015
//
// Description:
// Implementation of ipxact:array element.
//-----------------------------------------------------------------------------

#include "Array.h"

//-----------------------------------------------------------------------------
// Function: Array::Array()
//-----------------------------------------------------------------------------
Array::Array(QString left, QString right):
Range(left, right)
{
    
}

//-----------------------------------------------------------------------------
// Function: Array::Array()
//-----------------------------------------------------------------------------
Array::Array(Array const& other):
    Range(other.getLeft(), other.getRight()),
    arrayId_(other.arrayId_)
{

}

//-----------------------------------------------------------------------------
// Function: Array::operator=()
//-----------------------------------------------------------------------------
Array& Array::operator=(Array const& other)
{
    if (this != &other)
    {
        Range::operator=(other);
        arrayId_ = other.arrayId_;
    }

    return *this;
}

//-----------------------------------------------------------------------------
// Function: Array::~Array()
//-----------------------------------------------------------------------------
Array::~Array()
{

}

//-----------------------------------------------------------------------------
// Function: Array::setId()
//-----------------------------------------------------------------------------
void Array::setId(QString const& id)
{
    arrayId_ = id;
}

//-----------------------------------------------------------------------------
// Function: Array::getId()
//-----------------------------------------------------------------------------
QString Array::getId() const
{
    return arrayId_;
}
