Panda3D
 All Classes Functions Variables Enumerations
cyclerHolder.h
00001 // Filename: cyclerHolder.h
00002 // Created by:  drose (09Feb06)
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 CYCLERHOLDER_H
00016 #define CYCLERHOLDER_H
00017 
00018 #include "pandabase.h"
00019 #include "pipelineCyclerBase.h"
00020 
00021 ////////////////////////////////////////////////////////////////////
00022 //       Class : CyclerHolder
00023 // Description : A lightweight C++ object whose constructor calls
00024 //               acquire() and whose destructor calls release() on a
00025 //               PipelineCyclerBase object.  This is similar to a
00026 //               MutexHolder.
00027 ////////////////////////////////////////////////////////////////////
00028 class EXPCL_PANDA_PIPELINE CyclerHolder {
00029 public:
00030   INLINE CyclerHolder(PipelineCyclerBase &cycler);
00031   INLINE ~CyclerHolder();
00032 private:
00033   INLINE CyclerHolder(const CyclerHolder &copy);
00034   INLINE void operator = (const CyclerHolder &copy);
00035 
00036 private:
00037 #ifdef DO_PIPELINING
00038   PipelineCyclerBase *_cycler;
00039 #endif
00040 };
00041 
00042 #include "cyclerHolder.I"
00043 
00044 #endif
 All Classes Functions Variables Enumerations