• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ODi_ListenerState.h

Go to the documentation of this file.
00001 /* AbiSource
00002  *
00003  * Copyright (C) 2005 Daniel d'Andrada T. de Carvalho
00004  * <daniel.carvalho@indt.org.br>
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (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., 51 Franklin Street, Fifth Floor, Boston, MA
00019  * 02110-1301 USA.
00020  */
00021 
00022 #ifndef _ODI_LISTENERSTATE_H_
00023 #define _ODI_LISTENERSTATE_H_
00024 
00025 // AbiWord includes
00026 #include <ut_types.h>
00027 #include <ut_string_class.h>
00028 
00029 // Internal classes
00030 class ODi_ListenerStateAction;
00031 class ODi_ElementStack;
00032 
00033 
00037 class ODi_ListenerState {
00038 
00039 public:
00040 
00041     ODi_ListenerState(const char* pStateName, ODi_ElementStack& rElementStack)
00042         : m_stateName(pStateName), m_rElementStack(rElementStack) {}
00043 
00044     virtual ~ODi_ListenerState() {}
00045 
00046     virtual void startElement (const gchar* pName, const gchar** ppAtts,
00047                                ODi_ListenerStateAction& rAction) = 0;
00048 
00049     virtual void endElement (const gchar* pName,
00050                              ODi_ListenerStateAction& rAction) = 0;
00051 
00052     virtual void charData (const gchar* pBuffer, int length) = 0;
00053 
00054     const UT_String& getStateName() const {return m_stateName;}
00055 
00056 protected:
00057 
00058     UT_String m_stateName;
00059     ODi_ElementStack& m_rElementStack;
00060 };
00061 
00062 #endif //_ODI_LISTENERSTATE_H_

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1