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

OSGMultiFunctorStore.h

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 #ifndef _OSGMULTIFUNCTORSTORE_H_
00040 #define _OSGMULTIFUNCTORSTORE_H_
00041 #ifdef __sgi
00042 #pragma once
00043 #endif
00044 
00045 #include <OSGConfig.h>
00046 #include <OSGSystemDef.h>
00047 #include "OSGNewActionTypes.h"
00048 
00049 #include <list>
00050 #include <vector>
00051 
00052 OSG_BEGIN_NAMESPACE
00053 
00054 class OSG_SYSTEMLIB_DLLMAPPING MultiFunctorStore
00055 {
00056     /*==========================  PUBLIC  =================================*/
00057   public:
00058     /*---------------------------------------------------------------------*/
00062     typedef NewActionTypes::Functor Functor;
00063 
00065     /*---------------------------------------------------------------------*/
00069     inline  MultiFunctorStore(void);
00070 
00072     /*---------------------------------------------------------------------*/
00076     inline ~MultiFunctorStore(void);
00077 
00079     /*---------------------------------------------------------------------*/
00083     inline bool empty(void) const;
00084 
00086     /*---------------------------------------------------------------------*/
00090     inline void     regFunctor         (const Functor            &refFunc,
00091                                         const FieldContainerType &refType);
00092     inline void     unregFunctor       (const FieldContainerType &refType);
00093 
00094     inline void     regDefaultFunctor  (const Functor            &refFunc);
00095     inline void     unregDefaultFunctor(      void                       );
00096 
00098     /*---------------------------------------------------------------------*/
00102     inline Functor *getFunctor         (const FieldContainerType &refType);
00103     inline Functor *getDefaultFunctor  (      void                       );
00104 
00106     /*==========================  PRIVATE  ================================*/
00107   private:
00108     /*---------------------------------------------------------------------*/
00112     typedef std::list<Functor>           FunctorStore;
00113     typedef FunctorStore::iterator       FunctorStoreIt;
00114     typedef FunctorStore::const_iterator FunctorStoreConstIt;
00115 
00116     typedef std::vector<FunctorStoreIt>  FunctorMap;
00117     typedef FunctorMap::iterator         FunctorMapIt;
00118     typedef FunctorMap::const_iterator   FunctorMapConstIt;
00119 
00121     /*---------------------------------------------------------------------*/
00122 
00123     FunctorStore _funcStore;
00124     FunctorMap   _funcMap;
00125 
00126     Functor      _defaultFunc;
00127     bool         _bHasDefaultFunctor;
00128 };
00129 
00130 OSG_END_NAMESPACE
00131 
00132 #include "OSGMultiFunctorStore.inl"
00133 
00134 #define OSGMULTIFUNCTORSTORE_HEADER_CVSID "@(#)$Id: OSGMultiFunctorStore.h,v 1.4 2004/04/20 13:47:08 neumannc Exp $"
00135 
00136 #endif /* _OSGMULTIFUNCTORSTORE_H_ */

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