/* This software is distributed under the Lesser General Public License */
#ifndef GT_ATTRIBUTE_LIST_H
#define GT_ATTRIBUTE_LIST_H

//
// Attribute_list.h
//
// This file defines the classes
//   Gt_Attribute_list
//
//------------------------------------------ CVS
//
// CVS Headers -- The following headers are generated by the CVS
// version control system. Note that especially the attribute
// Author is not necessarily the author of the code.
//
// $source: /home/br/CVS/graphlet/src/gt_base/Attributes.h,v $
// $Author: himsolt $
// $Revision: 1.3 $
// $Date: 1999/03/05 20:43:04 $
// $Locker:  $
// $State: Exp $
//
//------------------------------------------ CVS
//
// (C) University of Passau 1995-1999, Graphlet Project
//


#include "Attribute_Base.h"

#ifndef GT_LIST_OF_ATTRIBUTES
#include "List_of_Attributes.h"
#endif

#ifndef GT_TAGGED_ATTRIBUTES
#include "Tagged_Attributes.h"
#endif


//////////////////////////////////////////
//
// Gt_Attribute_list
//
//////////////////////////////////////////


class GT_Attribute_list : public GT_Attribute_Base {

    GT_CLASS (GT_Attribute_list, GT_Attribute_Base);
	
    GT_List_of_Attributes* the_value;

public:
    GT_Attribute_list (const GT_Key key, GT_List_of_Attributes* l,
	const int flags = 0);
    GT_Attribute_list (const GT_Key key, GT_Tagged_Attributes* l,
	const int flags = 0);
    virtual ~GT_Attribute_list ();

    // Value
    inline void value (GT_List_of_Attributes* v);    
    inline const GT_List_of_Attributes* value() const;
    inline GT_List_of_Attributes* value();

    // Value extraction
    virtual bool value_list (GT_List_of_Attributes*& i) const;
    virtual bool value_list (const GT_List_of_Attributes*& i) const;

    // Cloning: virtual copy constructor
    void copy (const GT_Attribute_list* from, GT_Copy type);
    virtual GT_Attribute_Base* clone (GT_Copy type) const;

    // Printing
    virtual void print (ostream &out) const;
    virtual bool do_print () const;
};



inline void GT_Attribute_list::value (GT_List_of_Attributes* v)
{
    the_value = v;
}


inline const GT_List_of_Attributes* GT_Attribute_list::value() const
{
    return the_value;
}


inline GT_List_of_Attributes* GT_Attribute_list::value()
{
    return the_value;
}


#endif
