Annotation of parser3/src/include/pa_request_charsets.h, revision 1.4.14.1

1.2       paf         1: /** @file
                      2:        Parser: request charsets class decl.
                      3: 
1.4.14.1! paf         4:        Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com)
1.2       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.4.14.1! paf        11: static const char * const IDENT_REQUEST_CHARSETS_H="$Date: 2004/02/11 15:33:14 $";
1.2       paf        12: 
                     13: class Request_charsets {
                     14:        friend class Temp_client_charset;
                     15: 
                     16:        Charset *fsource;
                     17:        Charset *fclient;
                     18:        Charset *fmail;
                     19: public:
                     20:        Request_charsets(
                     21:                Charset& asource, 
                     22:                Charset& aclient,
                     23:                Charset& amail):
                     24:                fsource(&asource),
                     25:                fclient(&aclient),
                     26:                fmail(&amail) {}
                     27: 
                     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; }
                     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:        }
                     46: };
                     47: 
                     48: #endif

E-mail: