--- parser3/src/include/pa_request.h 2001/09/30 09:56:43 1.99 +++ parser3/src/include/pa_request.h 2001/10/15 11:48:04 1.103 @@ -4,7 +4,7 @@ Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_request.h,v 1.99 2001/09/30 09:56:43 parser Exp $ + $Id: pa_request.h,v 1.103 2001/10/15 11:48:04 parser Exp $ */ #ifndef PA_REQUEST_H @@ -26,13 +26,6 @@ #include "pa_vcookie.h" #include "pa_sql_driver_manager.h" -#ifdef XML -# include -# include -# include -# include -#endif - #ifndef NO_STRING_ORIGIN # define COMPILE_PARAMS \ const char *source, \ @@ -148,7 +141,7 @@ public: const String& mime_type_of(const char *user_file_name_cstr); /// PCRE character tables - unsigned char *pcre_tables(); + const unsigned char *pcre_tables(); public: @@ -202,7 +195,7 @@ private: // core data */ uint anti_endless_execute_recoursion; - /// charset->pcre_tables+XML256TableTranscoder [Request_CTYPE_value] + /// charset->pcre_tables Hash CTYPE; private: // compile.C @@ -250,22 +243,6 @@ private: void output_result(const VFile& body_file, bool header_only); }; -/// Request::CTYPE hash value -class Request_CTYPE_value : public Pooled { -public: - /// PCRE character tables - unsigned char *pcre_tables; -#ifdef XML - /// Xalan transformer for this charset - XML256TableTranscoder *transcoder; -#endif - - Request_CTYPE_value(Pool& apool, - unsigned char * apcre_tables, XML256TableTranscoder *atranscoder) : Pooled(apool), - pcre_tables(apcre_tables), transcoder(atranscoder) { - } -}; - /// Auto-object used for temporary changing Request::flang. class Temp_lang { Request& frequest; @@ -304,12 +281,16 @@ public: return get_as(index, false, msg); } /// handy expression auto-processing to double - double as_double(int index, Request& r) { - return get_processed(index, r).as_double(); + double as_double(int index, const char *msg, Request& r) { + return get_processed(index, msg, r).as_double(); } /// handy expression auto-processing to int - int as_int(int index, Request& r) { - return get_processed(index, r).as_int(); + int as_int(int index, const char *msg, Request& r) { + return get_processed(index, msg, r).as_int(); + } + /// handy expression auto-processing to bool + bool as_bool(int index, const char *msg, Request& r) { + return get_processed(index, msg, r).as_bool(); } /// handy string ensurer const String& as_string(int index, const char *msg) { @@ -328,8 +309,8 @@ private: return result; } - Value& get_processed(int index, Request& r) { - return r.process(get(index), + Value& get_processed(int index, const char *msg, Request& r) { + return r.process(as_junction(index, msg), 0/*no name*/, false/*don't intercept string*/); }