Changeset 13041 for OpenSceneGraph/trunk/include/osg/fast_back_stack
- Timestamp:
- 03/21/12 18:36:20 (15 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osg/fast_back_stack (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/fast_back_stack
r5328 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 26 26 * The focus of the fast_back_stack is purely to maximize the speed at which the 27 27 * back can be accessed.*/ 28 28 29 29 template<class T> 30 30 class fast_back_stack 31 31 { 32 32 public: 33 33 34 34 inline fast_back_stack():_value(),_stack(),_size(0) {} 35 35 … … 64 64 ++_size; 65 65 } 66 66 67 67 inline void push_back(const T& value) 68 68 { … … 74 74 ++_size; 75 75 } 76 76 77 77 inline void pop_back() 78 78 { … … 87 87 } // else error condition. 88 88 } 89 89 90 90 T _value; 91 91 std::vector<T> _stack;
