--- parser3/src/include/pa_request.h 2001/07/07 16:38:01 1.91 +++ parser3/src/include/pa_request.h 2001/09/30 09:56:43 1.99 @@ -2,10 +2,9 @@ Parser: request class decl. Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_request.h,v 1.91 2001/07/07 16:38:01 parser Exp $ + $Id: pa_request.h,v 1.99 2001/09/30 09:56:43 parser Exp $ */ #ifndef PA_REQUEST_H @@ -27,6 +26,13 @@ #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, \ @@ -81,10 +87,10 @@ public: BEWARE: may throw exception to you: catch it! */ void core( - const char *root_auto_path, ///< path to system auto.p file - bool root_auto_fail, ///< fail if system auto.p file not found - const char *site_auto_path, ///< path to site auto.p file - bool site_auto_fail, ///< fail if site auto.p file not found + const char *root_config_filespec, ///< system config filespec + bool root_config_fail_on_read_problem, ///< fail if system config file not found + const char *site_config_filespec, ///< site config filespec + bool site_config_fail_on_read_problem, ///< fail if site config file not found bool header_only); /// executes ops @@ -92,7 +98,8 @@ public: /// compiles the file, maybe forcing it's class @a name and @a base_class. VStateless_class *use_file( - const String& file_spec, bool fail_on_read_problem=true, + const String& file_name, + bool ignore_class_path=false, bool fail_on_read_problem=true, const String *name=0, VStateless_class *base_class=0); // core.C /// compiles a @a source buffer @@ -140,6 +147,9 @@ public: /// returns the mime type of 'user_file_name_cstr' const String& mime_type_of(const char *user_file_name_cstr); + /// PCRE character tables + unsigned char *pcre_tables(); + public: /// info from web server @@ -172,13 +182,10 @@ public: /// connection SQL_Connection *connection; - /// PCRE character tables - unsigned char *pcre_tables; /// classes configured data Hash classes_conf; - private: // core data /// classes @@ -195,16 +202,21 @@ private: // core data */ uint anti_endless_execute_recoursion; + /// charset->pcre_tables+XML256TableTranscoder [Request_CTYPE_value] + Hash CTYPE; + private: // compile.C VStateless_class& real_compile(COMPILE_PARAMS); private: // execute.C - const String *execute_method(Value& aself, const Method& method, - bool return_cstr=true); - const String *execute_method(Value& aself, const String& method_name, - bool return_cstr=true); + const String *execute_method(Value& aself, + const Method& method, bool return_cstr=true); + const String *execute_virtual_method(Value& aself, + const String& method_name, bool return_cstr=true); + const String *execute_nonvirtual_method(VStateless_class& aclass, + const String& method_name, bool return_cstr=true); Value *get_element(); @@ -238,6 +250,22 @@ 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;