00001 // -*- C++ -*- 00002 00003 /* 00004 * Gnome Chemistry Utils 00005 * chemistry/document.h 00006 * 00007 * Copyright (C) 2004 00008 * 00009 * Developed by Jean Bréfort <jean.brefort@normalesup.org> 00010 * 00011 * This library is free software; you can redistribute it and/or 00012 * modify it under the terms of the GNU Lesser General Public 00013 * License as published by the Free Software Foundation; either 00014 * version 2.1 of the License, or (at your option) any later version. 00015 * 00016 * This library is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 * Lesser General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Lesser General Public License 00022 * along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 00024 * USA 00025 */ 00026 00027 00028 #ifndef GCU_DOCUMENT_H 00029 #define GCU_DOCUMENT_H 00030 00031 #include "object.h" 00032 00033 using namespace std; 00034 00035 namespace gcu 00036 { 00040 class Document: public Object 00041 { 00042 friend class gcu::Object; 00043 public: 00047 Document (); 00051 virtual ~Document (); 00052 00053 public: 00054 00062 string& GetTranslatedId (const char* id) {return m_TranslationTable[id];} 00063 00070 void EraseTranslationId (const char* Id) {m_TranslationTable.erase (Id);} 00071 00077 void EmptyTranslationTable() {m_TranslationTable.clear();} 00078 00079 private: 00080 00090 gchar* GetNewId (gchar* id, bool Cache = true); 00091 00092 private: 00093 map <string, string> m_TranslationTable;//used when Ids translations are necessary (on pasting...) 00094 }; 00095 00096 } 00097 #endif //GCU_DOCUMENT_H