| Polaris: KeyExpr.h Source File | ||
|
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members
KeyExpr.hGo to the documentation of this file.00001 /// 00002 #ifndef _KEY_EXPR_H 00003 #define _KEY_EXPR_H 00004 /// 00005 /// \class KeyExpr 00006 /// \brief An expression representing a keyword. 00007 /// \defgroup Polaris 00008 /// \ingroup Polaris 00009 /// Expression 00010 /// \see Expression/KeyExpr.h 00011 /// \see Expression/KeyExpr.h 00012 /// 00013 /// \endcode 00014 /// \section DESCRIPTION DESCRIPTION 00015 /// It's value can be accessed by the methods data(), str_data(), 00016 /// and data_ref(). See StringExpr.h for more information about these methods. 00017 /// 00018 #ifdef POLARIS_GNU_PRAGMAS 00019 #pragma interface 00020 #endif 00021 /// 00022 #ifndef _STRING_EXPR_H 00023 #include "StringExpr.h" 00024 #endif 00025 /// 00026 class KeyExpr : public StringExpr { 00027 friend class ExprTable; 00028 00029 public: 00030 inline KeyExpr(const char *data_string); 00031 inline KeyExpr(const KeyExpr & e); 00032 virtual ~KeyExpr(); 00033 00034 virtual KeyExpr & operator = (const KeyExpr &); 00035 00036 virtual Expression *clone() const; 00037 virtual int structures_OK() const; 00038 virtual void convert(BinRep & exprSet, Symtab & symtab); 00039 ///< See Expression.h. 00040 00041 virtual int exchange_expr( VDL & vdl ); 00042 ///< Create a node in the "expression" member and return the index. 00043 00044 protected: 00045 inline KeyExpr(); 00046 }; 00047 00048 00049 ///< inline implementations 00050 00051 inline 00052 KeyExpr::KeyExpr() 00053 : StringExpr(KEY_OP, make_type(LOGICAL_TYPE)) 00054 { 00055 ///< nothing to do 00056 } 00057 00058 inline 00059 KeyExpr::KeyExpr(const char *data_string) 00060 : StringExpr(KEY_OP, make_type(VOID_TYPE), data_string) 00061 { 00062 ///< nothing to do 00063 } 00064 00065 inline 00066 KeyExpr::KeyExpr(const KeyExpr & e) 00067 : StringExpr(e) 00068 { 00069 ///< nothing to do 00070 } 00071 00072 #endif |
||
|