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 ValueT, Int32 iNamespace, class AllocT> inline
42 FieldDescriptionBase *MField<ValueT,
44 AllocT >::createFieldDescription(
45 const Char8 *szFieldname,
47 FieldEditMethod fEditMethod,
48 FieldGetMethod fGetMethod)
50 if(szFieldname == NULL)
52 FWARNING(("createFieldDescription no fieldname given"));
57 if(uiFieldFlags == FieldDescFactoryBase::AutoFlags)
59 uiFieldFlags = MFDefaultFlags;
62 FieldDescriptionBase *returnValue = new typename Self::Description(
76 template <class ValueT, Int32 iNamespace, class AllocT> inline
77 FieldDescriptionBase *MField<ValueT,
79 AllocT >::createIdxFieldDescription(
80 const Char8 *szFieldname,
82 FieldIndexEditMethod fEditMethod,
83 FieldIndexGetMethod fGetMethod)
85 if(szFieldname == NULL)
87 FWARNING(("createFieldDescriptionIdx no fieldname given"));
92 if(uiFieldFlags == FieldDescFactoryBase::AutoFlags)
94 uiFieldFlags = MFDefaultFlags;
97 FieldDescriptionBase *returnValue = new typename Self::Description(
111 #if defined(OSG_STATIC_MEMEBER_NEEDS_COPY_ASIGN_INIT)
113 template <class ValueT, Int32 iNamespace, class AllocT>
114 FieldType MField<ValueT, iNamespace, AllocT>::_fieldType = FieldType(
115 MFieldTraits::getMName (),
116 MFieldTraits::getMPName(),
117 MFieldTraits::getType (),
118 FieldType::MultiField,
120 &Self::createFieldDescription,
121 &Self::createIdxFieldDescription);
125 template <class ValueT, Int32 iNamespace, class AllocT>
126 FieldType MField<ValueT, iNamespace, AllocT>::_fieldType(
127 MFieldTraits::getMName (),
128 MFieldTraits::getMPName(),
129 MFieldTraits::getType (),
130 FieldType::MultiField,
132 &Self::createFieldDescription,
133 &Self::createIdxFieldDescription);
137 #if defined(OSG_TMPL_STATIC_MEMBER_NEEDS_HELPER_FCT)
138 template <class ValueT, Int32 iNamespace, class AllocT>
139 const FieldType &MField<ValueT,
141 AllocT >::fieldTypeExportHelper(void)