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

//
// Attribute_int.h
//
// This file defines the class GT_Attribute_int.
//
//------------------------------------------ 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.2 $
// $Date: 1999/03/05 20:43:01 $
// $Locker:  $
// $State: Exp $
//
//------------------------------------------ CVS
//
// (C) University of Passau 1995-1999, Graphlet Project
//


#ifndef GT_ATTRIBUTE_BASE_H
#include "Attribute_Base.h"
#endif


//////////////////////////////////////////
//
// GT_Attribute_int
//
//////////////////////////////////////////


class GT_Attribute_int : public GT_Attribute_Base {

    GT_CLASS (GT_Attribute_int, GT_Attribute_Base);
    
protected:
    int the_value;
public:

    GT_Attribute_int (const GT_Key key, const int& i,
	const int flags = 0);
    virtual ~GT_Attribute_int();

    // Value
    inline void value (const int v);    
    inline const int value() const;
    inline int& value();

    // Value extraction
    virtual bool value_int (int& i) const;

    // Printing
    virtual void print (ostream &out) const;
    
    // Cloning: virtual copy constructor
    void copy (const GT_Attribute_int* from, GT_Copy type);
    virtual GT_Attribute_Base* clone (GT_Copy type) const;
};





inline void GT_Attribute_int::value (const int v)
{
    the_value = v;
}


inline const int GT_Attribute_int::value() const
{
    return the_value;
}


inline int& GT_Attribute_int::value()
{
    return the_value;
}


#endif
