Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

HTMLElementList.h

Go to the documentation of this file.
00001 /* -*-c++-*- */
00002 /*
00003  *  $Id: HTMLElementList_8h-source.html,v 1.1.1.3 2004/06/19 04:36:23 chrisb Exp $
00004  *
00005  *  Copyright (C) 1996 - 2003 Stephen F. Booth
00006  *
00007  *  This library is free software; you can redistribute it and/or
00008  *  modify it under the terms of the GNU Lesser General Public
00009  *  License as published by the Free Software Foundation; either
00010  *  version 2.1 of the License, or (at your option) any later version.
00011  *
00012  *  This library is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  *  Lesser General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU Lesser General Public
00018  *  License along with this library; if not, write to the Free Software
00019  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  */
00021 
00022 #ifndef _HTMLELEMENTLIST_H_
00023 #define _HTMLELEMENTLIST_H_ 1
00024 
00025 #ifdef __GNUG__
00026 #  pragma interface
00027 #endif
00028 
00035 #include <string>
00036 #include <vector>
00037 
00038 #include "cgicc/CgiDefs.h"
00039 #include "cgicc/MStreamable.h"
00040 #include "cgicc/HTMLAttribute.h"
00041 #include "cgicc/HTMLElement.h"
00042 
00043 namespace cgicc {
00044   
00045   // ============================================================
00046   // Class HTMLElementList
00047   // ============================================================
00048   
00049 #ifdef WIN32
00050   template class CGICC_API std::vector<HTMLElement*>;
00051 #endif
00052   
00065   class CGICC_API HTMLElementList
00066   {
00067   public:
00068     
00069     // ============================================================
00070     
00073     
00079     HTMLElementList();
00080     
00087     HTMLElementList(const HTMLElement& head);
00088     
00095     HTMLElementList(const HTMLElementList& list);
00096     
00102     ~HTMLElementList();
00104     
00105     // ============================================================
00106     
00109     
00117     HTMLElementList&
00118     operator= (const HTMLElementList& list);
00120     
00121     // ============================================================
00122     
00127     
00134     HTMLElementList&
00135     add(const HTMLElement& element);
00136     
00143     HTMLElementList&
00144     add(HTMLElement *element);
00146     
00149     
00155     void 
00156     render(std::ostream& out)                           const;
00158     
00159   private:
00160     std::vector<HTMLElement*> fElements;
00161     // elements must be stored as pointers, otherwise polymorphism doesn't work
00162   };
00163   
00164 } // namespace cgicc
00165 
00166 #endif /* ! _HTMLELEMENTLIST_H_ */

GNU cgicc - A C++ class library for writing CGI applications
Copyright © 1996 - 2004 Stephen F. Booth
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front Cover Texts, and with no Back-Cover Texts.
Documentation generated Sat Jun 19 00:36:23 2004 for cgicc by doxygen 1.3.6