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

/ray/src/lib/tl/refnode.cc

Go to the documentation of this file.
00001 /*
00002  * lib/tl/refnode.cc 
00003  * 
00004  * Reference counting node: implementation of assertions. 
00005  * 
00006  * Copyright (c) 2004 by Wolfgang Wieser ] wwieser (a) gmx <*> de [ 
00007  * 
00008  * This file may be distributed and/or modified under the terms of the 
00009  * GNU General Public License version 2 as published by the Free Software 
00010  * Foundation. (See COPYING.GPL for details.)
00011  * 
00012  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00013  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00014  * 
00015  */
00016 
00017 #include "refnode.h"
00018 #include <stdlib.h>
00019 
00020 
00021 void InternalRefNodeBase::_failCritAssert()
00022 {
00023     abort();
00024 }
00025 
00026 void InternalRefNodeBase_ThreadSave::_failCritAssert()
00027 {
00028     abort();
00029 }
00030 
00031 
00032 //------------------------------------------------------------------------------
00033 
00034 #if 0
00035 
00036 class Buffer : InternalRefNodeBase
00037 {
00038     template<class T>friend class RefNode;
00039     private:
00040         char *buf;
00041     public:
00042         int size;
00043     
00044     public:  _CPP_OPERATORS
00045         Buffer()  {  }
00046         ~Buffer()  {  }
00047         
00048         int foo(char *x,int y) { return(size); }
00049 };
00050 
00051 void foo()
00052 {
00053     RefNode<Buffer> b(new Buffer());
00054     
00055     // Copy constructor and assignment: 
00056     RefNode<Buffer> c(b);
00057     c=b;
00058     
00059     // Test for NULL refs: 
00060     if(c || !b);
00061     
00062     // Note that this will access the internal class transparently: 
00063     c->size=17;
00064     c->foo(NULL,3);
00065 }
00066 
00067 #endif

Generated on Sat Feb 19 22:33:46 2005 for Ray by doxygen 1.3.5