Google
Web alhem.net

WebForm.h

Go to the documentation of this file.
00001 // WebForm.h
00002 /*
00003 Copyright (C) 2003  Anders Hedstrom
00004 
00005 This program is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU General Public License
00007 as published by the Free Software Foundation; either version 2
00008 of the License, or (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License
00016 along with this program; if not, write to the Free Software
00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018 */
00019 
00020 #ifndef _WEBFORM_H
00021 #define _WEBFORM_H
00022 
00023 #ifdef _WIN32
00024 #define STL_USING_STRING
00025 #include <stlhelper.h>
00026 #else
00027 #include <string>
00028 #endif
00029 
00030 namespace Cgi {
00031 
00032 class Web;
00033 class Form;
00034 class Cookies;
00035 
00036 
00038 
00039 class WebForm
00040 {
00041 public:
00042   WebForm(Web *,const std::string &);   // Parent, Form unique name
00043   virtual ~WebForm();
00044 
00045   virtual void Process() = 0;           // FormInput
00046 
00047   virtual void Select(const std::string &) = 0; // <SELECT name=>...</SELECT>
00048   virtual void List() = 0;              // List
00049   virtual void Display( long = 0 ) = 0; // Form
00050 
00051   Form *GetForm();
00052   Cookies *GetCookies();
00053   std::string GetCgiName();
00054   Web *GetWeb();
00055   
00056   std::string GetDate();
00057   std::string GetFormName();
00058   virtual void nbprintf(char *format, ...);
00059   virtual void nbfprintf(FILE *,char *format, ...);
00060   virtual void eprintf(char *format, ...);
00061   void SetContentType(const std::string&);
00062   void SetContentDisposition(const std::string&);
00063   void SetLocation(const std::string&);
00064   std::string GetRequestMethod();
00065 
00066 protected:
00067   Web *m_pclWeb;
00068   std::string m_strFormName;
00069 
00070 private:
00071 };
00072 
00073 } // namespace
00074 
00075 #endif // _WEBFORM_H

Generated for cgi++ by doxygen 1.3.7

Page, code, and content Copyright (C) 2004 by Anders Hedström