Annotation of parser3/src/types/pa_vcookie.h, revision 1.35
1.6 paf 1: /** @file
1.8 paf 2: Parser: @b cookie class decls.
1.6 paf 3:
1.34 misha 4: Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com)
1.15 paf 5: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.1 paf 6: */
7:
8: #ifndef PA_VCOOKIE_H
9: #define PA_VCOOKIE_H
1.17 paf 10:
1.35 ! misha 11: static const char * const IDENT_VCOOKIE_H="$Date: 2009-04-10 11:41:10 $";
1.1 paf 12:
1.7 paf 13: #include "pa_hash.h"
1.3 paf 14: #include "pa_common.h"
1.5 paf 15: #include "pa_value.h"
1.24 paf 16: #include "pa_sapi.h"
1.9 paf 17:
18: #define COOKIE_CLASS_NAME "cookie"
1.34 misha 19: static const String cookie_class_name(COOKIE_CLASS_NAME);
1.1 paf 20:
1.33 misha 21: // forwards
22: class Request_info;
23: class Request_charsets;
24:
1.6 paf 25: /// cookie class
1.24 paf 26: class VCookie: public Value {
27:
1.33 misha 28: HashStringValue before;
29: HashStringValue after;
30: HashStringValue deleted;
1.24 paf 31:
1.1 paf 32: public: // Value
33:
1.32 misha 34: override const char* type() const { return COOKIE_CLASS_NAME; }
1.16 paf 35: /// VCookie: 0
1.24 paf 36: override VStateless_class *get_class() { return 0; }
1.1 paf 37:
1.35 ! misha 38: // cookie: CLASS, CLASS_NAME, field
1.24 paf 39: override Value* get_element(const String& aname, Value& aself, bool /*looking_up*/);
1.1 paf 40: // cookie: field
1.30 paf 41: override const VJunction* put_element(Value& self, const String& name, Value* value, bool replace);
1.1 paf 42:
43: public: // usage
44:
1.33 misha 45: VCookie(Request_charsets& acharsets, Request_info& arequest_info);
1.24 paf 46: void output_result(SAPI_Info& sapi_info);
1.1 paf 47:
1.33 misha 48: private:
49: Request_charsets& fcharsets;
50: Request_info& frequest_info;
51:
52: private:
53: Charset* filled_source;
54: Charset* filled_client;
55:
56: bool should_refill();
57: void refill();
1.1 paf 58: };
59:
60: #endif
E-mail: