00001 /* -*-mode:c++; c-file-style: "gnu";-*- */00002 /*00003 * $Id: HTMLAtomicElement.h,v 1.7 2007/07/02 18:48:18 sebdiaz Exp $00004 *00005 * Copyright (C) 1996 - 2004 Stephen F. Booth <sbooth@gnu.org>00006 * 2007 Sebastien DIAZ <sebastien.diaz@gmail.com>00007 * Part of the GNU cgicc library, http://www.gnu.org/software/cgicc00008 *00009 * This library is free software; you can redistribute it and/or00010 * modify it under the terms of the GNU Lesser General Public00011 * License as published by the Free Software Foundation; either00012 * version 3 of the License, or (at your option) any later version.00013 *00014 * This library is distributed in the hope that it will be useful,00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU00017 * Lesser General Public License for more details.00018 *00019 * You should have received a copy of the GNU Lesser General Public00020 * License along with this library; if not, write to the Free Software00021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA 00022 */00023
00024 #ifndef _HTMLATOMICELEMENT_H_00025 #define _HTMLATOMICELEMENT_H_ 100026
00032 #include <new>00033
00034 #include "cgicc/HTMLElement.h"00035
00036 namespace cgicc {
00037
00038 // ============================================================00039 // Template for concrete atomic HTML element classes00040 // ============================================================00041
00055 template<class Tag>
00056class HTMLAtomicElement : publicHTMLElement00057 {
00058 public:
00059
00060 // ============================================================00061
00064
00069HTMLAtomicElement()
00070 : HTMLElement(0, 0, 0, eAtomic)
00071 {}
00072
00078HTMLAtomicElement(constHTMLAttributeList& attributes)
00079 : HTMLElement(&attributes, 0, 0, eAtomic)
00080 {}
00081
00082
00087virtual~HTMLAtomicElement()
00088 {}
00090
00096 virtualinlineHTMLElement*
00097clone() const00098 { returnnewHTMLAtomicElement<Tag>(*this); }
00099
00100
00107 virtualinlineconstchar*
00108getName() const00109 { return Tag::getName(); }
00110 };
00111
00112 } // namespace cgicc00113
00114 #endif /* ! _HTMLATOMICELEMENT_H_ */