--- parser3/src/main/pa_globals.C 2001/03/18 13:38:47 1.11 +++ parser3/src/main/pa_globals.C 2001/03/19 21:59:17 1.19 @@ -1,9 +1,11 @@ -/* - Parser +/** @file + Parser: globals. + Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_globals.C,v 1.11 2001/03/18 13:38:47 paf Exp $ + $Id: pa_globals.C,v 1.19 2001/03/19 21:59:17 paf Exp $ */ #include "pa_globals.h" @@ -15,11 +17,18 @@ #include "_env.h" #include "_request.h" #include "_response.h" +#include "_file.h" Service_funcs service_funcs; String *content_type_name; String *body_name; +String *value_name; +String *expires_name; +String *path_name; +String *name_name; +String *size_name; +String *text_name; String *exception_method_name; @@ -36,6 +45,7 @@ String *table_class_name; String *form_class_name; String *request_class_name; String *response_class_name; +String *cookie_class_name; String *result_var_name; @@ -84,6 +94,12 @@ void globals_init(Pool& pool) { // names content_type_name=new(pool) String(pool, CONTENT_TYPE_NAME); body_name=new(pool) String(pool, BODY_NAME); + value_name=new(pool) String(pool, VALUE_NAME); + expires_name=new(pool) String(pool, EXPIRES_NAME); + path_name=new(pool) String(pool, PATH_NAME); + name_name=new(pool) String(pool, NAME_NAME); + size_name=new(pool) String(pool, SIZE_NAME); + text_name=new(pool) String(pool, TEXT_NAME); exception_method_name=new(pool) String(pool, EXCEPTION_METHOD_NAME); @@ -100,6 +116,7 @@ void globals_init(Pool& pool) { form_class_name=new(pool) String(pool, FORM_CLASS_NAME); request_class_name=new(pool) String(pool, REQUEST_CLASS_NAME); response_class_name=new(pool) String(pool, RESPONSE_CLASS_NAME); + cookie_class_name=new(pool) String(pool, COOKIE_CLASS_NAME); result_var_name=new(pool) String(pool, RESULT_VAR_NAME); @@ -113,6 +130,10 @@ void globals_init(Pool& pool) { untaint_lang_name2enum=new(pool) Hash(pool); String as_is(pool, "as-is"); untaint_lang_name2enum->put(as_is, (int)String::Untaint_lang::AS_IS); + String header(pool, "header"); + untaint_lang_name2enum->put(header, (int)String::Untaint_lang::HEADER); + String uri(pool, "uri"); + untaint_lang_name2enum->put(uri, (int)String::Untaint_lang::URI); String table(pool, "table"); untaint_lang_name2enum->put(table, (int)String::Untaint_lang::TABLE); String sql(pool, "sql"); @@ -129,6 +150,7 @@ void globals_init(Pool& pool) { initialize_double_class(pool, *(double_class=new(pool) VStateless_class(pool))); double_class->freeze(); initialize_int_class(pool, *(int_class=new(pool) VStateless_class(pool))); int_class->freeze(); initialize_table_class(pool, *(table_class=new(pool) VStateless_class(pool))); table_class->freeze(); + initialize_file_class(pool, *(file_class=new(pool) VStateless_class(pool))); file_class->freeze(); // read-only stateless base classes initialize_env_base_class(pool, *(env_base_class=new(pool) VStateless_class(pool))); env_base_class->set_name(*env_class_name); env_base_class->freeze();