Classes | Defines

ut_vector.h File Reference

#include "ut_types.h"
#include "ut_assert.h"
#include "ut_debugmsg.h"
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Classes

class  UT_GenericVector< T >
class  UT_Vector
class  UT_NumberVector

Defines

#define UT_VECTOR_CLEANUP(d, v, r)
#define UT_VECTOR_SPARSECLEANUP(d, v, r)
#define UT_VECTOR_PURGEALL(d, v)   UT_VECTOR_CLEANUP(d, v, delete)
#define UT_VECTOR_FREEALL(d, v)   UT_VECTOR_CLEANUP(d, v, g_free)
#define UT_VECTOR_SPARSEPURGEALL(d, v)   UT_VECTOR_SPARSECLEANUP(d, v, delete)
#define UT_VECTOR_SPARSEFREEALL(d, v)   UT_VECTOR_SPARSECLEANUP(d, v, g_free)
#define UT_VECTOR_RELEASE(v)

Define Documentation

#define UT_VECTOR_CLEANUP (   d,
  v,
  r 
)
Value:
do  {   int utv_max = v.getItemCount();             \
            for (int utv=utv_max-1; utv>=0; utv--)      \
            {                                           \
                d utv_p = (d) v.getNthItem(utv);        \
                UT_ASSERT_HARMLESS(utv_p);              \
                if (utv_p)                              \
                    r (utv_p);                      \
            }                                           \
    } while (0)
#define UT_VECTOR_FREEALL (   d,
  v 
)    UT_VECTOR_CLEANUP(d, v, g_free)
#define UT_VECTOR_PURGEALL (   d,
  v 
)    UT_VECTOR_CLEANUP(d, v, delete)

Referenced by IE_Imp_MsWord_97::_beginPara(), FV_View::_clearSelection(), FV_View::_drawOrClearBetweenPositions(), ODi_StreamListener::_handleStateAction(), IE_Imp_StarOffice::_loadFile(), fl_TableLayout::_lookupProperties(), s_RTF_ListenerWriteDoc::_newRow(), fl_TOCLayout::_purgeLayout(), AD_Document::_purgeRevisionTable(), IE_Imp_MsWord_97::_table_close(), Stylist_tree::buildStyles(), ODi_XMLRecorder::clear(), GR_Itemization::clear(), PD_Document::clearAllPendingObjects(), px_ChangeHistory::clearHistory(), AP_Dialog_Tab::clearList(), EV_Win32Menu::destroy(), GR_Image::DestroyOutline(), ODi_TextContent_ListenerState::endElement(), FV_View::getBlockFormat(), FV_View::getCharFormat(), FV_View::getSectionFormat(), XAP_Toolbar_Factory::getToolbarNames(), IE_Imp_RTF::HandleCell(), fl_ContainerLayout::isOnScreen(), AD_Document::purgeHistory(), PD_Document::removeStyle(), XAP_Menu_Factory::resetMenusToDefault(), XAP_Toolbar_Factory::restoreToolbarsFromCurrentScheme(), FV_Selection::setMode(), fp_Page::updatePageForWrapping(), _vectt::~_vectt(), AD_Document::~AD_Document(), AP_BindingSet::~AP_BindingSet(), AP_Dialog_Paragraph::~AP_Dialog_Paragraph(), AP_Dialog_Tab::~AP_Dialog_Tab(), AP_StatusBar::~AP_StatusBar(), AP_UnixDialog_New::~AP_UnixDialog_New(), EV_EditMethodContainer::~EV_EditMethodContainer(), EV_UnixMenu::~EV_UnixMenu(), EV_UnixMenuPopup::~EV_UnixMenuPopup(), EV_UnixToolbar::~EV_UnixToolbar(), fl_BlockLayout::~fl_BlockLayout(), fl_HdrFtrSectionLayout::~fl_HdrFtrSectionLayout(), fl_TableLayout::~fl_TableLayout(), FV_Selection::~FV_Selection(), FV_View::~FV_View(), GR_GOChartManager::~GR_GOChartManager(), GR_GOComponentManager::~GR_GOComponentManager(), GR_LasemMathManager::~GR_LasemMathManager(), IE_Exp_RTF::~IE_Exp_RTF(), ie_exp_RTF_MsWord97ListMulti::~ie_exp_RTF_MsWord97ListMulti(), IE_Imp_MHT::~IE_Imp_MHT(), IE_Imp_MsWord_97::~IE_Imp_MsWord_97(), ie_imp_table::~ie_imp_table(), IE_Imp_TableHelper::~IE_Imp_TableHelper(), IE_Imp_XHTML::~IE_Imp_XHTML(), IE_TOCHelper::~IE_TOCHelper(), ODe_AutomaticStyles::~ODe_AutomaticStyles(), ODe_HeadingStyles::~ODe_HeadingStyles(), ODe_Style_List::~ODe_Style_List(), ODe_Table_Listener::~ODe_Table_Listener(), ODi_ElementStack::~ODi_ElementStack(), ODi_StreamListener::~ODi_StreamListener(), ODi_TextContent_ListenerState::~ODi_TextContent_ListenerState(), PD_Document::~PD_Document(), PieceOfText::~PieceOfText(), pp_TableAttrProp::~pp_TableAttrProp(), px_ChangeHistory::~px_ChangeHistory(), s_AbiWord_1_Listener::~s_AbiWord_1_Listener(), SpellManager::~SpellManager(), Stylist_row::~Stylist_row(), Stylist_tree::~Stylist_tree(), XAP_App::~XAP_App(), XAP_DialogFactory::~XAP_DialogFactory(), XAP_FrameImpl::~XAP_FrameImpl(), XAP_InputModes::~XAP_InputModes(), XAP_ModuleManager::~XAP_ModuleManager(), XAP_Prefs::~XAP_Prefs(), XAP_Toolbar_Factory::~XAP_Toolbar_Factory(), and XAP_Toolbar_Factory_vec::~XAP_Toolbar_Factory_vec().

#define UT_VECTOR_RELEASE (   v  ) 
Value:
{                       \
        int utv_max = v.getItemCount();             \
            for (int utv=utv_max-1; utv>=0; utv--)      \
            {                                           \
                id utv_p = (id) v.getNthItem(utv);      \
                [utv_p release];                                \
            }                                       \
    }
#define UT_VECTOR_SPARSECLEANUP (   d,
  v,
  r 
)
Value:
do  {   int utv_max = v.getItemCount();             \
            for (int utv=utv_max-1; utv>=0; utv--)      \
            {                                           \
                d utv_p = (d) v.getNthItem(utv);        \
                if (utv_p)                              \
                    r (utv_p);                      \
            }                                           \
    } while (0)
#define UT_VECTOR_SPARSEFREEALL (   d,
  v 
)    UT_VECTOR_SPARSECLEANUP(d, v, g_free)
#define UT_VECTOR_SPARSEPURGEALL (   d,
  v 
)    UT_VECTOR_SPARSECLEANUP(d, v, delete)