- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

ucontextgroup.hpp

00001 /*************************************************************************** 00002 LibUFO - UI For OpenGL 00003 copyright : (C) 2001-2005 by Johannes Schmidt 00004 email : schmidtjf at users.sourceforge.net 00005 ------------------- 00006 00007 file : include/ufo/ucontextgroup.hpp 00008 begin : Thu Feb 19 2004 00009 $Id: ucontextgroup.hpp,v 1.2 2005/02/13 17:49:31 schmidtjf Exp $ 00010 ***************************************************************************/ 00011 00012 /*************************************************************************** 00013 * This library is free software; you can redistribute it and/or * 00014 * modify it under the terms of the GNU Lesser General Public * 00015 * License as published by the Free Software Foundation; either * 00016 * version 2.1 of the License, or (at your option) any later version. * 00017 * * 00018 * This library is distributed in the hope that it will be useful, * 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00021 * Lesser General Public License for more details. * 00022 * * 00023 * You should have received a copy of the GNU Lesser General Public * 00024 * License along with this library; if not, write to the Free Software * 00025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 00026 ***************************************************************************/ 00027 00028 00029 #ifndef UCONTEXTGROUP_HPP 00030 #define UCONTEXTGROUP_HPP 00031 00032 #include "uobject.hpp" 00033 00034 #include <vector> 00035 00036 namespace ufo { 00037 00038 class UContext; 00039 class UVolatileData; 00040 00047 class UFO_EXPORT UContextGroup : public UObject { 00048 UFO_DECLARE_DYNAMIC_CLASS(UContextGroup) 00049 public: // constructor 00050 UContextGroup(); 00051 virtual ~UContextGroup(); 00052 public: 00054 std::vector<UContext*> getContexts(); 00055 00057 bool belongsToGroup(UContext * context); 00058 00062 void refresh(); 00063 00067 uint32_t getLastRefreshTime() const; 00068 00069 void addVolatileData(UVolatileData * vdata); 00070 void removeVolatileData(UVolatileData * vdata); 00071 00072 public: // Shouldn't be used by client code 00073 void addContext(UContext * context); 00074 void removeContext(UContext * context); 00075 00076 private: 00077 std::vector<UContext*> m_contexts; 00078 std::vector<UVolatileData*> m_volatileData; 00079 uint32_t m_refreshTime; 00080 }; 00081 00082 // 00083 // inline implementation 00084 // 00085 00086 00087 inline uint32_t 00088 UContextGroup::getLastRefreshTime() const { 00089 return m_refreshTime; 00090 } 00091 00092 } // namespace ufo 00093 00094 #endif // UCONTEXTGROUP_HPP

The libUFO Project - written by Johannes Schmidt