00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #include <stdlib.h>
00040 #include <stdio.h>
00041
00042 #include "OSGConfig.h"
00043
00044 #include <iostream>
00045
00046 #include "OSGTypeBase.h"
00047 #include <OSGTypeFactory.h>
00048
00049 OSG_USING_NAMESPACE
00050
00054
00055
00056
00057 TypeBase::TypeBase(const Char8 *szName,
00058 const Char8 *szParentName,
00059 const UInt32 ) :
00060
00061 _uiTypeId (0 ),
00062 _uiTypeRootId(0 ),
00063 _pParent (NULL ),
00064 _szName (szName ),
00065 _szParentName(szParentName)
00066 {
00067 _uiTypeId = TypeFactory::the()->registerType(this);
00068 }
00069
00070
00071
00072
00073 TypeBase::~TypeBase(void)
00074 {
00075 }
00076
00077
00078
00079
00080 UInt32 TypeBase::getId(void) const
00081 {
00082 return _uiTypeId;
00083 }
00084
00085
00086 const IDString &TypeBase::getName(void) const
00087 {
00088 return _szName;
00089 }
00090
00091
00092 const Char8 *TypeBase::getCName(void) const
00093 {
00094 return _szName.str();
00095 }
00096
00097
00098 const IDString &TypeBase::getParentName(void) const
00099 {
00100 return _szParentName;
00101 }
00102
00103
00104 const Char8 *TypeBase::getCParentName(void) const
00105 {
00106 return _szParentName.str();
00107 }
00108
00109
00110 UInt32 TypeBase::getNameSpace(void) const
00111 {
00112 return 0;
00113 }
00114
00115
00116
00117
00118
00119 bool TypeBase::isDerivedFrom(const TypeBase &OSG_CHECK_ARG(other)) const
00120 {
00121 return false;
00122 }
00123
00124
00125
00126
00127 bool TypeBase::operator ==(const TypeBase &other) const
00128 {
00129 return _uiTypeId == other._uiTypeId;
00130 }
00131
00132
00133 bool TypeBase::operator !=(const TypeBase &other) const
00134 {
00135 return ! (*this == other);
00136 }
00137
00138
00139
00140
00141
00142 TypeBase::TypeBase(const TypeBase &source) :
00143 _uiTypeId (source._uiTypeId),
00144 _uiTypeRootId(source._uiTypeRootId),
00145 _pParent (source._pParent),
00146 _szName (source._szName),
00147 _szParentName(source._szParentName)
00148 {
00149 }
00150
00151
00152
00153
00154
00155 #ifdef __sgi
00156 #pragma set woff 1174
00157 #endif
00158
00159 #ifdef OSG_LINUX_ICC
00160 #pragma warning( disable : 177 )
00161 #endif
00162
00163 namespace
00164 {
00165 static Char8 cvsid_cpp[] = "@(#)$Id: $";
00166 static Char8 cvsid_hpp[] = OSGTYPEBASE_HEADER_CVSID;
00167 }