00001 /* -*-c++-*- */ 00002 /* 00003 * $Id: HTMLAtomicElement.h,v 1.2 2002/03/06 02:49:55 sbooth Exp $ 00004 * 00005 * Copyright (C) 1996 - 2002 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 _HTMLATOMICELEMENT_H_ 00023 #define _HTMLATOMICELEMENT_H_ 1 00024 00030 #include <new> 00031 00032 #include "cgicc/HTMLElement.h" 00033 00034 CGICC_BEGIN_NAMESPACE 00035 00036 // ============================================================ 00037 // Template for concrete atomic HTML element classes 00038 // ============================================================ 00039 00053 template<class Tag> 00054 class HTMLAtomicElement : public HTMLElement 00055 { 00056 public: 00057 00058 // ============================================================ 00059 00062 00067 HTMLAtomicElement() 00068 : HTMLElement(0, 0, 0, eAtomic) 00069 {} 00070 00076 HTMLAtomicElement(const HTMLAttributeList& attributes) 00077 : HTMLElement(&attributes, 0, 0, eAtomic) 00078 {} 00079 00080 00085 virtual ~HTMLAtomicElement() 00086 {} 00088 00094 virtual inline HTMLElement* 00095 clone() const 00096 { return new HTMLAtomicElement<Tag>(*this); } 00097 00098 00105 virtual inline const char* 00106 getName() const 00107 { return Tag::getName(); } 00108 }; 00109 00110 CGICC_END_NAMESPACE 00111 00112 #endif /* ! _HTMLATOMICELEMENT_H_ */