# File      : array.py
# Author    : Jose Amores <biomol at gmail dot com>

__author__ = "Jose Amores"
__email__ = "biomol at gmail dot com"

# -------------
# -- IMPORTS --
# -------------
from core.coreError import Error as error
from baseObject import baseObject

class array_(baseObject):
    def __init__(self,name,type,size=1,fullName='',desc=''):
        # instance variables
        self.size = size

        # superclass init
        baseObject.__init__(self,name,type,fullName,desc)

        if(size<=0):
            raise error("data,array","array length should be > 0")

    def __str__(self):
        msg = "**Array**"
        msg +="\n  name : "+self.name
        msg += "\n  type : "+self.type
        msg += "\n  size : "+str(self.size)
        return(msg)


