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

OXML_ObjectWithAttrProp.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: t -*- */
00002 /* AbiSource
00003  *
00004  * Copyright (C) 2007 Philippe Milot <PhilMilot@gmail.com>
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 _OXML_OBJECTWITHATTRPROP_H_
00023 #define _OXML_OBJECTWITHATTRPROP_H_
00024 
00025 #include <string>
00026 
00027 #include "pp_AttrProp.h"
00028 #include "OXML_Types.h"
00029 
00030 class OXML_ObjectWithAttrProp {
00031 public:
00032     OXML_ObjectWithAttrProp();
00033     virtual ~OXML_ObjectWithAttrProp();
00034 
00035     UT_Error setAttribute(const gchar * szName, const gchar * szValue);
00036     UT_Error setProperty(const gchar * szName, const gchar * szValue);
00037     UT_Error setProperty(const std::string & szName, const std::string & szValue);
00038     UT_Error getAttribute(const gchar * szName, const gchar *& szValue) const;
00039     UT_Error getProperty(const gchar * szName, const gchar *& szValue) const;
00040     UT_Error setAttributes(const PP_PropertyVector & attributes);
00041     UT_Error setProperties(const PP_PropertyVector & properties);
00042     UT_Error appendAttributes(const PP_PropertyVector & attributes);
00043     UT_Error appendProperties(const PP_PropertyVector & properties);
00044     PP_PropertyVector getAttributes() const;
00045     PP_PropertyVector getProperties() const;
00046 
00047     UT_Error inheritProperties(OXML_ObjectWithAttrProp* parent);
00048 
00050 
00054     PP_PropertyVector getAttributesWithProps();
00055 
00056     bool getNthProperty(int i, const gchar* & szName, const gchar* & szValue);
00057     size_t getPropertyCount();
00058 
00059 private:
00060     PP_AttrProp* m_pAttributes;
00061 
00062     std::string _generatePropsString() const;
00063 };
00064 
00065 #endif //_OXML_OBJECTWITHATTRPROP_H_
00066 

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1