changed: auto add updateData callback to stages so that stagedata can be updated...
[opensg.git] / Source / Base / Field / OSGFieldType.cpp
blob796d0e1fa3521f4b7e4adcf2bd138cedb2d6cda4
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
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. *
18 * *
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. *
23 * *
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. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #include <cstdlib>
40 #include <cstdio>
42 #include "OSGConfig.h"
43 #include "OSGFieldType.h"
44 #include "OSGBaseFunctions.h"
45 #include "OSGLog.h"
46 #include "OSGFieldDescFactory.h"
48 OSG_USING_NAMESPACE
50 /*! \var OSG::FieldType::_contentType
51 Type stored within fields of this type
54 /*-------------------------------------------------------------------------*/
55 /* Constructors */
57 FieldType::FieldType(const Char8 *szName,
58 const Char8 *szParentName,
59 const DataType &contentType,
60 Cardinality cardinality,
61 Class fieldClass,
62 FieldDescCreator fCreator,
63 IndexedFieldDescCreator fIdxCreator,
64 const UInt32 uiNameSpace) :
65 Inherited (szName,
66 szParentName,
67 uiNameSpace ),
68 _cardinality (cardinality ),
69 _fieldClass (fieldClass ),
70 _contentType (contentType ),
71 _pScanAsType (NULL )
73 FieldDescFactory::the()->registerDescription( szName,
74 _uiTypeId,
75 fCreator,
76 fIdxCreator);
79 FieldType::FieldType(const Char8 *szName,
80 const Char8 *szParentName,
81 const DataType &contentType,
82 Cardinality cardinality,
83 Class fieldClass,
84 const FieldType &pScanAsType,
85 FieldDescCreator fCreator,
86 IndexedFieldDescCreator fIdxCreator,
87 const UInt32 uiNameSpace ) :
88 Inherited ( szName,
89 szParentName,
90 uiNameSpace ),
91 _cardinality ( cardinality ),
92 _fieldClass ( fieldClass ),
93 _contentType ( contentType ),
94 _pScanAsType (&pScanAsType )
96 FieldDescFactory::the()->registerDescription( szName,
97 _uiTypeId,
98 fCreator,
99 fIdxCreator);
103 /*-------------------------------------------------------------------------*/
104 /* Destructor */
106 FieldType::~FieldType(void)
110 /*-------------------------------------------------------------------------*/
111 /* Get */