1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2008 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 \*---------------------------------------------------------------------------*/
43 BasicFieldConnector::BasicFieldConnector(BitVector bSrcMask,
52 BasicFieldConnector::~BasicFieldConnector(void)
57 void BasicFieldConnector::setTargetContainer(FieldContainer *pDst)
63 bool BasicFieldConnector::match(BitVector fieldMask)
65 return (_bSrcMask & fieldMask) != 0;
69 bool BasicFieldConnector::match( BitVector bSrcMask,
70 const FieldContainer *pDst,
73 bool returnValue = (_bSrcMask & bSrcMask) != 0;
77 returnValue &= (_pDst == pDst) &&
78 ((_bDstMask & bDstMask) != 0 );
85 FieldContainer *BasicFieldConnector::getDst(void) const
90 template <class SrcFieldT, class DstFieldT> inline
91 SFieldConnector<SrcFieldT, DstFieldT>::SFieldConnector(
92 const SrcFieldT *pSrcField,
99 _pSrcField(pSrcField),
100 _pDstField(pDstField)
104 template <class SrcFieldT, class DstFieldT> inline
105 SFieldConnector<SrcFieldT, DstFieldT>::~SFieldConnector(void)
109 template <class SrcFieldT, class DstFieldT> inline
110 BasicFieldConnector *SFieldConnector<SrcFieldT, DstFieldT>::clone(
111 const Field *pSrcField,
116 return new Self(static_cast<const SrcFieldT *>(pSrcField),
118 static_cast< DstFieldT *>(pDstField),
122 template <class SrcFieldT, class DstFieldT> inline
123 MFieldConnector<SrcFieldT, DstFieldT>::MFieldConnector(
124 const SrcFieldT *pSrcField,
126 DstFieldT *pDstField,
127 BitVector bDstMask) :
131 _pSrcField(pSrcField),
132 _pDstField(pDstField)
136 template <class SrcFieldT, class DstFieldT> inline
137 MFieldConnector<SrcFieldT, DstFieldT>::~MFieldConnector(void)
141 template <class SrcFieldT, class DstFieldT> inline
142 BasicFieldConnector *MFieldConnector<SrcFieldT, DstFieldT>::clone(
143 const Field *pSrcField,
148 return new Self(static_cast<const SrcFieldT *>(pSrcField),
150 static_cast< DstFieldT *>(pDstField),