disposer.H

00001 /*
00002  * This file is part of the "Archon" framework.
00003  * (http://files3d.sourceforge.net)
00004  *
00005  * Copyright © 2002 by Kristian Spangsege and Brian Kristiansen.
00006  *
00007  * Permission to use, copy, modify, and distribute this software and
00008  * its documentation under the terms of the GNU General Public License is
00009  * hereby granted. No representations are made about the suitability of
00010  * this software for any purpose. It is provided "as is" without express
00011  * or implied warranty. See the GNU General Public License
00012  * (http://www.gnu.org/copyleft/gpl.html) for more details.
00013  *
00014  * The characters in this file are ISO8859-1 encoded.
00015  *
00016  * The documentation in this file is in "Doxygen" style
00017  * (http://www.doxygen.org).
00018  */
00019 
00020 #ifndef ARCHON_X3D_PROXY_DISPOSER_H
00021 #define ARCHON_X3D_PROXY_DISPOSER_H
00022 
00023 #include <archon/util/thread.H>
00024 
00025 #include <archon/x3d/proxy/sai.H>
00026 
00027 namespace Archon
00028 {
00029   namespace X3D
00030   {
00031     namespace Proxy
00032     {
00033       using namespace std;
00034       using namespace Utilities;
00035 
00047       struct Disposer: Thread
00048       {
00049         Disposer(x3d::sai::Session_ptr);
00050         virtual ~Disposer();
00051 
00052         void addContext(unsigned long id, unsigned long transCount);
00053         void addNode(unsigned long id, unsigned long transCount);
00054 
00055       private:
00056         x3d::sai::Session_var session;
00057 
00058         void main();
00059 
00060         Mutex disposerMutex;
00061         Condition more;
00062 
00063         struct Entry
00064         {
00065           unsigned long id;
00066           unsigned long transCount;
00067           Entry(unsigned long id, unsigned long transCount):
00068             id(id), transCount(transCount) {}
00069         };
00070 
00071         vector<Entry> contexts;
00072         vector<Entry> nodes;
00073       };
00074     }
00075   }
00076 }
00077 
00078 #endif // ARCHON_X3D_PROXY_DISPOSER_H

Generated on Sun Jul 30 22:55:46 2006 for Archon by  doxygen 1.4.4