source: golgotha/src/i4/lisp/li_optr.hh @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 11 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.1 KB
Line 
1/********************************************************************** <BR>
2  This file is part of Crack dot Com's free source code release of
3  Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
4  information about compiling & licensing issues visit this URL</a>
5  <PRE> If that doesn't help, contact Jonathan Clark at
6  golgotha_source@usa.net (Subject should have "GOLG" in it)
7***********************************************************************/
8
9#ifndef LI_OPTR_HH
10#define LI_OPTR_HH
11
12class li_object;
13
14// anything referenced by a li_object_pointer will be marked as in use furing gc
15class li_object_pointer
16{
17public:
18  li_object *o;
19  li_object_pointer *next;
20 
21  li_object_pointer(li_object *o=0);
22  ~li_object_pointer();
23
24  li_object& operator*() const { return *o; }
25  li_object* operator->() const { return o; }
26  li_object *get() { return o; }
27
28  li_object_pointer &operator=(const li_object_pointer &other) { o=other.o;  return *this; }
29  li_object_pointer &operator=(li_object *object) { o=object; return *this;}   
30};
31
32
33#endif
Note: See TracBrowser for help on using the repository browser.