1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkStack.h,v $
6 Date: $Date: 2002/02/01 06:39:45 $
7 Version: $Revision: 1.1.1.1 $
10 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions are met:
16 * Redistributions of source code must retain the above copyright notice,
17 this list of conditions and the following disclaimer.
19 * Redistributions in binary form must reproduce the above copyright notice,
20 this list of conditions and the following disclaimer in the documentation
21 and/or other materials provided with the distribution.
23 * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
24 of any contributors may be used to endorse or promote products derived
25 from this software without specific prior written permission.
27 * Modified source versions must be plainly marked as such, and must not be
28 misrepresented as being the original software.
30 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
31 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
34 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
36 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
37 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
38 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 =========================================================================*/
42 // .NAME vtkStack - create and manipulate lists of objects
43 // .SECTION Description
44 // vtkStack is a general object for creating and manipulating lists
45 // of objects. vtkStack also serves as a base class for lists of
46 // specific types of objects.
51 #include "vtkObject.h"
53 //BTX begin tcl exclude
54 class vtkStackElement //;prevents pick-up by man page generator
57 vtkStackElement():Item(NULL),Next(NULL) {};
59 vtkStackElement *Next;
63 class VTK_EXPORT vtkStack : public vtkObject
66 static vtkStack *New();
68 vtkTypeMacro(vtkStack,vtkObject);
69 void PrintSelf(ostream& os, vtkIndent indent);
72 // Add an object to the top of the stack. Does not prevent duplicate entries.
73 void Push(vtkObject *);
76 // Remove an object from the top of the list.
80 // Return the number of objects in the stack.
84 // Return the number of objects in the stack.
85 int GetNumberOfItems();
90 vtkStack(const vtkStack&) {};
91 void operator=(const vtkStack&) {};
95 vtkStackElement *Bottom;