Annotation of parser3/src/include/pa_request_charsets.h, revision 1.1.2.3.2.3
1.1.2.1 paf 1: /** @file
2: Parser: request charsets class decl.
3:
1.1.2.3 paf 4: Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com)
1.1.2.1 paf 5: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
6: */
7:
8: #ifndef PA_REQUEST_CHARSETS_H
9: #define PA_REQUEST_CHARSETS_H
10:
1.1.2.3.2.3! paf 11: static const char* IDENT_REQUEST_CHARSETS_H="$Date: 2003/03/20 08:11:13 $";
1.1.2.1 paf 12:
13: class Request_charsets {
1.1.2.3.2.3! paf 14: friend class Temp_client_charset;
! 15:
1.1.2.1 paf 16: Charset *fsource;
17: Charset *fclient;
18: Charset *fmail;
19: public:
1.1.2.3.2.1 paf 20: Request_charsets(
1.1.2.1 paf 21: Charset& asource,
22: Charset& aclient,
1.1.2.3.2.2 paf 23: Charset& amail):
1.1.2.1 paf 24: fsource(&asource),
25: fclient(&aclient),
26: fmail(&amail) {}
27:
1.1.2.2 paf 28: Charset& source() const { return *fsource; } void set_source(Charset& asource) { fsource=&asource; }
29: Charset& client() const { return *fclient; } void set_client(Charset& aclient) { fclient=&aclient; }
30: Charset& mail() const { return *fmail; } void set_mail(Charset& amail) { fmail=&amail; }
1.1.2.3.2.3! paf 31: };
! 32:
! 33: class Temp_client_charset {
! 34: Request_charsets& fcharsets;
! 35: Charset &fclient;
! 36: public:
! 37:
! 38: Temp_client_charset(Request_charsets& acharsets, Charset& aclient):
! 39: fcharsets(acharsets),
! 40: fclient(acharsets.client()) {
! 41: fcharsets.set_client(aclient);
! 42: }
! 43: ~Temp_client_charset(){
! 44: fcharsets.set_client(fclient);
! 45: }
1.1.2.1 paf 46: };
47:
48: #endif
E-mail: