Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

vtkObjectBaseStack.h

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00002  *
00003  * $Id: vtkObjectBaseStack.h,v 1.3 2005/06/24 23:17:16 xpxqx Exp $
00004  *
00005  * Copyright (c) 2005 Sean McInerney
00006  * All rights reserved.
00007  *
00008  * See Copyright.txt or http://vtkcontainers.sourceforge.net/Copyright.html
00009  * for details.
00010  *
00011  *    This software is distributed WITHOUT ANY WARRANTY; without even 
00012  *    the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013  *    PURPOSE.  See the above copyright notice for more information.
00014  *
00015  */
00016 #ifndef VTK_OBJECT_BASE_STACK_H_
00017 #  define VTK_OBJECT_BASE_STACK_H_
00018 #  include "vtkAdaptorContainer.h"
00019 
00020 class vtkObjectBaseStackInternal;
00021 
00043 class VTK_CONTAINERS_EXPORT vtkObjectBaseStack
00044   : public vtkAdaptorContainer
00045 {
00046 public:
00047   static vtkObjectBaseStack* New (void);
00048   vtkTypeRevisionMacro (vtkObjectBaseStack, vtkAdaptorContainer);
00049   void PrintSelf (ostream&, vtkIndent);
00050 
00051   virtual vtkIdType     GetSize (void) const;
00052   virtual int           IsEmpty (void) const;
00053   virtual vtkIdType     GetMaxSize (void) const;
00054   virtual int           Clear (void);
00055 
00060   virtual int           Swap (vtkObjectBaseStack* container);
00061 
00066   virtual int           Copy (vtkObjectBaseStack* container);
00067 
00070   vtkIdType                     GetSizeLimit (void) const;
00071   void                          SetSizeLimit (vtkIdType limit);
00082   virtual int                   Push (vtkObjectBase* item);
00083 
00091   int                           Pop (void);
00092 
00094   virtual vtkObjectBase*        Top (void) const;
00105   virtual vtkObjectBase*        At (vtkIdType position) const;
00106 
00114   int                           PopBottom (void);
00117 protected:
00118   vtkObjectBaseStack (void);
00119   ~vtkObjectBaseStack();
00120 
00121   void  ReportReferences (vtkGarbageCollector*);
00122 
00123 private:
00124   //BTX
00125   vtkObjectBaseStackInternal* Internal;
00126 
00133   vtkObjectBase*        Front (void) const;
00134 
00139   vtkObjectBase*        Back (void) const;
00144   int Swap (vtkAdaptorContainer* a)
00145     { return this->Swap(static_cast<vtkObjectBaseStack*>(a)); }
00146   int Copy (vtkAdaptorContainer* a)
00147     { return this->Copy(static_cast<vtkObjectBaseStack*>(a)); }
00149   //ETX
00150 
00151 private:
00157   vtkObjectBaseStack (const vtkObjectBaseStack&);
00158   void operator= (const vtkObjectBaseStack&);
00160 };
00161 
00162 // ----------------------------------------------------------------------------
00163 inline vtkObjectBase*
00164 vtkObjectBaseStack::Top (void) const
00165 {
00166   return this->Back();
00167 }
00168 
00169 #endif /* VTK_OBJECT_BASE_STACK_H_ */
00170 /* 
00171  * End of: $Id: vtkObjectBaseStack.h,v 1.3 2005/06/24 23:17:16 xpxqx Exp $.
00172  * 
00173  */

Generated on Thu Jul 14 14:39:38 2005 for vtkContainers by doxygen 1.3.6