1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2003 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
41 template <class Desc> inline
42 ChunkListHandlerMixin<Desc>::ListEditHandle::ListEditHandle(
43 const ListEditHandle &source) :
49 template <class Desc> inline
50 ChunkListHandlerMixin<Desc>::ListEditHandle::ListEditHandle(
52 const FieldDescriptionBase *pDescription,
53 FieldContainer *pContainer ) :
62 template <class Desc> inline
63 bool ChunkListHandlerMixin<Desc>::ListEditHandle::add(
64 FieldContainer *newFC) const
66 ChunkHelper *pHelper = dynamic_cast<ChunkHelper *>(newFC);
70 FinalContainer *pCnt = dynamic_cast<FinalContainer *>(
75 pCnt->addChunk( pHelper->getChunk(), pHelper->getSlot());
81 Inherited::add(newFC);
87 /*-------------------------------------------------------------------------*/
90 /*-------------------------------------------------------------------------*/
93 /*-------------------------------------------------------------------------*/
97 /*-------------------------------------------------------------------------*/
100 template <class Desc> inline
101 ChunkListHandlerMixin<Desc>::ChunkListHandlerMixin(void) :
106 template <class Desc> inline
107 ChunkListHandlerMixin<Desc>::ChunkListHandlerMixin(
108 const ChunkListHandlerMixin &source) :
114 template <class Desc> inline
115 ChunkListHandlerMixin<Desc>::~ChunkListHandlerMixin(void)
119 template <class Desc> inline
120 void ChunkListHandlerMixin<Desc>::dump( UInt32 uiIndent,
121 const BitVector bvFlags ) const
123 Inherited::dump(uiIndent, bvFlags);
126 template <class Desc> inline
127 EditFieldHandlePtr ChunkListHandlerMixin<Desc>::editHandleChunks(void)
129 typedef ListEditHandle ChunksEditHandle;
130 typedef ListEditHandlePtr ChunksEditHandlePtr;
132 ChunksEditHandlePtr returnValue(
133 new ChunksEditHandle(
135 this->getType().getFieldDesc(Self::ChunksFieldId),
138 returnValue->setAddMethod(
139 boost::bind(&FinalContainer::pushToChunks,
140 static_cast<FinalContainer *>(this), _1));
142 returnValue->setReplaceMethod(
143 boost::bind(&FinalContainer::replaceChunk,
144 static_cast<FinalContainer *>(this), _1, _2));
146 this->editMField(Self::ChunksFieldMask, this->_mfChunks);
151 /*-------------------------------------------------------------------------*/
154 /*-------------------------------------------------------------------------*/
157 /*-------------------------------------------------------------------------*/