/*
 * This file is part of the Cforall project
 *
 * $Id: Constant.h,v 1.6 2005/08/29 20:59:25 rcbilson Exp $
 *
 */

#ifndef CONSTANT_H
#define CONSTANT_H

#include "SynTree.h"
#include "Visitor.h"
#include "Mutator.h"


class Constant
{
public:
    Constant( Type *type, std::string value );
    virtual ~Constant();

    Type *get_type() { return type; }
    void set_type( Type *newValue ) { type = newValue; }
    std::string get_value() { return value; }
    void set_value( std::string newValue ) { value = newValue; }

    virtual Constant *clone() const;
    virtual void accept( Visitor &v ) { v.visit( this ); }
    virtual Constant *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    virtual void print( std::ostream &os ) const;
    
private:
    Type *type;
    std::string value;
};




#endif /* #ifndef CONSTANT_H */
