Annotation of parser3/src/types/pa_vresponse.h, revision 1.29
1.3 paf 1: /** @file
2: Parser: response class.
3:
1.20 paf 4: Copyright (c) 2001, 2002 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.29 ! paf 11: static const char* IDENT_VRESPONSE_H="$Date: 2002/08/14 14:18:31 $";
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:
17: // forwards
18:
19: class Response;
1.9 paf 20:
1.11 parser 21: // externals
22:
1.9 paf 23: extern Methoded *response_class;
1.1 paf 24:
1.5 paf 25: /// value of type 'response'
1.3 paf 26: class VResponse : public VStateless_object {
1.1 paf 27: public: // Value
28:
29: const char *type() const { return "response"; }
1.22 paf 30: VStateless_class *get_class() { return response_class; }
1.2 paf 31:
1.5 paf 32: /// Response: ffields
1.16 parser 33: Hash *get_hash(const String * /*source*/) { return &ffields; }
1.1 paf 34:
1.8 paf 35: /// Response: method,fields
1.28 paf 36: Value *get_element(const String& aname, Value *aself, bool /*looking_up*/);
1.1 paf 37:
1.5 paf 38: /// Response: (attribute)=value
1.26 paf 39: /*override*/ bool put_element(const String& aname, Value *avalue, bool replace);
1.1 paf 40:
41: public: // usage
42:
1.22 paf 43: VResponse(Pool& apool) : VStateless_object(apool),
1.1 paf 44: ffields(apool) {
45: }
1.11 parser 46: public:
1.12 parser 47:
1.1 paf 48: Hash& fields() { return ffields; }
49:
50: private:
51:
52: Hash ffields;
53:
54: };
1.29 ! paf 55:
! 56: // helper funcs
! 57:
! 58: /**
! 59: $content-type[text/html] ->
! 60: content-type: text/html
! 61: $content-type[$value[text/html] charset[windows-1251]] ->
! 62: content-type: text/html; charset=windows-1251
! 63: */
! 64: const String& attributed_meaning_to_string(Value& meaning, String::Untaint_lang lang);
1.1 paf 65:
66: #endif
E-mail: