Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGVRMLWriteAction.inl

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *             Copyright (C) 2000-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 //---------------------------------------------------------------------------
00040 //  Includes
00041 //---------------------------------------------------------------------------
00042 
00043 
00044 #include <stdlib.h>
00045 #include <stdio.h>
00046 
00047 #include <OSGConfig.h>
00048 #include <OSGAction.h>
00049 
00050 OSG_BEGIN_NAMESPACE
00051 
00052 /***************************************************************************\
00053  *                               Types                                     *
00054 \***************************************************************************/
00055 
00056 
00057 /***************************************************************************\
00058  *                           Class variables                               *
00059 \***************************************************************************/
00060 
00061 
00062 /***************************************************************************\
00063  *                           Class methods                                 *
00064 \***************************************************************************/
00065 
00066 
00067 /*-------------------------------------------------------------------------*\
00068  -  public                                                                 -
00069 \*-------------------------------------------------------------------------*/
00070 
00071 /*-------------------------------------------------------------------------*\
00072  -  protected                                                              -
00073 \*-------------------------------------------------------------------------*/
00074 
00075 
00076 /*-------------------------------------------------------------------------*\
00077  -  private                                                                -
00078 \*-------------------------------------------------------------------------*/
00079 
00080 
00081 /***************************************************************************\
00082  *                           Instance methods                              *
00083 \***************************************************************************/
00084 
00085 /*-------------------------------------------------------------------------*\
00086  -  public                                                                 -
00087 \*-------------------------------------------------------------------------*/
00088 
00089 /*------------- constructors & destructors --------------------------------*/
00090 
00100 /*------------------------------ access -----------------------------------*/
00101 
00102 /*---------------------------- properties ---------------------------------*/
00103 
00104 inline 
00105 MaterialPtr VRMLWriteAction::getMaterial(void) const
00106 {
00107   return _material;
00108 }
00109 
00110 inline
00111 FILE *VRMLWriteAction::getFilePtr(void) const
00112 {
00113     return _pFile;
00114 }
00115 
00116 inline
00117 VRMLWriteAction::TraversalMode VRMLWriteAction::getMode(void) const
00118 {
00119     return _eTraversalMode;
00120 }
00121 
00122 inline
00123 bool VRMLWriteAction::isWritten(FieldContainerPtr &fc)
00124 {
00125     return std::find(_writtenFCs.begin(), _writtenFCs.end(), fc) != 
00126             _writtenFCs.end();
00127 }
00128 
00129 inline
00130 UInt32 VRMLWriteAction::getIndex(FieldContainerPtr &fc)
00131 {
00132     std::vector<FieldContainerPtr>::iterator it;
00133     
00134     it =  std::find(_writtenFCs.begin(), _writtenFCs.end(), fc);
00135     
00136     return it - _writtenFCs.begin();
00137 }
00138 
00139 inline
00140 UInt32 VRMLWriteAction::setWritten(FieldContainerPtr &fc)
00141 {
00142     _writtenFCs.push_back(fc);
00143     
00144     return _writtenFCs.size() - 1;
00145 }
00146 
00147 OSG_END_NAMESPACE

Generated on Thu Aug 25 04:12:07 2005 for OpenSG by  doxygen 1.4.3