#!/usr/bin/env python
#############################################################################
# Copyright (C) DSTC Pty Ltd (ACN 052 372 577) 1997, 1998, 1999
# All Rights Reserved.
#
# The software contained on this media is the property of the DSTC Pty
# Ltd.  Use of this software is strictly in accordance with the
# license agreement in the accompanying LICENSE.HTML file.  If your
# distribution of this software does not contain a LICENSE.HTML file
# then you have no rights to use this software in any manner and
# should contact DSTC at the address below to determine an appropriate
# licensing arrangement.
# 
#      DSTC Pty Ltd
#      Level 7, GP South
#      Staff House Road
#      University of Queensland
#      St Lucia, 4072
#      Australia
#      Tel: +61 7 3365 4310
#      Fax: +61 7 3365 4311
#      Email: enquiries@dstc.edu.au
# 
# This software is being provided "AS IS" without warranty of any
# kind.  In no event shall DSTC Pty Ltd be liable for damage of any
# kind arising out of or in connection with the use or performance of
# this software.
#
# Project:      Fnorb
# File:         $Source: /cvsroot/fnorb/fnorb/parser/Declarator.py,v $
# Version:      @(#)$RCSfile: Declarator.py,v $ $Revision: 1.4 $
#
#############################################################################
""" IDL Declarator classes. """


class Declarator:
    """ Abstract Declarator class. """

    def __init__(self, name):
	""" Constructor. """

	self._name = name
	return

    def name(self):
	""" Return the declarator's name. """

	return self._name

	
class SimpleDeclarator(Declarator):
    """ Simple declarator class. """

    pass


class ArrayDeclarator(Declarator):
    """ Array declarator class. """

    def __init__(self, name, dimensions):
	""" Constructor. """

	# Base class constructor.
	Declarator.__init__(self, name)

	self.__dimensions = dimensions
	return

    def dimensions(self):
	""" Return the declarator's dimensions. """

	return self.__dimensions

#############################################################################
