|
|
| version 1.42, 2001/03/19 16:44:00 | version 1.45, 2001/03/19 20:46:36 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser | Parser: string class decl. |
| Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) |
| Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) | Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) |
| $Id$ | $Id$ |
| Line 82 public: | Line 84 public: |
| just a flag, that value not stored | just a flag, that value not stored |
| */ | */ |
| AS_IS, ///< leave all characters intact | AS_IS, ///< leave all characters intact |
| FILE, ///< filename | |
| HEADER, ///< text in response header | HEADER, ///< text in response header |
| URI, ///< text in uri | URI, ///< text in uri |
| TABLE, ///< ^table:set body | TABLE, ///< ^table:set body |
| Line 99 public: | Line 102 public: |
| /// convert to C string | /// convert to C string |
| char *cstr() const; | char *cstr() const; |
| String& real_append(STRING_APPEND_PARAMS); | String& real_append(STRING_APPEND_PARAMS); |
| /// \return <0 ==0 or >0 depending on comparison result | /// @return <0 ==0 or >0 depending on comparison result |
| int cmp (const String& src) const; | int cmp (const String& src) const; |
| bool operator < (const String& src) const { return cmp(src)<0; } | bool operator < (const String& src) const { return cmp(src)<0; } |
| bool operator > (const String& src) const { return cmp(src)>0; } | bool operator > (const String& src) const { return cmp(src)>0; } |
| Line 126 public: | Line 129 public: |
| #ifndef NO_STRING_ORIGIN | #ifndef NO_STRING_ORIGIN |
| /// origin of string. calculated by first row | /// origin of string. calculated by first row |
| const Origin& origin() const { | const Origin& origin() const; |
| if(!fused_rows) | |
| THROW(0, 0, | |
| 0, | |
| "String::origin() of empty string called"); | |
| return head.rows[0].item.origin; | |
| } | |
| #endif | #endif |
| private: | private: |