Panda3D

pipelineCyclerLinks.h

00001 // Filename: pipelineCyclerLinks.h
00002 // Created by:  drose (16Feb06)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef PIPELINECYCLERLINKS_H
00016 #define PIPELINECYCLERLINKS_H
00017 
00018 #include "pandabase.h"
00019 #include "selectThreadImpl.h"  // for THREADED_PIPELINE definition
00020 #include "pnotify.h"
00021 
00022 ////////////////////////////////////////////////////////////////////
00023 //       Class : PipelineCyclerLinks
00024 // Description : This just stores the pointers to implement a
00025 //               doubly-linked list of PipelineCyclers for a
00026 //               particular Pipeline object.  We use a hand-rolled
00027 //               linked list rather than any STL container, because we
00028 //               want PipelineCyclers to be able to add and remove
00029 //               themselves from this list very quickly.
00030 //
00031 //               These pointers are inherited from this separate class
00032 //               so the Pipeline object itself can be the root of the
00033 //               linked list.
00034 ////////////////////////////////////////////////////////////////////
00035 class EXPCL_PANDA_PIPELINE PipelineCyclerLinks {
00036 protected:
00037 #ifdef THREADED_PIPELINE
00038   INLINE PipelineCyclerLinks();
00039   INLINE ~PipelineCyclerLinks();
00040 
00041   INLINE void make_head();
00042   INLINE void clear_head();
00043 
00044   INLINE void remove_from_list();
00045   INLINE void insert_before(PipelineCyclerLinks *node);
00046 
00047   INLINE void take_list(PipelineCyclerLinks &other);
00048 
00049   PipelineCyclerLinks *_prev, *_next;
00050 #endif
00051   friend class Pipeline;
00052 };
00053 
00054 #include "pipelineCyclerLinks.I"
00055 
00056 #endif
 All Classes Functions Variables Enumerations