Main Page   Class Hierarchy   Compound List   File List   Compound Members  

StartTag.h

00001 // Copyright (C) 2001 Kevin Duffy <kevin@buhbird.com>
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License, or (at your option) any later version.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00016 #ifndef STARTTAG_H
00017 #define STARTTAG_H
00018 
00019 #include "Tag.h"
00020 
00022 
00023 class StartTag : virtual public Tag
00024 {
00025    public:  
00027       StartTag(const string& name = "StartTag", 
00028                const StringMap& attributes = StringMap());
00029 
00033 
00035 
00038       virtual string Get(const string& att) const;
00039 
00041 
00042       virtual StringVector GetAttributes() const;
00043 
00045 
00046       virtual StringVector GetValues() const;
00047 
00049 
00050       virtual StringMap GetAttributeMap() const;
00051 
00053 
00056 
00057       virtual StartTag SetAttributeMap(const StringMap& newAttributeMap);
00058 
00060 
00064       virtual StartTag SetValues(const StringVector& newVals, 
00065                                  const StringVector& newAtts = StringVector()); 
00066 
00068       virtual StartTag Set(const string& att, const string& val);
00069 
00071 
00072       virtual string& operator[] (const string& newAtt);
00073 
00075 
00078 
00079       virtual string ToString() const;
00081 
00082    protected:
00084       StartTag& Copy(const StartTag& rhs);
00085       
00087       void Init(const string& newName,
00088                 const StringMap& newAttributes);
00089 
00091       bool Equals(const StartTag& rhs) const;
00092 
00094       void NullifyPointers();
00095 
00097       void Clear();
00098 
00099    private:
00100       StringMap* attributes;
00101 };
00102 
00103 typedef StartTag XMLStartTag;
00104 #endif

Generated at Wed May 2 00:21:02 2001 for libXMLement by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001