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

phObjectList.h

Go to the documentation of this file.
00001 /* ---------------------------------------------------------------------------
00002     Phission : 
00003         Realtime Vision Processing System
00004     
00005     Copyright (C) 2003-2006 Philip D.S. Thoren (pthoren@cs.uml.edu)
00006     University of Massachusetts at Lowell,
00007     Laboratory for Artificial Intelligence and Robotics
00008     
00009     This file is part of Phission.
00010 
00011     Phission is free software; you can redistribute it and/or modify
00012     it under the terms of the GNU Lesser General Public License as published by
00013     the Free Software Foundation; either version 2 of the License, or
00014     (at your option) any later version.
00015 
00016     Phission is distributed in the hope that it will be useful,
00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019     GNU Lesser General Public License for more details.
00020 
00021     You should have received a copy of the GNU Lesser General Public License
00022     along with Phission; if not, write to the Free Software
00023     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 
00025  ---------------------------------------------------------------------------*/
00026 #ifndef _PHOBJECTLIST_H
00027 #define _PHOBJECTLIST_H
00028 
00029 #include <phStandard.h>
00030 #include <phList.h>
00031 
00032 /* ------------------------------------------------------------------------ */
00052 PHAPI(class) phObjectNode : public phListNode
00053 {
00054 protected:
00056     phObject *m_obj;
00057 
00064     int m_autoDelete;
00065     
00066 public:
00070     phObjectNode();
00082     phObjectNode( phObject *pobj,int autoDelete_on = 0 );
00083     ~phObjectNode();
00084 
00092     int         setObject( phObject *obj );
00101     phObject   *getObject();
00102 
00114     phObjectNode *getNextObject     ();
00126     phObjectNode *getPreviousObject ();
00127     
00139     int enableAutoDelete ();
00145     int disableAutoDelete();
00146 };
00147 
00148 /* ------------------------------------------------------------------------ */
00171 PHAPI(class) phObjectList : public phList
00172 {
00173 
00174 public:
00179     phObjectList();
00180     ~phObjectList();
00181     
00190     phObjectNode    * findObject( phObject *pobj );
00191 
00206     phObjectNode    * insertObject    ( phObject *pobj, uint32_t index = 0 );
00207 
00219     phObject        * removeObject    ( phObjectNode   *node );    
00230     phObject        * removeObject    ( phObject *node );    
00231     
00242     phObjectNode    * enqueueObject   ( phObject *pobj );
00252     phObject        * dequeueObject   ( );
00253     
00265     phObjectNode    * pushObject      ( phObject *pobj );
00276     phObject        * popObject       ( );
00277     
00289     phObjectNode    * unshiftObject   ( phObject *pobj );
00300     phObject        * shiftObject     ( );
00301     
00302     /* Cast these, it makes for easier cleaner code */
00311     phObjectNode    * getHeadObject   ();
00320     phObjectNode    * getTailObject   ();
00321 };
00322 
00323 #endif /* _PHOBJECTLIST_H */




Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo

Generated on Sat Jun 16 02:44:02 2007 for phission by  doxygen 1.4.4