Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

CkASTNodeBase.hpp

00001 /*
00002  * Copyright (c) 2003, Raymond Bosman
00003  * Copyright (c) 2003, Frederik Holljen
00004  * All Rights Reserved.
00005  *
00006  * See COPYING for licensing.
00007  */
00008 
00009 
00010 #ifndef CKASTNODEBASE_HPP
00011 #define CKASTNODEBASE_HPP
00012 
00013 #include <antlr/CommonAST.hpp>
00014 #include <antlr/config.hpp>
00015 #include <string>
00016 
00017 #include "../tools/datatype.hpp"
00018 
00020 
00027 class CkASTNodeBase : public ANTLR_USE_NAMESPACE(antlr)CommonAST
00028 {
00029  public:
00030     CkASTNodeBase();
00031     CkASTNodeBase( ANTLR_USE_NAMESPACE(antlr)RefToken t );
00032     CkASTNodeBase( const CkASTNodeBase& other );
00033     virtual ~CkASTNodeBase();
00034 
00035     virtual ANTLR_USE_NAMESPACE(antlr)RefAST clone( ) const;
00036 
00037     void initialize(int t, const ANTLR_USE_NAMESPACE(std)string& txt);
00038     void initialize(ANTLR_USE_NAMESPACE(antlr)RefAST t);
00039     void initialize(ANTLR_USE_NAMESPACE(antlr)RefToken tok);
00040 
00041 #ifdef ANTLR_SUPPORT_XML
00042     virtual void initialize( ANTLR_USE_NAMESPACE(std)istream& in );
00043 #endif
00044 
00045     static ANTLR_USE_NAMESPACE(antlr)RefAST factory( );
00046 
00047     /*** ALL THE ABOVE IS NEEDED BY ANTLR, NOW OVER TO OUR STUFF  ***/
00048 
00050     unsigned int getLine() const { return LineNr; }
00052     void setLine( unsigned int line ) { LineNr = line; }
00053 
00055 
00059     void setResultType( CkDataType::Types type ) { ResultType.setReturnType( type ); }
00060     void setResultType( const CkDataType &type );
00061 
00063     const CkDataType &getResultType() const { return ResultType; }
00064 
00066 
00069     void setIgnoreScope( bool ignore ) { IgnoreScope = ignore; }
00070 
00072 
00075     bool getIgnoreScope() const { return IgnoreScope; }
00076 
00077  private:
00078     unsigned int LineNr;
00079 
00080 //    CkDataType::Types ResultType;
00081     CkDataType ResultType;
00082     bool IgnoreScope;
00083 };
00084 
00085 typedef antlr::ASTRefCount<CkASTNodeBase> RefCkASTNodeBase;
00086 
00087 #endif // CKASTNODEBASE_HPP

Generated on Mon Dec 1 14:26:27 2003 for Ck by doxygen 1.3.3