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

//
// Attribute_string.h
//
// This file defines the class GT_Attribute_string.
//
//------------------------------------------ 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:08 $
// $Locker:  $
// $State: Exp $
//
//------------------------------------------ CVS
//
// (C) University of Passau 1995-1999, Graphlet Project
//


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


//////////////////////////////////////////
//
// GT_Attribute_string
//
//////////////////////////////////////////


class GT_Attribute_string : public GT_Attribute_Base {

    GT_CLASS (GT_Attribute_string, GT_Attribute_Base);
    
protected:
    string the_value;
public:

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

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

    // Value extraction
    virtual bool value_string (string& i) const;

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



inline void GT_Attribute_string::value (const string& v)
{
    the_value = v;
}


inline const string& GT_Attribute_string::value() const
{
    return the_value;
}


inline string& GT_Attribute_string::value()
{
    return the_value;
}

#endif
