| Polaris: StringConstExpr.h Source File | ||
|
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members
StringConstExpr.hGo to the documentation of this file.00001 /// 00002 #ifndef _STRING_CONST_EXPR_H 00003 #define _STRING_CONST_EXPR_H 00004 /// 00005 /// \class StringConstExpr 00006 /// \brief An expression representing a string constant 00007 /// \defgroup Polaris 00008 /// \ingroup Polaris 00009 /// Expression 00010 /// \see Expression/StringConstExpr.h 00011 /// \see Expression/StringConstExpr.h 00012 /// \see Expression/Expression.cc 00013 /// 00014 /// \endcode 00015 /// \section Description Description 00016 /// A StringConstExpr is a string constant expression. 00017 /// Note that any string assigned as a StringConst is expected 00018 /// to have its own quotes, I.E. a_string.data("\"Howdy\""). 00019 /// 00020 /// Its single field, which is a string, is accessed through the 00021 /// methods data(), str_data(), and data_ref(). See StringExpr.h for 00022 /// more information about these methods. 00023 /// 00024 #ifdef POLARIS_GNU_PRAGMAS 00025 #pragma interface 00026 #endif 00027 /// 00028 #ifndef _STRING_EXPR_H 00029 #include "StringExpr.h" 00030 #endif 00031 /// 00032 class StringConstExpr : public StringExpr { 00033 friend class ExprTable; 00034 00035 public: 00036 inline StringConstExpr(const char *data_string); 00037 inline StringConstExpr(const StringConstExpr & e); 00038 virtual ~StringConstExpr(); 00039 00040 virtual StringConstExpr & operator = (const StringConstExpr &); 00041 00042 virtual Expression *clone() const; 00043 virtual int structures_OK() const; 00044 virtual void convert(BinRep & exprSet, Symtab & symtab); 00045 ///< See Expression.h. 00046 00047 virtual int exchange_expr( VDL & vdl ); 00048 ///< Create a node in the "expression" member and return the index. 00049 00050 protected: 00051 inline StringConstExpr(); 00052 }; 00053 00054 00055 ///< inline implementations 00056 00057 inline 00058 StringConstExpr::StringConstExpr() 00059 : StringExpr(STRING_CONSTANT_OP, make_type(CHARACTER_TYPE)) 00060 { 00061 ///< nothing to do 00062 } 00063 00064 inline 00065 StringConstExpr::StringConstExpr(const char *data_string) 00066 : StringExpr(STRING_CONSTANT_OP, make_type(CHARACTER_TYPE, 00067 fortran_string_length(data_string)), 00068 data_string) 00069 { 00070 ///< nothing to do 00071 } 00072 00073 inline 00074 StringConstExpr::StringConstExpr(const StringConstExpr & e) 00075 : StringExpr(e) 00076 { 00077 ///< nothing to do 00078 } 00079 00080 #endif |
||
|