00001 /* 00002 * Copyright (c) 2001-2004 MUSIC TECHNOLOGY GROUP (MTG) 00003 * UNIVERSITAT POMPEU FABRA 00004 * 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 */ 00021 00023 // Class XMLable: Interface for objects to be stored on a XMLStorage 00025 // Description: 00026 // Abstract class that defines the interface a object needs to be stored on 00027 // a XMLStorage. An XML storage will need the information offered by those 00028 // methods in order to know the XML structure. 00030 00031 #ifndef _XMLable_ 00032 #define _XMLable_ 00033 00034 #include "Storable.hxx" 00035 #include <string> 00036 00037 namespace CLAM { 00038 00046 class XMLable : public Storable { 00047 // Construction/Destruction 00048 public: 00049 virtual ~XMLable(); 00050 // Redifinible methods 00051 public: 00052 //* @return A pointer to the XMLName 00053 virtual const char * XMLName() const =0; 00054 //* @return A string with the extracted XML content 00055 virtual std::string XMLContent() const =0; 00056 //* @TODO Implement this 00057 virtual bool XMLContent(std::istream & contentHolder)=0; 00058 //* @return Whether the object represents an XML attribute or not 00059 virtual bool IsXMLAttribute() const =0; 00060 //* @return Whether the object represents an XML element or not 00061 virtual bool IsXMLElement() const =0; 00062 //* @return Whether the object represents an XML text or not 00063 virtual bool IsXMLText() const =0; 00064 }; 00065 00066 } 00067 00068 #endif//_XMLable_ 00069