--- parser3/src/include/pa_string.h 2004/05/24 12:21:18 1.162 +++ parser3/src/include/pa_string.h 2004/10/07 09:22:07 1.164 @@ -8,10 +8,9 @@ #ifndef PA_STRING_H #define PA_STRING_H -static const char * const IDENT_STRING_H="$Date: 2004/05/24 12:21:18 $"; +static const char * const IDENT_STRING_H="$Date: 2004/10/07 09:22:07 $"; // includes - #include "pa_types.h" #include "pa_array.h" @@ -20,6 +19,8 @@ extern "C" { // cord's author forgot to #include "cord.h" }; +// defines + // cord extension /* Returns true if x does contain */ /* char not_c at positions i..i+n. Value i,i+n must be < CORD_len(x). */ @@ -90,7 +91,6 @@ public: L_HTTP_HEADER='h', ///< text in HTTP response header L_MAIL_HEADER='m', ///< text in mail header L_URI='U', ///< text in uri - L_TABLE='L', ///< ^table:set body L_SQL='Q', ///< ^table:sql body L_JS='J', ///< JavaScript code L_XML='X', ///< ^dom:set xml @@ -153,6 +153,7 @@ public: public: const char* v() const; + void dump() const; Languages(): langs(0) {} Languages(Language alang) { @@ -241,7 +242,7 @@ public: callback(opt.lang, get_length(current), info); } - bool invariant(size_t current_length) { + bool invariant(size_t current_length) const { if(!langs) return current_length==0; if(opt.is_not_just_lang) @@ -257,6 +258,7 @@ public: public: const char* v() const; + void dump() const; Body(): body(CORD_EMPTY) {} Body(CORD abody): body(abody) { @@ -374,9 +376,9 @@ private: Languages langs; ///< string characters lang const char* v() const; - -#define ASSERT_STRING_INVARIANT(string) \ - assert((string).langs.invariant((string).body.length())) + void dump() const; + #define ASSERT_STRING_INVARIANT(string) \ + assert((string).langs.invariant((string).body.length())) public: