00001 /*---------------------------------------------------------------------------*\ 00002 * OpenSG * 00003 * * 00004 * * 00005 * Copyright (C) 2000-2002,2002 by the OpenSG Forum * 00006 * * 00007 * www.opensg.org * 00008 * * 00009 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * 00010 * * 00011 \*---------------------------------------------------------------------------*/ 00012 /*---------------------------------------------------------------------------*\ 00013 * License * 00014 * * 00015 * This library is free software; you can redistribute it and/or modify it * 00016 * under the terms of the GNU Library General Public License as published * 00017 * by the Free Software Foundation, version 2. * 00018 * * 00019 * This library is distributed in the hope that it will be useful, but * 00020 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00022 * Library General Public License for more details. * 00023 * * 00024 * You should have received a copy of the GNU Library General Public * 00025 * License along with this library; if not, write to the Free Software * 00026 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00027 * * 00028 \*---------------------------------------------------------------------------*/ 00029 /*---------------------------------------------------------------------------*\ 00030 * Changes * 00031 * * 00032 * * 00033 * * 00034 * * 00035 * * 00036 * * 00037 \*---------------------------------------------------------------------------*/ 00038 00039 #ifndef _OSGFIELDCONTAINERTYPEIMPL_INL_ 00040 #define _OSGFIELDCONTAINERTYPEIMPL_INL_ 00041 00042 #ifdef OSG_DOC_FILES_IN_MODULE 00043 00046 #endif 00047 00048 OSG_BEGIN_NAMESPACE 00049 00050 /*-------------------------------------------------------------------------*/ 00051 /* Get */ 00052 00053 inline 00054 UInt16 FieldContainerType::getGroupId (void) const 00055 { 00056 return _uiGroupId; 00057 } 00058 00059 inline 00060 FieldContainerType *FieldContainerType::getParent(void) const 00061 { 00062 return _pParent; 00063 } 00064 00065 inline 00066 FieldDescription *FieldContainerType::getFieldDescription(UInt32 uiFieldId) 00067 { 00068 if(uiFieldId - 1 < _vDescVec.size()) 00069 return _vDescVec[uiFieldId - 1]; 00070 else 00071 return NULL; 00072 } 00073 00074 inline 00075 const FieldDescription *FieldContainerType::getFieldDescription( 00076 UInt32 uiFieldId) const 00077 { 00078 if(uiFieldId - 1 < _vDescVec.size()) 00079 return _vDescVec[uiFieldId - 1]; 00080 else 00081 return NULL; 00082 } 00083 00084 inline 00085 FieldDescription *FieldContainerType::findFieldDescription( 00086 const Char8 *szFieldName) 00087 { 00088 DescMapIt descIt = _mDescMap.find(IDStringLink(szFieldName)); 00089 00090 return (descIt == _mDescMap.end()) ? NULL : (*descIt).second; 00091 } 00092 00093 inline 00094 const FieldDescription *FieldContainerType::findFieldDescription( 00095 const Char8 *szFieldName) const 00096 { 00097 DescMapConstIt descIt = _mDescMap.find(IDStringLink(szFieldName)); 00098 00099 return (descIt == _mDescMap.end()) ? NULL : (*descIt).second; 00100 } 00101 00102 inline 00103 UInt32 FieldContainerType::getNumFieldDescs(void) const 00104 { 00105 return _vDescVec.size(); 00106 } 00107 00108 00109 /*-------------------------------------------------------------------------*/ 00110 /* Is */ 00111 00112 inline 00113 bool FieldContainerType::isInitialized(void) const 00114 { 00115 return _bInitialized; 00116 } 00117 00118 inline 00119 bool FieldContainerType::isDerivedFrom(const TypeBase &other) const 00120 { 00121 return Inherited::isDerivedFrom(other); 00122 } 00123 00124 inline 00125 bool FieldContainerType::isDerivedFrom(const FieldContainerType &other) const 00126 { 00127 bool returnValue = false; 00128 FieldContainerType *pCurrType = _pParent; 00129 00130 if(_uiTypeId == other._uiTypeId) 00131 { 00132 returnValue = true; 00133 } 00134 else 00135 { 00136 while(pCurrType != NULL && returnValue == false) 00137 { 00138 if(other._uiTypeId == pCurrType->_uiTypeId) 00139 { 00140 returnValue = true; 00141 } 00142 else 00143 { 00144 pCurrType = pCurrType->_pParent; 00145 } 00146 } 00147 } 00148 00149 return returnValue; 00150 } 00151 00152 inline 00153 bool FieldContainerType::isNode(void) const 00154 { 00155 return (_baseType == IsNode); 00156 } 00157 00158 inline 00159 bool FieldContainerType::isNodeCore(void) const 00160 { 00161 return (_baseType == IsNodeCore); 00162 } 00163 00164 inline 00165 bool FieldContainerType::isAttachment(void) const 00166 { 00167 return (_baseType == IsAttachment); 00168 } 00169 00170 OSG_END_NAMESPACE 00171 00172 #define OSGFIELDCONTAINERTYPE_INLINE_CVSID "@(#)$Id: $" 00173 00174 #endif /* _OSGFIELDCONTAINERTYPEIMPL_INL_ */
1.4.3