Annotation of parser3/src/types/pa_vresponse.h, revision 1.41
1.3 paf 1: /** @file
2: Parser: response class.
3:
1.41 ! misha 4: Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com)
1.21 paf 5: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.1 paf 6: */
7:
8: #ifndef PA_VRESPONSE_H
9: #define PA_VRESPONSE_H
1.23 paf 10:
1.41 ! misha 11: static const char * const IDENT_VRESPONSE_H="$Date: 2005-08-09 08:14:55 $";
1.1 paf 12:
1.3 paf 13: #include "pa_vstateless_object.h"
1.1 paf 14: #include "pa_string.h"
1.19 paf 15: #include "classes.h"
16:
1.41 ! misha 17: // defines
! 18: #define RESPONSE_CLASS_NAME "response"
! 19:
1.19 paf 20: // forwards
21:
22: class Response;
1.33 paf 23: class Request_info;
24: class Request_charsets;
1.9 paf 25:
1.11 parser 26: // externals
27:
1.33 paf 28: extern Methoded* response_class;
1.1 paf 29:
1.5 paf 30: /// value of type 'response'
1.33 paf 31: class VResponse: public VStateless_object {
32:
33: Request_info& finfo;
34: Request_charsets& fcharsets;
35:
36: HashStringValue ffields;
37:
1.1 paf 38: public: // Value
39:
1.41 ! misha 40: override const char* type() const { return RESPONSE_CLASS_NAME; }
1.33 paf 41: override VStateless_class *get_class() { return response_class; }
1.2 paf 42:
1.5 paf 43: /// Response: ffields
1.33 paf 44: override HashStringValue* get_hash() { return &ffields; }
1.1 paf 45:
1.8 paf 46: /// Response: method,fields
1.33 paf 47: override Value* get_element(const String& aname, Value& aself, bool /*looking_up*/);
1.1 paf 48:
1.5 paf 49: /// Response: (attribute)=value
1.39 paf 50: override const VJunction* put_element(Value& self, const String& name, Value* value, bool replace);
1.1 paf 51:
1.33 paf 52: public: // usage
1.1 paf 53:
1.33 paf 54: VResponse(Request_info& ainfo, Request_charsets& acharsets):
55: finfo(ainfo), fcharsets(acharsets) {}
1.12 parser 56:
1.33 paf 57: /// used in pa_request.C
58: HashStringValue& fields() { return ffields; }
1.1 paf 59:
1.33 paf 60: };
1.1 paf 61:
62:
63: #endif
E-mail: